not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / kdm / backend / Imakefile
blob75efcb45ab59e9485997bfa38d5019adfc1e9cb6
1 /* well, we have no subdirs ...
2 #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
3 */
5 #ifdef DEBUG
6 CDEBUGFLAGS := $(CDEBUGFLAGS) -g
7 #endif
9 #ifndef BuildBoth
10 #define BuildBoth (defined(LinuxArchitecture) && !UseElfFormat)
11 #endif
13 #ifndef LinuxShadowSuite
14 #define LinuxShadowSuite NO
15 #endif
17 #if FSUseSyslog
18 LOG_DEFINES = -DUSE_SYSLOG
19 #endif
21 #ifdef NoXDMCP
22 XDMCPLIB =
23 #else
24 XDMCP_DEFINES = -DXDMCP
25 #endif
27 #if HasXdmAuth
28 XDMAUTH_DEFINES = -DHASXDMAUTH
29 XDMAUTHOBJS = xdmauth.o
30 XDMAUTHSRCS = xdmauth.c
31 #endif
33 #if HasSecureRPC
34 RPC_DEFINES = -DSECURE_RPC
35 RPCOBJS = rpcauth.o
36 RPCSRCS = rpcauth.c
37 RPCLIB = -lrpcsvc
38 #endif
40 #if HasKrbIV
41 #if NOAFS
42 KRBIV_DEFINES = KrbIVDefines -DNO_AFS
43 #else
44 KRBIV_DEFINES = KrbIVDefines
45 #endif
46 KRBIV_INCLUDES = KrbIVIncludes
47 KRBIVLIB = KrbIVLibraries
48 #endif
50 #if HasKrb5
51 KRB5_DEFINES = Krb5Defines
52 KRB5_INCLUDE = Krb5Includes
53 KRB5OBJS = krb5auth.o
54 KRB5SRCS = krb5auth.c
55 #endif
57 /* This is correct for Linux and FreeBSD */
58 #if HasPam
59 PAM_LIBRARIES = PamLibraries
60 PAM_DEFINES = -DUSE_PAM
61 #endif
63 #if HasPam
64 #undef HasShadowPasswd
65 #define HasShadowPasswd NO
66 #undef HasLibCrypt
67 #define HasLibCrypt NO
68 #endif
71 #if HasBSDAuth
72 BSDAUTH_DEFINES = -DUSE_BSDAUTH
73 #endif
76 #if SystemV4 || HasShadowPasswd
78 #if !LinuxShadowSuite
79 PWD_DEFINES = -DUSESHADOW
80 #else
81 PWD_DEFINES = -DUSESHADOW -DSHADOWSUITE
82 #endif
84 #if !defined(i386IscArchitecture) && !defined(i386ScoArchitecture) && !defined(LinuxArchitecture) && !defined(NTOArchitecture) && !defined(SGIArchitecture)
85 SYS_LIBRARIES3 = -lresolv
86 #endif
87 #if SystemV || defined(SequentArchitecture)
88 SYS_LIBRARIES1 = -lsec
89 #endif
90 #if defined(LinuxArchitecture) && (!UseElfFormat || LinuxShadowSuite)
91 SYS_LIBRARIES1 = -lshadow
92 #endif
94 #endif
96 #if defined(UltrixArchitecture)
97 SYS_LIBRARIES1 = -lauth
98 #endif
100 #if (defined(AIXArchitecture) && (OSMajorVersion >= 3))
101 SYS_LIBRARIES1 = -ls
102 #endif
104 #if HasLibCrypt
105 #ifdef SpecialLibCrypt
106 CRYPT_LIBRARIES = SpecialLibCrypt
107 #else
108 CRYPT_LIBRARIES = -lcrypt
109 #if defined(LynxOSArchitecture)
110 CRYPT_DEFINES = -DHAS_CRYPT
111 #endif
112 #endif
113 #endif
115 #if HasBSD44Sockets
116 SOCK_DEFINES = -DBSD44SOCKETS
117 #endif
119 #if defined(i386Architecture) || defined(AmigaArchitecture)
120 FRAGILE_DEFINES = -DFRAGILE_DEV_MEM
121 #endif
123 #ifdef RandomDefines
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\"
133 #endif
136 #if HasSetUserContext
137 USER_CONTEXT_DEFINES = -DHAS_SETUSERCONTEXT
138 # XXX - only FreeBSD has this in libutil
139 SYS_LIBRARIES1 = -lutil
140 #endif
142 #if HasSetProcTitle
143 PROCTITLE_DEFINES = -DHAS_SETPROCTITLE
144 #endif
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
170 #if BuildBoth
171          SRCS2 = $(COMMSRCS) clientsh.c
172          OBJS2 = $(COMMOBJS) clientsh.o
174     XDM_SHADOW = xdm-shadow
175 #endif
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) \
190   -Dconst=
192 ComplexProgramTarget_1(xdm,$(LOCAL_LIBRARIES),NullParameter)
193 #if BuildBoth
194 NormalProgramTarget(xdm-shadow,$(OBJS2),$(DEPLIBS),$(LOCAL_LIBRARIES),-lshadow)
195 InstallProgram(xdm-shadow,$(BINDIR))
196 ObjectFromSpecialSource(clientsh,client,-DUSESHADOW)
197 #endif
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)
202 #endif