1 XCOMM $TOG: Imakefile /main/21 1999/03/01 18:26:06 mgreess $
3 #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
5 SUBDIRS = config $(XDMSUBDIRS) $(BLSSUBDIRS) $(AFSSUBDIRS)
8 XINOPT = -DUSE_XINERAMA
9 XINLIB = -lDtXinerama -lXinerama
12 MakeSubdirs($(SUBDIRS))
13 DependSubdirs($(SUBDIRS))
16 XDMCONFIGDIR = XdmConfigurationSubdirectory
17 XDMSUBDIRS = $(XDMCONFIGDIR) bootxutil
20 /* please list any new dtlogin headers for use by krb and rgy */
21 HEADERS = dm.h vg.h vglogo.h vgmsg.h vgproto.h
24 DESDEFS = -DHASDES -DHASXDMAUTH -DSILLYEXPORTRULE
40 # define UsePamLibrary NO
53 #ifdef SunArchitecture
54 SOLARIS_SRCS = solaris.c
55 SOLARIS_OBJS = solaris.o
61 #if defined(SunArchitecture) && !UsePamLibrary
62 /* Unsure when libauth went away */
63 # if (OSMajorVersion == 5) && (OSMinorVersion < 5)
72 XDMDIR = $(CDE_LOGFILES_TOP)
74 /****************** DTLOGIN ARCHIVE SECTION *****************
75 A better long-term solution is a dtgreet subdirectory since dtgreet
76 is built with shared libraries.
77 dtlogin is always built archived in HP because of
78 its importance for user startup. DEPLIBS needs to be explicitly set
79 because default is null DEPLIBS for shared libraries.
80 Does this need to be ifdef'd hp? */
82 LOGINDEPXMULIB = $(DEPXMULIB)
83 LOGINXMULIB = $(XMULIB)
84 LOGINDEPXLIB = $(DEPXLIB)
88 # if (! defined(UseInstalled)) && (! defined(UseMitLibrariesFromSystemOnly))
90 LOGINDEPXMULIB = $(XMUSRC)/libXmu.a
91 LOGINXMULIB = $(LOGINDEPXMULIB)
92 LOGINDEPXLIB = $(XLIBSRC)/libX11.a
93 LOGINXLIB = $(LOGINDEPXLIB)
94 /* This is really a kludge !! */
95 LOGINLDOPTIONS = -Wl,-a archive
98 # if OSMajorVersion >= 10
103 #if defined(SunArchitecture)
104 /* note: libcmd.a is a Sun static private lib for login related work.
105 * It should come before $(PAM_LIB) in link line, at least when compiled
106 * on Solaris 2.4 and run on Solaris 2.5. In Solaris 2.4 some of
107 * libcmd.a functions are also in libauth.so. But on Solaris 2.5
108 * these Sun private functions have been removed from libauth.so. */
109 SYS_LIBRARIES = -lm -ldl -lgen -lresolv -lbsm -lcmd $(PAM_LIB)
110 EXTRA_DEFINES = -DPAM
114 EXTRA_DEFINES = -DPAM
118 #if defined(USLArchitecture)
119 SYS_LIBRARIES = -lm -ldl -lgen -lresolv
122 #if defined(UXPArchitecture)
123 SYS_LIBRARIES = -lm -ldl -lgen -lresolv
126 #if defined(RsArchitecture)
130 #ifdef AlphaArchitecture
131 SYS_LIBRARIES = -lm -lXdmcp
134 #if defined(LinuxArchitecture) || \
135 defined(FreeBSDArchitecture) || defined(NetBSDArchitecture)
136 SYS_LIBRARIES = -lm -lcrypt
137 EXTRA_DEFINES = $(XINOPT)
138 LOGINXLIB = $(XLIB) $(XINLIB)
139 /* just use the system provided Xau and Xdmcp*/
144 /* Add in freetype header locations, required for modern Motif libs */
145 #ifdef LinuxArchitecture
146 INCLUDES = -I/usr/include/freetype2
149 #if defined(BSDArchitecture)
150 INCLUDES = -I$(XPROJECTROOT)/include/freetype2
153 /**************************************************************************
155 * Source and object modules
157 * SRCS1 = Dtlogin sources
158 * OBJS1 = Dtlogin objects
160 * SRCS2 = Dtgreet sources
161 * OBJS2 = Dtgreet objects
163 * SRCS3 = Dtchooser sources
164 * OBJS3 - Dtchooser objects
166 **************************************************************************/
170 SRCS1 = access.c account.c auth.c genauth.c daemon.c dm.c \
171 dpylist.c error.c file.c mitauth.c protodpy.c policy.c \
172 reset.c resource.c server.c session.c socket.c util.c \
173 verify.c version.c apollo.c sysauth.c fontpath.c $(DESSRCS) \
174 qualify.c usl_ptty.c choose.c netaddr.c xdmcp.c \
175 $(PAM_SRCS) $(SOLARIS_SRCS)
177 OBJS1 = access.o account.o auth.o genauth.o daemon.o dm.o \
178 dpylist.o error.o file.o mitauth.o protodpy.o policy.o \
179 reset.o resource.o server.o session.o socket.o util.o \
180 verify.o version.o apollo.o sysauth.o fontpath.o $(DESOBJS) \
181 qualify.o usl_ptty.o choose.o netaddr.o xdmcp.o \
182 $(PAM_OBJS) $(SOLARIS_OBJS)
185 #ifdef AlphaArchitecture
186 SRCS2 = vgcallback.c vglogo.c vgmain.c vgutil.c \
187 vgversion.c vgapollo.c vglang.c vgsiaform.c
188 OBJS2 = vgcallback.o vglogo.o vgmain.o vgutil.o \
189 vgversion.o vgapollo.o vglang.o vgsiaform.o
191 SRCS2 = vgcallback.c vglogo.c vgmain.c vgutil.c \
192 vgversion.c vgapollo.c vglang.c
193 OBJS2 = vgcallback.o vglogo.o vgmain.o vgutil.o \
194 vgversion.o vgapollo.o vglang.o
198 SRCS3 = chooser.c dtchooser.c vglogo.c vgutil.c \
199 vgcallback.c vglang.c
200 OBJS3 = chooser.o dtchooser.o vglogo.o vgutil.o \
201 vgcallback.o vglang.o
203 PROGRAMS = $(PROG1) $(PROG2) $(PROG3)
205 /**************************************************************************
209 **************************************************************************/
211 #if defined (SunArchitecture)
212 NATIVEXBINDIR = /usr/openwin/bin
213 #elif defined(FreeBSDArchitecture)
214 NATIVEXBINDIR = /usr/local/bin
215 #elif defined(OpenBSDArchitecture)
216 NATIVEXBINDIR = /usr/X11R6/bin
217 #elif defined(NetBSDArchitecture)
218 NATIVEXBINDIR = /usr/X11R7/bin
220 NATIVEXBINDIR = /usr/bin/X11
223 SIGDEFS = $(SIGNAL_DEFINES)
225 XBINDIR = $(XPROJECTROOT)/bin
226 OSMAJORVERSION = OSMajorVersion
227 OSMINORVERSION = OSMinorVersion
228 DTDEFINES = $(DESDEFS) ConnectionFlags \
229 -DBINDIR=\"$(XBINDIR)\" -DXDMDIR=\"$(XDMDIR)\" $(SIGDEFS) \
230 -DOSMAJORVERSION=$(OSMAJORVERSION) \
231 -DOSMINORVERSION=$(OSMINORVERSION) \
232 -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
233 -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\"
235 DEPEND_DEFINES = $(DEPENDDEFINES)
236 #if defined (HPArchitecture)
237 DEFINES = $(DTDEFINES) -D_XPG2 -DAUDIT -DBYPASSLOGIN ServerExtraDefines
238 #elif defined (RsArchitecture)
239 DEFINES = $(DTDEFINES) -D_ILS_MACROS -DBSD44SOCKETS \
240 -D__NetBSD__ -DENABLE_DYNAMIC_LANGLIST
241 #elif defined (AlphaArchitecture)
242 DEFINES = $(DTDEFINES) -DXDMCP -DSIA
243 #elif defined (LinuxArchitecture)
244 DEFINES = $(DTDEFINES) -DXDMCP
245 #elif defined (OpenBSDArchitecture)
246 DEFINES = $(DTDEFINES) -DXDMCP
247 #elif defined (FreeBSDArchitecture)
248 DEFINES = $(DTDEFINES) -DXDMCP
250 DEFINES = $(DTDEFINES) -D_NO_PROTO
254 XCOMM Special definitions for compiling default resources; these parameters
255 XCOMM should be set in util/imake.includes/site.def or the appropriate .macros
256 XCOMM file in that directory. The lack of initial spaces is to prevent imake
257 XCOMM from accidently turning the lines into rules by putting a leading tab.
259 XCOMM Do NOT change these lines!
261 DEF_SERVER = $(XBINDIR)/X
262 DEF_USER_PATH = DefaultUserPath:/usr/ccs/bin:$(NATIVEXBINDIR):$(XBINDIR)
263 DEF_SYSTEM_PATH = DefaultSystemPath:$(NATIVEXBINDIR):$(XBINDIR)
264 BOURNE_SHELL = DefaultSystemShell
266 DEF_BM_PATH = $(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B
267 DEF_PM_PATH=$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B
269 RES_DEFINES = '-DDEF_SERVER_LINE=":0 Local local $(DEF_SERVER) :0"' \
270 '-DXRDB_PROGRAM="$(XBINDIR)/xrdb"' \
271 '-DDEF_USER_PATH="$(DEF_USER_PATH)"' \
272 '-DDEF_SYSTEM_PATH="$(DEF_SYSTEM_PATH)"' \
273 '-DDEF_FAILSAFE_CLIENT="$(XBINDIR)/xterm"' \
274 '-DDEF_AUTH_FILE="$(XDMDIR)/auth-server"' \
275 '-DDEF_AUTH_DIR="$(XDMDIR)"' \
276 '-DCPP_PROGRAM="$(CPP_PROGRAM)"' \
277 '-DDEF_PM_SEARCH_PATH="$(DEF_PM_PATH)"' \
278 '-DDEF_BM_SEARCH_PATH="$(DEF_BM_PATH)"'
281 XCOMM These -D flags had to be taken out of the RES_DEFINES macro in order
282 XCOMM to get around a buffer limitation in the Sun C compiler code generation
283 XCOMM phase. The code generation phase creates a temporary assembler file
284 XCOMM containing the command line to the compiler and all the .ident pragmas.
285 XCOMM With resent changes to the Imakefile, the command line had gotten so
286 XCOMM long that it exceeded an internal buffer length resulting in errors in
287 XCOMM the generated assembler code. The EXTRA_RES_DEFINES were extracted
288 XCOMM from the RES_DEFINES macro in order to shorten the command line on
289 XCOMM the Sun platform. These particular -D flags were chosen as the
290 XCOMM least likely to change or be system dependent.
292 #ifdef SunArchitecture
295 EXTRA_RES_DEFINES = \
296 '-DDEF_SESSION="$(CDE_INSTALLATION_TOP)/bin/Xsession"' \
297 '-DDEF_SYSTEM_SHELL="$(BOURNE_SHELL)"' \
298 '-DDEF_CHOOSER="$(CDE_INSTALLATION_TOP)/bin/dtchooser"' \
299 '-DDEF_XDM_CONFIG="Xconfig"'
304 /**************************************************************************
308 * BASE_LIBS1 = dtlogin base libraries
309 * BASE_LIBS2 = dtgreet base libraries
311 **************************************************************************/
314 DEPLIBS1 = $(DEPXAUTHLIB) $(DEPXDMCPLIB) $(LOGINDEPXMULIB) $(LOGINDEPXLIB)
315 DEPLIBS2 = $(DEPDTWIDGETLIB) $(DEPDTSVCLIB) $(DEPTTLIB) $(DEPXMLIB) \
316 $(DEPXTOOLLIB) $(DEPXLIB)
317 DEPLIBS3 = $(DEPXDMCPLIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
319 BASE_LIBS1 = $(XAUTHLIB) $(LOGINXMULIB) $(XDMCPLIB) $(LOGINXLIB)
320 BASE_LIBS2 = $(DTWIDGETLIB) $(DTSVCLIB) $(TTLIB) $(XMLIB) \
321 $(XTOOLLIB) $(XLIB) $(XINLIB)
322 BASE_LIBS3 = $(DTWIDGETLIB) $(DTSVCLIB) $(TTLIB) $(XDMCPLIB) $(XMLIB) \
323 $(XTOOLLIB) $(XLIB) $(XINLIB)
325 LOCAL_LIBRARIES1 = $(BASE_LIBS1) $(IAFSYSLIB)
326 LOCAL_LIBRARIES2 = $(BASE_LIBS2)
327 LOCAL_LIBRARIES3 = $(BASE_LIBS3)
330 /* USL needs to resolve all Xt symbols invoked by Xmu at shared
332 * Likewise for the BMS references from libDt for vuegreet.
334 #if defined(USLArchitecture)
335 # if HasSharedLibraries
336 BASE_LIBS1 = $(XAUTHLIB) $(LOGINXMULIB) $(XDMCPLIB) $(XTOOLLIB) \
338 BASE_LIBS2 = $(DTWIDGETLIB) $(DTSVCLIB) $(TTLIB) \
339 $(XMLIB) $(XTOOLLIB) $(XLIB)
343 #if defined(UXPArchitecture)
344 # if HasSharedLibraries
345 BASE_LIBS1 = $(XAUTHLIB) $(LOGINXMULIB) $(XDMCPLIB) $(XTOOLLIB) \
347 BASE_LIBS2 = $(DTWIDGETLIB) $(DTSVCLIB) $(TTLIB) \
348 $(XMLIB) $(XTOOLLIB) $(XLIB)
354 /**************************************************************************
356 * Extra things for the HP-UX BLS version
358 **************************************************************************/
361 # ifdef HPArchitecture
362 # if (OSMajorVersion == 8) && (OSMinorVersion == 8)
371 EXTRA_DEFINES = -UAUDIT -D_NO_PROTO
372 EXTRA_CFLAGS = -Wp,-H256000
373 EXTRA_LIBRARIES = $(BLSLIBSRC)/libbls.a -lsec ExtraLibraries
374 STD_CPP_DEFINES = -DSYSV -DBLS
379 /**************************************************************************
381 * Extra things for the Kerberos/AFS version (dtlogin.krb)
383 **************************************************************************/
389 KRBLIBSRC = $(LIBSRC)/krb
390 DEPKRBLIB = $(KRBLIBSRC)/libkrb.a
391 KRBLIB = $(DEPKRBLIB)
393 DESLIBSRC = $(LIBSRC)/des
394 DEPDESLIB = $(DESLIBSRC)/libdes.a
395 DESLIB = $(DEPDESLIB)
397 KRBINCLUDESRC = $(KRBLIBSRC)/include
399 AFSINCLUDESRC = $(AFSLIBSRC)
400 EXTRA_INCLUDES = -I$(KRBINCLUDESRC) -I$(AFSINCLUDESRC)
401 EXTRA_DEFINES = -D__KERBEROS -D__AFS
403 LOCAL_LIBRARIES1 = $(BASE_LIBS1) \
406 $(AFSLIBSRC)/libafsutil.a \
407 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libdes.a
409 LOCAL_LIBRARIES2 = $(BASE_LIBS2) \
411 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libkauth.a \
412 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libprot.a \
413 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libubik.a \
414 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libauth.a \
415 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/librxkad.a \
416 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libsys.a \
417 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libdes.a \
418 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/librx.a \
419 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/liblwp.a \
420 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libcom_err.a \
421 $(AFSLIBSRC)/libafsutil.a \
427 /**************************************************************************
429 * Extra things for the Passwd Etc. version (dtlogin.rgy)
431 **************************************************************************/
434 EXTRA_INCLUDES = -I$(RGYINCLUDESRC)
435 EXTRA_DEFINES = -D__PASSWD_ETC +e
436 EXTRA_LIBRARIES = $(RGYLIB) $(NCKLIB) -lndbm -lBSD ExtraLibraries
441 /**************************************************************************
443 * Extra things for Dtge
445 * HIDDEN_SYMBOLS1 = dtlogin hidden symbols
446 * HIDDEN_SYMBOLS2 = dtgreet hidden symbols
448 **************************************************************************/
450 #ifdef HPArchitecture
453 HIDDEN_SYMBOLS1 = -h _main -h _BecomeDaemon -h _GetHourGlass \
455 HIDDEN_SYMBOLS2 = -h _main -h _LogError -h _PingServer
459 HIDDEN_SYMBOLS1 = -h main -h BecomeDaemon -h GetHourGlass \
461 HIDDEN_SYMBOLS2 = -h main -h LogError -h PingServer
468 /**************************************************************************
472 **************************************************************************/
474 #if defined(USE_KRB) || defined(USE_RGY)
476 @for i in $(SRCS1) $(SRCS2) $(HEADERS); do \
478 echo "linking $(DTLOGINSRC)/$$i to $$i";\
479 ln -f -s $(DTLOGINSRC)/$$i .; \
484 ComplexProgramTarget_1($(PROG1),$(LOCAL_LIBRARIES1), $(LOGINLDOPTIONS))
485 ComplexProgramTarget_2($(PROG2),$(LOCAL_LIBRARIES2), /**/)
486 ComplexProgramTarget_3($(PROG3),$(LOCAL_LIBRARIES3), /**/)
489 /* Problem with "-O" in dtgreet ... wrong size login widget. */
490 /* Override "-O" (xO2) with "-xO1". */
493 $(CC) -c $(CFLAGS) -xO1 $(_NOOP_) $*.c
496 SpecialObjectRule(resource.o, $(ICONFIGFILES), $(EXTRA_RES_DEFINES) $(RES_DEFINES) $(CCINLIBS))
497 #ifdef HPArchitecture
499 SpecialObjectRule(session.o,,+O1 $(CCINLIBS))
503 #if !defined(USE_KRB) && !defined(USE_RGY)
505 LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
506 -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
507 -DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP)
509 #endif /* USE_KRB && USE_RGY */
512 MakeDirectories(install,$(XDMDIR))
516 * Don't install; let people read the instructions about putting in the
517 * abort-display() resource:
520 InstallProgramWithFlags(xdmshell,$(XBINDIR), /**/)
523 #if !defined(USE_KRB) && !defined(USE_RGY)
524 /***** For dtge make a client_OBJS.o using client_main.o ******/
525 /***** This implies the existence of client_main.c ******/
526 # ifdef BuildHugeObject
527 # if defined (HPArchitecture) && ! defined (BLS)
528 SpecialRelocatableTarget(dtlogin,$(HIDDEN_SYMBOLS1),$(OBJS1))
529 SpecialRelocatableTarget(dtgreet,$(HIDDEN_SYMBOLS2),$(OBJS2))