#ifdef BandAidCompiler
#include BandAidCompiler
#endif

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

   XDMCONFIGDIR = XdmConfigurationSubdirectory
        SUBDIRS = $(XDMCONFIGDIR)

LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
          SRCS1 = buf.c daemon.c display.c displaylist.c dm.c error.c \
		  file.c greet.c pseudoreset.c resource.c \
		  session.c socket.c verify.c Login.c
          OBJS1 = buf.o daemon.o display.o displaylist.o dm.o error.o \
		  file.o greet.o pseudoreset.o resource.o \
		  session.o socket.o verify.o Login.o
          SRCS2 = xdmshell.c 
          OBJS2 = xdmshell.o 
       PROGRAMS = xdm xdmshell
        DEFINES = -DBINDIR=\"$(BINDIR)\" -DXDMDIR=\"$(XDMDIR)\" 

/**/#
/**/# 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
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)/xdm-config"'

ComplexProgramTarget_1(xdm,$(LOCAL_LIBRARIES),)
SingleProgramTarget(xdmshell,$(OBJS2),,)

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

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

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