1 /* well, we have no subdirs ...
2 #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
6 CDEBUGFLAGS := $(CDEBUGFLAGS) -g
10 #define BuildBoth (defined(LinuxArchitecture) && !UseElfFormat)
13 #ifndef LinuxShadowSuite
14 #define LinuxShadowSuite NO
18 LOG_DEFINES = -DUSE_SYSLOG
24 XDMCP_DEFINES = -DXDMCP
28 XDMAUTH_DEFINES = -DHASXDMAUTH
29 XDMAUTHOBJS = xdmauth.o
30 XDMAUTHSRCS = xdmauth.c
34 RPC_DEFINES = -DSECURE_RPC
42 KRBIV_DEFINES = KrbIVDefines -DNO_AFS
44 KRBIV_DEFINES = KrbIVDefines
46 KRBIV_INCLUDES = KrbIVIncludes
47 KRBIVLIB = KrbIVLibraries
51 KRB5_DEFINES = Krb5Defines
52 KRB5_INCLUDE = Krb5Includes
57 /* This is correct for Linux and FreeBSD */
59 PAM_LIBRARIES = PamLibraries
60 PAM_DEFINES = -DUSE_PAM
64 #undef HasShadowPasswd
65 #define HasShadowPasswd NO
67 #define HasLibCrypt NO
72 BSDAUTH_DEFINES = -DUSE_BSDAUTH
76 #if SystemV4 || HasShadowPasswd
79 PWD_DEFINES = -DUSESHADOW
81 PWD_DEFINES = -DUSESHADOW -DSHADOWSUITE
84 #if !defined(i386IscArchitecture) && !defined(i386ScoArchitecture) && !defined(LinuxArchitecture) && !defined(NTOArchitecture) && !defined(SGIArchitecture)
85 SYS_LIBRARIES3 = -lresolv
87 #if SystemV || defined(SequentArchitecture)
88 SYS_LIBRARIES1 = -lsec
90 #if defined(LinuxArchitecture) && (!UseElfFormat || LinuxShadowSuite)
91 SYS_LIBRARIES1 = -lshadow
96 #if defined(UltrixArchitecture)
97 SYS_LIBRARIES1 = -lauth
100 #if (defined(AIXArchitecture) && (OSMajorVersion >= 3))
105 #ifdef SpecialLibCrypt
106 CRYPT_LIBRARIES = SpecialLibCrypt
108 CRYPT_LIBRARIES = -lcrypt
109 #if defined(LynxOSArchitecture)
110 CRYPT_DEFINES = -DHAS_CRYPT
116 SOCK_DEFINES = -DBSD44SOCKETS
119 #if defined(i386Architecture) || defined(AmigaArchitecture)
120 FRAGILE_DEFINES = -DFRAGILE_DEV_MEM
124 RANDOM_DEFINES = RandomDefines
125 #elif defined(OpenBSDArchitecture)
126 RANDOM_DEFINES = -DARC4_RANDOM
127 #elif defined(LinuxArchitecture)
128 RANDOM_DEFINES = -DDEV_RANDOM=\"/dev/urandom\"
129 #elif defined(NetBSDArchitecture) && \
130 ((OSMajorVersion > 1) || \
131 (OSMajorVersion == 1 && OSMinorVersion > 3))
132 RANDOM_DEFINES = -DDEV_RANDOM=\"/dev/urandom\"
136 #if HasSetUserContext
137 USER_CONTEXT_DEFINES = -DHAS_SETUSERCONTEXT
138 # XXX - only FreeBSD has this in libutil
139 SYS_LIBRARIES1 = -lutil
143 PROCTITLE_DEFINES = -DHAS_SETPROCTITLE
146 SYS_LIBRARIES = $(SYS_LIBRARIES1) $(SYS_LIBRARIES2) $(SYS_LIBRARIES3)
148 INCLUDES = $(KRB5_INCLUDE)
149 DEPLIBS = $(DEPXLIB) $(DEPXAUTHLIB) $(DEPXDMCPLIB)
150 LOCAL_LIBRARIES = $(XLIB) $(XAUTHLIB) \
151 $(XDMCPLIB) $(RPCLIB) $(PAM_LIBRARIES) \
152 $(CRYPT_LIBRARIES) $(KRBIVLIB)
154 COMMSRCS = auth.c daemon.c server.c dpylist.c dm.c error.c \
155 netaddr.c reset.c resource.c protodpy.c policy.c \
156 session.c socket.c streams.c util.c xdmcp.c \
157 process.c mitauth.c \
158 genauth.c access.c choose.c \
159 $(XDMAUTHSRCS) $(RPCSRCS) $(KRB5SRCS)
160 COMMOBJS = auth.o daemon.o server.o dpylist.o dm.o error.o \
161 netaddr.o reset.o resource.o protodpy.o policy.o \
162 session.o socket.o streams.o util.o xdmcp.o \
163 process.o mitauth.o \
164 genauth.o access.o choose.o \
165 $(XDMAUTHOBJS) $(RPCOBJS) $(KRB5OBJS)
167 SRCS1 = $(COMMSRCS) client.c
168 OBJS1 = $(COMMOBJS) client.o
171 SRCS2 = $(COMMSRCS) clientsh.c
172 OBJS2 = $(COMMOBJS) clientsh.o
174 XDM_SHADOW = xdm-shadow
177 PROGRAMS = xdm $(XDM_SHADOW)
180 OSMAJORVERSION = OSMajorVersion
181 OSMINORVERSION = OSMinorVersion
182 CONN_DEFINES = $(CONNECTION_FLAGS)
183 DEFINES = $(SIGNAL_DEFINES) $(LOG_DEFINES) \
184 $(CRYPT_DEFINES)$(PWD_DEFINES) \
185 $(BSDAUTH_DEFINES) $(PAM_DEFINES) $(USER_CONTEXT_DEFINES) \
186 $(XDMAUTH_DEFINES) $(RPC_DEFINES) $(KRB5_DEFINES) \
187 $(XDMCP_DEFINES) $(SOCK_DEFINES) $(CONN_DEFINES) \
188 $(FRAGILE_DEFINES) $(RANDOM_DEFINES) $(PROCTITLE_DEFINES) \
189 -DOSMAJORVERSION=$(OSMAJORVERSION) -DOSMINORVERSION=$(OSMINORVERSION) \
192 ComplexProgramTarget_1(xdm,$(LOCAL_LIBRARIES),NullParameter)
194 NormalProgramTarget(xdm-shadow,$(OBJS2),$(DEPLIBS),$(LOCAL_LIBRARIES),-lshadow)
195 InstallProgram(xdm-shadow,$(BINDIR))
196 ObjectFromSpecialSource(clientsh,client,-DUSESHADOW)
199 #if defined(FreeBSDArchitecture) && (OSMajorVersion < 2)
200 XCOMM only for daemon.c? it's used in some other places, too.
201 SpecialCObjectRule(daemon,$(ICONFIGFILES),-UCSRG_BASED)