1 XCOMM $TOG: Imakefile /main/21 1999/03/01 18:26:06 mgreess $
3 #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
5 SUBDIRS = config $(XDMSUBDIRS) $(BLSSUBDIRS) $(AFSSUBDIRS)
7 MakeSubdirs($(SUBDIRS))
8 DependSubdirs($(SUBDIRS))
11 XDMCONFIGDIR = XdmConfigurationSubdirectory
12 XDMSUBDIRS = $(XDMCONFIGDIR) bootxutil
15 /* please list any new dtlogin headers for use by krb and rgy */
16 HEADERS = dm.h vg.h vglogo.h vgmsg.h vgproto.h
19 DESDEFS = -DHASDES -DHASXDMAUTH -DSILLYEXPORTRULE
35 # define UsePamLibrary NO
48 #ifdef SunArchitecture
49 SOLARIS_SRCS = solaris.c
50 SOLARIS_OBJS = solaris.o
56 #if defined(SunArchitecture) && !UsePamLibrary
60 XDMDIR = $(CDE_LOGFILES_TOP)
62 /****************** DTLOGIN ARCHIVE SECTION *****************
63 A better long-term solution is a dtgreet subdirectory since dtgreet
64 is built with shared libraries.
65 dtlogin is always built archived in HP because of
66 its importance for user startup. DEPLIBS needs to be explicitly set
67 because default is null DEPLIBS for shared libraries.
68 Does this need to be ifdef'd hp? */
70 LOGINDEPXMULIB = $(DEPXMULIB)
71 LOGINXMULIB = $(XMULIB)
72 LOGINDEPXLIB = $(DEPXLIB)
76 # if (! defined(UseInstalled)) && (! defined(UseMitLibrariesFromSystemOnly))
78 LOGINDEPXMULIB = $(XMUSRC)/libXmu.a
79 LOGINXMULIB = $(LOGINDEPXMULIB)
80 LOGINDEPXLIB = $(XLIBSRC)/libX11.a
81 LOGINXLIB = $(LOGINDEPXLIB)
82 /* This is really a kludge !! */
83 LOGINLDOPTIONS = -Wl,-a archive
86 # if OSMajorVersion >= 10
91 #if defined(SunArchitecture)
92 /* note: libcmd.a is a Sun static private lib for login related work.
93 * It should come before $(PAM_LIB) in link line, at least when compiled
94 * on Solaris 2.4 and run on Solaris 2.5. In Solaris 2.4 some of
95 * libcmd.a functions are also in libauth.so. But on Solaris 2.5
96 * these Sun private functions have been removed from libauth.so. */
97 SYS_LIBRARIES = -lm -ldl -lgen -lresolv -lC -lbsm -lcmd -lauth $(PAM_LIB)
101 EXTRA_DEFINES = -DPAM
103 EXTRA_DEFINES = -DSUNAUTH
107 #if defined(USLArchitecture)
108 SYS_LIBRARIES = -lm -ldl -lgen -lresolv
111 #if defined(UXPArchitecture)
112 SYS_LIBRARIES = -lm -ldl -lgen -lresolv
115 #if defined(RsArchitecture)
119 #ifdef AlphaArchitecture
120 SYS_LIBRARIES = -lm -lXdmcp
123 #if defined(LinuxArchitecture) || defined(FreeBSDArchitecture)
124 SYS_LIBRARIES = -lm -lcrypt
125 /* just use the system provided Xau and Xdmcp*/
130 /* Add in freetype header locations, required for modern Motif libs */
131 #ifdef LinuxArchitecture
132 INCLUDES = -I/usr/include/freetype2
135 #if defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture)
136 INCLUDES = -I$(XPROJECTROOT)/include/freetype2
139 /**************************************************************************
141 * Source and object modules
143 * SRCS1 = Dtlogin sources
144 * OBJS1 = Dtlogin objects
146 * SRCS2 = Dtgreet sources
147 * OBJS2 = Dtgreet objects
149 * SRCS3 = Dtchooser sources
150 * OBJS3 - Dtchooser objects
152 **************************************************************************/
156 SRCS1 = access.c account.c auth.c genauth.c daemon.c dm.c \
157 dpylist.c error.c file.c mitauth.c protodpy.c policy.c \
158 reset.c resource.c server.c session.c socket.c util.c \
159 verify.c version.c apollo.c sysauth.c fontpath.c $(DESSRCS) \
160 qualify.c usl_ptty.c choose.c netaddr.c xdmcp.c \
161 $(PAM_SRCS) $(SOLARIS_SRCS)
163 OBJS1 = access.o account.o auth.o genauth.o daemon.o dm.o \
164 dpylist.o error.o file.o mitauth.o protodpy.o policy.o \
165 reset.o resource.o server.o session.o socket.o util.o \
166 verify.o version.o apollo.o sysauth.o fontpath.o $(DESOBJS) \
167 qualify.o usl_ptty.o choose.o netaddr.o xdmcp.o \
168 $(PAM_OBJS) $(SOLARIS_OBJS)
171 #ifdef AlphaArchitecture
172 SRCS2 = vgcallback.c vglogo.c vgmain.c vgutil.c \
173 vgversion.c vgapollo.c vglang.c vgsiaform.c
174 OBJS2 = vgcallback.o vglogo.o vgmain.o vgutil.o \
175 vgversion.o vgapollo.o vglang.o vgsiaform.o
177 SRCS2 = vgcallback.c vglogo.c vgmain.c vgutil.c \
178 vgversion.c vgapollo.c vglang.c
179 OBJS2 = vgcallback.o vglogo.o vgmain.o vgutil.o \
180 vgversion.o vgapollo.o vglang.o
184 SRCS3 = chooser.c dtchooser.c vglogo.c vgutil.c \
185 vgcallback.c vglang.c
186 OBJS3 = chooser.o dtchooser.o vglogo.o vgutil.o \
187 vgcallback.o vglang.o
189 PROGRAMS = $(PROG1) $(PROG2) $(PROG3)
191 /**************************************************************************
195 **************************************************************************/
197 #if defined (SunArchitecture)
198 NATIVEXBINDIR = /usr/openwin/bin
200 NATIVEXBINDIR = /usr/bin/X11
203 SIGDEFS = $(SIGNAL_DEFINES)
205 XBINDIR = $(XPROJECTROOT)/bin
206 OSMAJORVERSION = OSMajorVersion
207 OSMINORVERSION = OSMinorVersion
208 DTDEFINES = $(DESDEFS) ConnectionFlags \
209 -DBINDIR=\"$(XBINDIR)\" -DXDMDIR=\"$(XDMDIR)\" $(SIGDEFS) \
210 -DOSMAJORVERSION=$(OSMAJORVERSION) \
211 -DOSMINORVERSION=$(OSMINORVERSION) \
212 -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
213 -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\"
215 #if defined (HPArchitecture)
216 DEFINES = $(DTDEFINES) -D_XPG2 -DAUDIT -DBYPASSLOGIN ServerExtraDefines
217 #elif defined (RsArchitecture)
218 DEFINES = $(DTDEFINES) -D_ILS_MACROS -DBSD44SOCKETS \
219 -D__NetBSD__ -DENABLE_DYNAMIC_LANGLIST
220 #elif defined (AlphaArchitecture)
221 DEFINES = $(DTDEFINES) -DXDMCP -DSIA
223 DEFINES = $(DTDEFINES) -D_NO_PROTO
227 XCOMM Special definitions for compiling default resources; these parameters
228 XCOMM should be set in util/imake.includes/site.def or the appropriate .macros
229 XCOMM file in that directory. The lack of initial spaces is to prevent imake
230 XCOMM from accidently turning the lines into rules by putting a leading tab.
232 XCOMM Do NOT change these lines!
234 DEF_SERVER = $(XBINDIR)/X
235 DEF_USER_PATH = DefaultUserPath:/usr/ccs/bin:$(NATIVEXBINDIR):$(XBINDIR)
236 DEF_SYSTEM_PATH = DefaultSystemPath:$(NATIVEXBINDIR):$(XBINDIR)
237 BOURNE_SHELL = DefaultSystemShell
239 DEF_BM_PATH = /etc/dt/appconfig/icons/%L/%B%M.bm:/etc/dt/appconfig/icons/%L/%B%M.pm:/etc/dt/appconfig/icons/%L/%B:/etc/dt/appconfig/icons/C/%B%M.bm:/etc/dt/appconfig/icons/C/%B%M.pm:/etc/dt/appconfig/icons/C/%B:/usr/dt/appconfig/icons/%L/%B%M.bm:/usr/dt/appconfig/icons/%L/%B%M.pm:/usr/dt/appconfig/icons/%L/%B:/usr/dt/appconfig/icons/C/%B%M.bm:/usr/dt/appconfig/icons/C/%B%M.pm:/usr/dt/appconfig/icons/C/%B
240 DEF_PM_PATH=/etc/dt/appconfig/icons/%L/%B%M.pm:/etc/dt/appconfig/icons/%L/%B%M.bm:/etc/dt/appconfig/icons/%L/%B:/etc/dt/appconfig/icons/C/%B%M.pm:/etc/dt/appconfig/icons/C/%B%M.bm:/etc/dt/appconfig/icons/C/%B:/usr/dt/appconfig/icons/%L/%B%M.pm:/usr/dt/appconfig/icons/%L/%B%M.bm:/usr/dt/appconfig/icons/%L/%B:/usr/dt/appconfig/icons/C/%B%M.pm:/usr/dt/appconfig/icons/C/%B%M.bm:/usr/dt/appconfig/icons/C/%B
242 RES_DEFINES = '-DDEF_SERVER_LINE=":0 Local local $(DEF_SERVER) :0"' \
243 '-DXRDB_PROGRAM="$(XBINDIR)/xrdb"' \
244 '-DDEF_USER_PATH="$(DEF_USER_PATH)"' \
245 '-DDEF_SYSTEM_PATH="$(DEF_SYSTEM_PATH)"' \
246 '-DDEF_FAILSAFE_CLIENT="$(XBINDIR)/xterm"' \
247 '-DDEF_AUTH_FILE="$(XDMDIR)/auth-server"' \
248 '-DDEF_AUTH_DIR="$(XDMDIR)"' \
249 '-DCPP_PROGRAM="$(CPP_PROGRAM)"' \
250 '-DDEF_PM_SEARCH_PATH="$(DEF_PM_PATH)"' \
251 '-DDEF_BM_SEARCH_PATH="$(DEF_BM_PATH)"'
254 XCOMM These -D flags had to be taken out of the RES_DEFINES macro in order
255 XCOMM to get around a buffer limitation in the Sun C compiler code generation
256 XCOMM phase. The code generation phase creates a temporary assembler file
257 XCOMM containing the command line to the compiler and all the .ident pragmas.
258 XCOMM With resent changes to the Imakefile, the command line had gotten so
259 XCOMM long that it exceeded an internal buffer length resulting in errors in
260 XCOMM the generated assembler code. The EXTRA_RES_DEFINES were extracted
261 XCOMM from the RES_DEFINES macro in order to shorten the command line on
262 XCOMM the Sun platform. These particular -D flags were chosen as the
263 XCOMM least likely to change or be system dependent.
265 #ifdef SunArchitecture
268 EXTRA_RES_DEFINES = \
269 '-DDEF_SESSION="$(CDE_INSTALLATION_TOP)/bin/Xsession"' \
270 '-DDEF_SYSTEM_SHELL="$(BOURNE_SHELL)"' \
271 '-DDEF_CHOOSER="$(CDE_INSTALLATION_TOP)/bin/dtchooser"' \
272 '-DDEF_XDM_CONFIG="Xconfig"'
277 /**************************************************************************
281 * BASE_LIBS1 = dtlogin base libraries
282 * BASE_LIBS2 = dtgreet base libraries
284 **************************************************************************/
287 DEPLIBS1 = $(DEPXAUTHLIB) $(DEPXDMCPLIB) $(LOGINDEPXMULIB) $(LOGINDEPXLIB)
288 DEPLIBS2 = $(DEPDTWIDGETLIB) $(DEPDTSVCLIB) $(DEPTTLIB) $(DEPXMLIB) \
289 $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
290 DEPLIBS3 = $(DEPXDMCPLIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
292 BASE_LIBS1 = $(XAUTHLIB) $(LOGINXMULIB) $(XDMCPLIB) $(LOGINXLIB)
293 BASE_LIBS2 = $(DTWIDGETLIB) $(DTSVCLIB) $(TTLIB) $(XMLIB) \
294 $(XTOOLLIB) $(XPLIB) $(XLIB)
295 BASE_LIBS3 = $(DTWIDGETLIB) $(DTSVCLIB) $(TTLIB) $(XDMCPLIB) $(XMLIB) \
296 $(XTOOLLIB) $(XPLIB) $(XLIB)
298 LOCAL_LIBRARIES1 = $(BASE_LIBS1) $(IAFSYSLIB)
299 LOCAL_LIBRARIES2 = $(BASE_LIBS2)
300 LOCAL_LIBRARIES3 = $(BASE_LIBS3)
303 /* USL needs to resolve all Xt symbols invoked by Xmu at shared
305 * Likewise for the BMS references from libDt for vuegreet.
307 #if defined(USLArchitecture)
308 # if HasSharedLibraries
309 BASE_LIBS1 = $(XAUTHLIB) $(LOGINXMULIB) $(XDMCPLIB) $(XTOOLLIB) \
311 BASE_LIBS2 = $(DTWIDGETLIB) $(DTSVCLIB) $(TTLIB) \
312 $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
316 #if defined(UXPArchitecture)
317 # if HasSharedLibraries
318 BASE_LIBS1 = $(XAUTHLIB) $(LOGINXMULIB) $(XDMCPLIB) $(XTOOLLIB) \
320 BASE_LIBS2 = $(DTWIDGETLIB) $(DTSVCLIB) $(TTLIB) \
321 $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
327 /**************************************************************************
329 * Extra things for the HP-UX BLS version
331 **************************************************************************/
334 # ifdef HPArchitecture
335 # if (OSMajorVersion == 8) && (OSMinorVersion == 8)
344 EXTRA_DEFINES = -UAUDIT -D_NO_PROTO
345 EXTRA_CFLAGS = -Wp,-H256000
346 EXTRA_LIBRARIES = $(BLSLIBSRC)/libbls.a -lsec ExtraLibraries
347 STD_CPP_DEFINES = -DSYSV -DBLS
352 /**************************************************************************
354 * Extra things for the Kerberos/AFS version (dtlogin.krb)
356 **************************************************************************/
362 KRBLIBSRC = $(LIBSRC)/krb
363 DEPKRBLIB = $(KRBLIBSRC)/libkrb.a
364 KRBLIB = $(DEPKRBLIB)
366 DESLIBSRC = $(LIBSRC)/des
367 DEPDESLIB = $(DESLIBSRC)/libdes.a
368 DESLIB = $(DEPDESLIB)
370 KRBINCLUDESRC = $(KRBLIBSRC)/include
372 AFSINCLUDESRC = $(AFSLIBSRC)
373 EXTRA_INCLUDES = -I$(KRBINCLUDESRC) -I$(AFSINCLUDESRC)
374 EXTRA_DEFINES = -D__KERBEROS -D__AFS
376 LOCAL_LIBRARIES1 = $(BASE_LIBS1) \
379 $(AFSLIBSRC)/libafsutil.a \
380 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libdes.a
382 LOCAL_LIBRARIES2 = $(BASE_LIBS2) \
384 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libkauth.a \
385 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libprot.a \
386 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libubik.a \
387 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libauth.a \
388 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/librxkad.a \
389 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libsys.a \
390 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libdes.a \
391 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/librx.a \
392 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/liblwp.a \
393 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libcom_err.a \
394 $(AFSLIBSRC)/libafsutil.a \
400 /**************************************************************************
402 * Extra things for the Passwd Etc. version (dtlogin.rgy)
404 **************************************************************************/
407 EXTRA_INCLUDES = -I$(RGYINCLUDESRC)
408 EXTRA_DEFINES = -D__PASSWD_ETC +e
409 EXTRA_LIBRARIES = $(RGYLIB) $(NCKLIB) -lndbm -lBSD ExtraLibraries
414 /**************************************************************************
416 * Extra things for Dtge
418 * HIDDEN_SYMBOLS1 = dtlogin hidden symbols
419 * HIDDEN_SYMBOLS2 = dtgreet hidden symbols
421 **************************************************************************/
423 #ifdef HPArchitecture
426 HIDDEN_SYMBOLS1 = -h _main -h _BecomeDaemon -h _GetHourGlass \
428 HIDDEN_SYMBOLS2 = -h _main -h _LogError -h _PingServer
432 HIDDEN_SYMBOLS1 = -h main -h BecomeDaemon -h GetHourGlass \
434 HIDDEN_SYMBOLS2 = -h main -h LogError -h PingServer
441 /**************************************************************************
445 **************************************************************************/
447 #if defined(USE_KRB) || defined(USE_RGY)
449 @for i in $(SRCS1) $(SRCS2) $(HEADERS); do \
451 echo "linking $(DTLOGINSRC)/$$i to $$i";\
452 ln -f -s $(DTLOGINSRC)/$$i .; \
457 ComplexProgramTarget_1($(PROG1),$(LOCAL_LIBRARIES1), $(LOGINLDOPTIONS))
458 ComplexProgramTarget_2($(PROG2),$(LOCAL_LIBRARIES2), /**/)
459 ComplexProgramTarget_3($(PROG3),$(LOCAL_LIBRARIES3), /**/)
462 /* Problem with "-O" in dtgreet ... wrong size login widget. */
463 /* Override "-O" (xO2) with "-xO1". */
466 $(CC) -c $(CFLAGS) -xO1 $(_NOOP_) $*.c
469 SpecialObjectRule(resource.o, $(ICONFIGFILES), $(EXTRA_RES_DEFINES) $(RES_DEFINES) $(CCINLIBS))
470 #ifdef HPArchitecture
472 SpecialObjectRule(session.o,,+O1 $(CCINLIBS))
476 #if !defined(USE_KRB) && !defined(USE_RGY)
478 LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
479 -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
480 -DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP)
482 #endif /* USE_KRB && USE_RGY */
485 MakeDirectories(install,$(XDMDIR))
489 * Don't install; let people read the instructions about putting in the
490 * abort-display() resource:
493 InstallProgramWithFlags(xdmshell,$(XBINDIR), /**/)
496 #if !defined(USE_KRB) && !defined(USE_RGY)
497 /***** For dtge make a client_OBJS.o using client_main.o ******/
498 /***** This implies the existence of client_main.c ******/
499 # ifdef BuildHugeObject
500 # if defined (HPArchitecture) && ! defined (BLS)
501 SpecialRelocatableTarget(dtlogin,$(HIDDEN_SYMBOLS1),$(OBJS1))
502 SpecialRelocatableTarget(dtgreet,$(HIDDEN_SYMBOLS2),$(OBJS2))