#ifdef BandAidCompiler
#include BandAidCompiler
#endif

#if InstallXdmConfig
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
#endif

#if HasDESLibrary
DESDEFS = -DHASDES
DESOBJS = xdmauth.o
DESSRCS = xdmauth.c
#else
DESDEFS =
DESOBJS =
DESSRCS =
#endif

   XDMCONFIGDIR = XdmConfigurationSubdirectory
        SUBDIRS = $(XDMCONFIGDIR)

DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) \
	  $(TOP)/lib/Xau/libXau.a
LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) \
		  $(TOP)/lib/Xau/libXau.a $(XLIB)
          SRCS1 = dm.c auth.c cryptokey.c daemon.c dpylist.c error.c file.c \
		  greet.c mitauth.c reset.c resource.c \
		  session.c xdmsocket.c util.c verify.c Login.c
          OBJS1 = dm.o auth.o cryptokey.o daemon.o dpylist.o error.o file.o \
		  greet.o mitauth.o reset.o resource.o \
		  session.o xdmsocket.o util.o verify.o Login.o $(DESOBJS)
       PROGRAMS = xlogind

#if !HasVoidSignalReturn
        SIGDEFS = -DSIGNALRETURNSINT
#endif
 OSMAJORVERSION = OSMajorVersion
 OSMINORVERSION = OSMinorVersion
        DEFINES = -DBINDIR=\"$(BINDIR)\" -DXDMDIR=\"$(XDMDIR)\" $(SIGDEFS) \
		$(DESDEFS) ConnectionFlags \
		-DOSMAJORVERSION=$(OSMAJORVERSION) \
		-DOSMINORVERSION=$(OSMINORVERSION)

/**/#
/**/# Special definitions for compiling default resources; these parameters
/**/# should be set in util/imake.includes/site.def or the appropriate .macros
/**/# file in that directory.  The lack of initial spaces is to prevent imake
/**/# from accidently turning the lines into rules by putting a leading tab.
/**/#
/**/# Do NOT change these lines!
/**/#
DEF_SERVER = $(BINDIR)/X
DEF_USER_PATH = DefaultUserPath		/* no leading spaces or imake will */
DEF_SYSTEM_PATH = DefaultSystemPath	/* indent as rule */
BOURNE_SHELL = DefaultSystemShell
CPP_PROGRAM = CppCmd
RES_DEFINES = '-DDEF_SERVER_LINE=":0 secure $(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)/xsm-config"' \
		  '-DDEF_AUTH_FILE="$(XDMDIR)/auth-server"' \
		  '-DCPP_PROGRAM="$(CPP_PROGRAM)"'

ComplexProgramTarget_1(xlogind,$(LOCAL_LIBRARIES), /**/)

SpecialObjectRule(resource.o, $(INCONFIGFILES), $(RES_DEFINES))

#ifdef IHaveSubdirs
MakeDirectories(install,$(XDMDIR))
MakeSubdirs($(SUBDIRS))
#endif
