XCOMM $XdotOrg: xc/programs/xdm/Imakefile,v 1.3 2004-07-26 22:56:33 herrb Exp $ XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:54:14 cpqbld Exp $ XCOMM $XFree86: xc/programs/xdm/Imakefile,v 3.66 2004/01/09 00:25:23 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' #ifndef BuildChooser #define BuildChooser !SystemV #endif #ifndef SharedLibXdmGreet #define SharedLibXdmGreet (HasSharedLibraries && !defined(LinuxArchitecture) && (defined(AlphaArchitecture) || SystemV4)) #endif #ifndef BuildBoth #define BuildBoth (defined(LinuxArchitecture) && !SharedLibXdmGreet && !UseElfFormat) #endif #ifndef LinuxShadowSuite #define LinuxShadowSuite NO #endif #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 HasKrbIV KRBIV_DEFINES = KrbIVDefines KRBIV_INCLUDES = KrbIVIncludes KRBIVLIB = KrbIVLibraries #endif #if HasKrb5 KRB5_DEFINES = Krb5Defines KRB5_INCLUDE = Krb5Includes KRB5OBJS = krb5auth.o KRB5SRCS = krb5auth.c #endif #if !HasArc4Random PRNGCSRCS = prngc.c PRNGCOBJS = prngc.o #endif #if SharedLibXdmGreet GREET_DIR = greeter #if (SystemV4 && !defined(SGIArchitecture)) || \ (SharedLibXdmGreet && \ (defined(LinuxArchitecture) || \ defined(NetBSDArchitecture) || \ defined(GNUMachArchitecture))) DLLIBRARY = DlLibrary #endif #else XPM_DEFINES = -DXPM GREETLIBS = $(XPMLIB) GREET_DEFINES = -DGREET_USER_STATIC $(KRBIV_DEFINES) $(KRBIV_INCLUDES) GREETSRCS = greet.c verify.c Login.c GREETOBJS = greet.o verify.o Login.o #if BuildBoth GREETSHADOWSRCS = greetsh.c verifysh.c Loginsh.c GREETSHADOWOBJS = greetsh.o verifysh.o Loginsh.o #if !UseElfFormat SHADOWLIB = -lshadow #endif #endif #endif #if BuildXineramaLibrary XINERAMA_DEFINES = -DUSE_XINERAMA XINDEPLIBS = $(DEPXINERAMALIB) XINLIBS = $(XINERAMALIB) #endif /* This is correct for Linux and FreeBSD */ #if HasPam PAM_LIBRARIES = PamLibraries PAM_DEFINES = -DUSE_PAM #endif #if HasBSDAuth BSDAUTH_DEFINES = -DUSE_BSDAUTH #endif #if SystemV4 || HasShadowPasswd #if !LinuxShadowSuite PWD_DEFINES = -DUSESHADOW #else PWD_DEFINES = -DUSESHADOW -DSHADOWSUITE #endif #if !defined(i386IscArchitecture) && !defined(i386ScoArchitecture) && !defined(LinuxArchitecture) && !defined(NTOArchitecture) && !defined(SGIArchitecture) SYS_LIBRARIES3 = -lresolv #endif #if SystemV || defined(SequentArchitecture) SYS_LIBRARIES1 = -lsec #endif #if defined(LinuxArchitecture) && (!UseElfFormat || LinuxShadowSuite) SYS_LIBRARIES1 = -lshadow #endif #endif #if defined(UltrixArchitecture) SYS_LIBRARIES1 = -lauth #endif #if (defined(AIXArchitecture) && (OSMajorVersion >= 3)) SYS_LIBRARIES1 = -ls #endif #if HasLibCrypt #ifdef SpecialLibCrypt CRYPT_LIBRARIES = SpecialLibCrypt #else CRYPT_LIBRARIES = -lcrypt #if defined(LynxOSArchitecture) CRYPT_DEFINES = -DHAS_CRYPT #endif #endif #endif #if HasBSD44Sockets SOCK_DEFINES = -DBSD44SOCKETS #endif #if defined(i386Architecture) || defined(AmigaArchitecture) FRAGILE_DEFINES = -DFRAGILE_DEV_MEM #endif #ifdef RandomDefines RANDOM_DEFINES = RandomDefines #endif #if HasVFork VFORK_DEFINES = -DHAS_VFORK #endif #if HasMkstemp MKSTEMP_DEFINES = -DHAS_MKSTEMP #endif #if UseXKBInClients XKB_CLIENT_DEFINES = XkbClientDefines #endif #if HasSetUserContext USER_CONTEXT_DEFINES = -DHAS_SETUSERCONTEXT # XXX - only FreeBSD has this in libutil SYS_LIBRARIES1 = -lutil #endif #if HasSetProcTitle PROCTITLE_DEFINES = -DHAS_SETPROCTITLE #if defined(BSDOSArchitecture) # XXX - only BSD/OS has this in libutil SYS_LIBRARIES1 = -lutil #endif #endif #if !HasSnprintf SNPRINTFSRCS = snprintf.c SNPRINTFOBJS = snprintf.o #endif #if HasGetIfAddrs IFADDRS_DEFINES = -DHAS_GETIFADDRS #endif #if BuildIPv6 && !IPv6SocketsAlsoIPv4 && !PreferXdmcpIPv6 IPV6_DEFINES = -UIPv6 #endif XDMLOGDIR = $(LOGDIRECTORY) #ifdef HasSunC #if HasSunC XCOMM auth.c & chooser.c must be compiled with -Xa (ANSI compatible) instead XCOMM of -Xc (strict ANSI compliance) in order to access the definition for XCOMM struct lifreq, which uses "long long" type variables. LIFREQ_FLAGS = -Xa #endif #endif SYS_LIBRARIES = $(SYS_LIBRARIES1) $(SYS_LIBRARIES2) $(SYS_LIBRARIES3) XDMCONFIGDIR = XdmConfigurationSubdirectory SUBDIRS = $(GREET_DIR) $(XDMCONFIGDIR) INCLUDES = $(KRB5_INCLUDE) DEPLIBS = $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) $(DEPXAUTHLIB) \ $(DEPXDMCPLIB) $(XINDEPLIBS) LOCAL_LIBRARIES = $(GREETLIBS) $(XMULIB) $(XTOOLLIB) $(XLIB) $(XAUTHLIB) \ $(XDMCPLIB) $(RPCLIB) $(PAM_LIBRARIES) $(DLLIBRARY) \ $(CRYPT_LIBRARIES) $(KRBIVLIB) $(XINLIBS) SRCS1 = auth.c daemon.c server.c dpylist.c dm.c error.c file.c \ netaddr.c reset.c resource.c protodpy.c policy.c \ session.c socket.c streams.c util.c xdmcp.c \ mitauth.c \ genauth.c access.c choose.c $(SNPRINTFSRCS) $(PRNGCSRCS) \ $(XDMAUTHSRCS) $(RPCSRCS) $(KRB5SRCS) $(GREETSRCS) OBJS1 = auth.o daemon.o server.o dpylist.o dm.o error.o file.o \ netaddr.o reset.o resource.o protodpy.o policy.o \ session.o socket.o streams.o util.o xdmcp.o \ mitauth.o \ genauth.o access.o choose.o $(SNPRINTFOBJS) $(PRNGCOBJS) \ $(XDMAUTHOBJS) $(RPCOBJS) $(KRB5OBJS) $(GREETOBJS) SRCS2 = xdmshell.c OBJS2 = xdmshell.o #if BuildChooser SRCS3 = chooser.c OBJS3 = chooser.o DEPLIBS3 = $(XINDEPLIBS) XawClientDepLibs XkbClientDepLibs \ $(DEPXDMCPLIB) LIBS3 = $(XINLIBS) XawClientLibs XkbClientLibs $(XDMCPLIB) #endif SRCS4 = sessreg.c OBJS4 = sessreg.o #if BuildBoth SRCS5 = auth.c daemon.c server.c dpylist.c dm.c error.c file.c \ netaddr.c reset.c resource.c protodpy.c policy.c \ sessionsh.c socket.c streams.c util.c xdmcp.c \ mitauth.c \ genauth.c access.c choose.c \ $(XDMAUTHSRCS) $(RPCSRCS) $(KRB5SRCS) $(GREETSHADOWSRCS) OBJS5 = auth.o daemon.o server.o dpylist.o dm.o error.o file.o \ netaddr.o reset.o resource.o protodpy.o policy.o \ sessionsh.o socket.o streams.o util.o xdmcp.o \ mitauth.o \ genauth.o access.o choose.o \ $(XDMAUTHOBJS) $(RPCOBJS) $(KRB5OBJS) $(GREETSHADOWOBJS) XDM_SHADOW = ProgramTargetName(xdm-shadow) #endif #if BuildChooser CHOOSER = ProgramTargetName(chooser) #endif PROGRAMS = ProgramTargetName(xdm) ProgramTargetName(xdmshell) ProgramTargetName(sessreg) $(CHOOSER) $(XDM_SHADOW) CHOOSERPATH = $(XDMDIR)/chooser OSMAJORVERSION = OSMajorVersion OSMINORVERSION = OSMinorVersion CONN_DEFINES = $(CONNECTION_FLAGS) DEFINES = -DBINDIR=\"$(BINDIR)\" -DXDMDIR=\"$(XDMDIR)\" \ $(SIGNAL_DEFINES) $(CRYPT_DEFINES) $(BSDAUTH_DEFINES) \ $(XDMAUTH_DEFINES) $(RPC_DEFINES) $(KRB5_DEFINES) \ $(PWD_DEFINES) $(PAM_DEFINES) $(CONN_DEFINES) \ $(GREET_DEFINES) $(FRAGILE_DEFINES) $(RANDOM_DEFINES) \ -DOSMAJORVERSION=$(OSMAJORVERSION) \ -DOSMINORVERSION=$(OSMINORVERSION) \ $(XKB_CLIENT_DEFINES) $(USER_CONTEXT_DEFINES) \ $(XPM_DEFINES) $(XINERAMA_DEFINES) $(PROCTITLE_DEFINES) \ $(IFADDRS_DEFINES) $(IPV6_DEFINES) $(MKSTEMP_DEFINES) EXTRAMANDEFS = $(RANDOM_DEFINES) -DCHOOSERPATH=$(CHOOSERPATH) \ -DXDMLOGDIR=$(XDMLOGDIR) 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="$(CHOOSERPATH)"' \ '-DDEF_AUTH_DIR="$(XDMDIR)"' \ '-DDEF_GREETER_LIB="$(XDMDIR)/libXdmGreet.so"' ComplexProgramTarget_1(xdm,$(LOCAL_LIBRARIES),NullParameter) #ifdef LinkConfDirectory LinkConfDirectory(xdm,.,xdm,.) #ifdef VarDbDirectory LinkConfDirectoryLong(xdm,xdm,authdir,authdir,$(CONFDIR),$(VARDBDIR)) #endif #else #ifdef VarDirectory LinkVarDirectory(xdm,.,xdm,.) #endif #endif NormalProgramTarget(xdmshell,$(OBJS2),NullParameter,NullParameter,NullParameter) NormalProgramTarget(sessreg,$(OBJS4),NullParameter,NullParameter,NullParameter) InstallProgram(sessreg,$(BINDIR)) InstallManPage(sessreg,$(MANDIR)) #if defined(FreeBSDArchitecture) && (OSMajorVersion < 2) SpecialCObjectRule(daemon,$(ICONFIGFILES),-UCSRG_BASED) #endif #if BuildChooser SpecialCObjectRule(chooser, $(ICONFIGFILES), $(SOCK_DEFINES) $(LIFREQ_FLAGS)) NormalProgramTarget(chooser,$(OBJS3),$(DEPLIBS3),$(LIBS3),NullParameter) InstallProgram(chooser,$(XDMDIR)) InstallAppDefaults(Chooser) #endif #if BuildBoth NormalProgramTarget(xdm-shadow,$(OBJS5),$(DEPLIBS),$(LOCAL_LIBRARIES),$(SHADOWLIB)) InstallProgram(xdm-shadow,$(BINDIR)) #endif SpecialCObjectRule(auth,$(ICONFIGFILES),$(SOCK_DEFINES) $(LIFREQ_FLAGS)) SpecialCObjectRule(policy,$(ICONFIGFILES),$(_NOOP_)) SpecialCObjectRule(resource,$(ICONFIGFILES),$(RES_DEFINES)) SpecialCObjectRule(socket,$(ICONFIGFILES),$(SOCK_DEFINES)) SpecialCObjectRule(xdmcp,$(ICONFIGFILES),$(SOCK_DEFINES)) SpecialCObjectRule(xdmshell,$(ICONFIGFILES),$(VFORK_DEFINES)) #if !SharedLibXdmGreet LinkSourceFile(greet.c,greeter) LinkSourceFile(verify.c,greeter) LinkSourceFile(Login.c,greeter) LinkSourceFile(Login.h,greeter) LinkSourceFile(LoginP.h,greeter) #if BuildBoth ObjectFromSpecialSource(greetsh,greet,-DUSESHADOW) ObjectFromSpecialSource(verifysh,verify,-DUSESHADOW) ObjectFromSpecialSource(Loginsh,Login,-DUSESHADOW) ObjectFromSpecialSource(sessionsh,session,-DUSESHADOW) #endif #endif /* !SharedLibXdmGreet */ #if !HasSnprintf LinkSourceFile(snprintf.c,$(LIBSRC)/misc) #endif #ifdef IHaveSubdirs MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) #endif /* * Don't install; let people read the instructions about putting in the * abort-display() resource: */ #ifdef comment InstallProgramWithFlags(xdmshell,$(BINDIR),NullParameter) #endif