XCOMM $XFree86: mit/clients/xdm/Imakefile,v 2.4 1993/09/13 15:31:05 dawes Exp $
XCOMM $XConsortium: Imakefile,v 1.58.1.1 92/12/17 20:08:19 gildea Exp $
XCOMM $Id: Imakefile,v 1.2 1994/11/23 22:56:33 pierre Exp $
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'

#define BuildChooser !SystemV || defined(i386SVR3Architecture)

#if HasXdmAuth
XDMAUTH_DEFINES = -DHASXDMAUTH
XDMAUTHOBJS = xdmauth.o
XDMAUTHSRCS = xdmauth.c
#endif

#if HasSecureRPC
RPC_DEFINES = -DSECURE_RPC
RPCOBJS = rpcauth.o
RPCSRCS = rpcauth.c
RPCLIB = -lrpcsvc
#endif

#if defined(LinuxArchitecture)
PWD_DEFINES = -DUSESHADOW
SYS_LIBRARIES = -lshadow
#endif


#if defined(XFree86Version) && HasLibCrypt
SYS_LIBRARIES = -lcrypt
#endif

#if (defined(AIXArchitecture) && (OSMajorVersion >= 3))
SYS_LIBRARIES = -ls
#endif

   XDMCONFIGDIR = XdmConfigurationSubdirectory
        SUBDIRS = $(XDMCONFIGDIR) pixmaps

DEPLIBS = XawClientDepLibs $(DEPXAUTHLIB) $(DEPXDMCPLIB)
LOCAL_LIBRARIES = -lXpm XawClientLibs $(XAUTHLIB) $(XDMCPLIB) $(RPCLIB)
          SRCS1 = auth.c daemon.c server.c dpylist.c dm.c error.c file.c \
		  greet.c netaddr.c reset.c resource.c protodpy.c policy.c \
		  session.c socket.c streams.c util.c verify.c xdmcp.c \
		  Login.c mitauth.c \
		  genauth.c access.c choose.c $(XDMAUTHSRCS) $(RPCSRCS)
          OBJS1 = auth.o daemon.o server.o dpylist.o dm.o error.o file.o \
		  greet.o netaddr.o reset.o resource.o protodpy.o policy.o \
		  session.o socket.o streams.o util.o verify.o xdmcp.o \
		  Login.o mitauth.o \
		  genauth.o access.o choose.o $(XDMAUTHOBJS) $(RPCOBJS)
          SRCS2 = xdmshell.c 
          OBJS2 = xdmshell.o 
#if BuildChooser
          SRCS3 = chooser.c
          OBJS3 = chooser.o
#endif
       DEPLIBS3 = XawClientDepLibs
          LIBS3 = -lXdmcp XawClientLibs 
       
          SRCS4 = sessreg.c
          OBJS4 = sessreg.o
#if BuildChooser
       PROGRAMS = xdm xdmshell sessreg chooser
#else
       PROGRAMS = xdm xdmshell sessreg
#endif

 OSMAJORVERSION = OSMajorVersion
 OSMINORVERSION = OSMinorVersion
        DEFINES = -DBINDIR=\"$(BINDIR)\" -DXDMDIR=\"$(XDMDIR)\" \
		$(SIGNAL_DEFINES) $(XDMAUTH_DEFINES) $(RPC_DEFINES) $(PWD_DEFINES) \
		ConnectionFlags \
		-DOSMAJORVERSION=$(OSMAJORVERSION) \
		-DOSMINORVERSION=$(OSMINORVERSION)

XCOMM
XCOMM Special definitions for compiling default resources; these parameters
XCOMM should be set in util/imake.includes/site.def or the appropriate .macros
XCOMM file in that directory.  The lack of initial spaces is to prevent imake
XCOMM from accidently turning the lines into rules by putting a leading tab.
XCOMM
XCOMM Do NOT change these lines!
XCOMM
DEF_SERVER = $(BINDIR)/X
DEF_USER_PATH = DefaultUserPath		/* no leading spaces or imake will */
DEF_SYSTEM_PATH = DefaultSystemPath	/* indent as rule */
BOURNE_SHELL = DefaultSystemShell
RES_DEFINES = '-DDEF_SERVER_LINE=":0 local $(DEF_SERVER) :0"' \
		  '-DXRDB_PROGRAM="$(BINDIR)/xrdb"' \
		  '-DDEF_SESSION="$(BINDIR)/xterm -ls"' \
		  '-DDEF_USER_PATH="$(DEF_USER_PATH)"' \
		  '-DDEF_SYSTEM_PATH="$(DEF_SYSTEM_PATH)"' \
		  '-DDEF_SYSTEM_SHELL="$(BOURNE_SHELL)"' \
		  '-DDEF_FAILSAFE_CLIENT="$(BINDIR)/xterm"' \
		  '-DDEF_XDM_CONFIG="$(XDMDIR)/xdm-config"' \
		  '-DDEF_CHOOSER="$(XDMDIR)/chooser"' \
		  '-DDEF_AUTH_DIR="$(XDMDIR)"'

ComplexProgramTarget_1(xdm,$(LOCAL_LIBRARIES),$(SYSLIBS))
SingleProgramTarget(xdmshell,$(OBJS2),NullParameter,$(XLIB))
SingleProgramTarget(sessreg,$(OBJS4),NullParameter,NullParameter)
InstallProgram(sessreg,$(BINDIR))
InstallManPage(sessreg,$(MANDIR))
#if BuildChooser
NormalProgramTarget(chooser,$(OBJS3),$(DEPLIBS3),$(LIBS3),NullParameter)
InstallProgram(chooser,$(XDMDIR))
InstallAppDefaults(Chooser)
#endif

SpecialObjectRule(resource.o, resource.c $(ICONFIGFILES), $(RES_DEFINES))

XCOMM these files depend on HASXDMAUTH
auth.o policy.o: $(ICONFIGFILES)

#ifdef IHaveSubdirs
MakeSubdirs($(SUBDIRS))
#endif

/*
 * Don't install; let people read the instructions about putting in the
 * abort-display() resource:
 */
#ifdef comment
InstallProgramWithFlags(xdmshell,$(BINDIR),NullParameter)
#endif






