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
38 # define UsePamLibrary NO
51 #ifdef SunArchitecture
52 SOLARIS_SRCS = solaris.c
53 SOLARIS_OBJS = solaris.o
59 #if defined(SunArchitecture) && !UsePamLibrary
60 /* Unsure when libauth went away */
61 # if (OSMajorVersion == 5) && (OSMinorVersion < 5)
70 XDMDIR = $(CDE_LOGFILES_TOP)
72 /****************** DTLOGIN ARCHIVE SECTION *****************
73 A better long-term solution is a dtgreet subdirectory since dtgreet
74 is built with shared libraries.
75 dtlogin is always built archived in HP because of
76 its importance for user startup. DEPLIBS needs to be explicitly set
77 because default is null DEPLIBS for shared libraries.
78 Does this need to be ifdef'd hp? */
80 LOGINDEPXMULIB = $(DEPXMULIB)
81 LOGINXMULIB = $(XMULIB)
82 LOGINDEPXLIB = $(DEPXLIB)
86 # if !defined(UseInstalled) && !defined(UseMitLibrariesFromSystemOnly) && \
88 LOGINDEPXMULIB = $(XMUSRC)/libXmu.a
89 LOGINXMULIB = $(LOGINDEPXMULIB)
90 LOGINDEPXLIB = $(XLIBSRC)/libX11.a
91 LOGINXLIB = $(LOGINDEPXLIB)
92 /* This is really a kludge !! */
93 LOGINLDOPTIONS = -Wl,-a archive
95 # if OSMajorVersion >= 10
100 #if defined(SunArchitecture)
101 /* note: libcmd.a is a Sun static private lib for login related work.
102 * It should come before $(PAM_LIB) in link line, at least when compiled
103 * on Solaris 2.4 and run on Solaris 2.5. In Solaris 2.4 some of
104 * libcmd.a functions are also in libauth.so. But on Solaris 2.5
105 * these Sun private functions have been removed from libauth.so. */
106 SYS_LIBRARIES = -lm -ldl -lgen -lresolv -lbsm -lcmd $(PAM_LIB)
107 EXTRA_DEFINES = -DPAM
111 EXTRA_DEFINES = -DPAM
115 #if defined(RsArchitecture)
119 #ifdef AlphaArchitecture
120 SYS_LIBRARIES = -lm -lXdmcp
123 #if defined(LinuxArchitecture) || \
124 defined(FreeBSDArchitecture) || defined(NetBSDArchitecture)
125 SYS_LIBRARIES = -lm -lcrypt
126 EXTRA_DEFINES = $(XINOPT)
127 LOGINXLIB = $(XLIB) $(XINLIB)
128 /* just use the system provided Xau and Xdmcp*/
133 /* Add in freetype header locations, required for modern Motif libs */
134 #ifdef LinuxArchitecture
135 INCLUDES = -I/usr/include/freetype2
138 #if defined(BSDArchitecture)
139 INCLUDES = -I$(XPROJECTROOT)/include/freetype2
142 /**************************************************************************
144 * Source and object modules
146 * SRCS1 = Dtlogin sources
147 * OBJS1 = Dtlogin objects
149 * SRCS2 = Dtgreet sources
150 * OBJS2 = Dtgreet objects
152 * SRCS3 = Dtchooser sources
153 * OBJS3 - Dtchooser objects
155 **************************************************************************/
159 SRCS1 = access.c account.c auth.c genauth.c daemon.c dm.c \
160 dpylist.c error.c file.c mitauth.c protodpy.c policy.c \
161 reset.c resource.c server.c session.c socket.c util.c \
162 verify.c sysauth.c fontpath.c $(DESSRCS) qualify.c choose.c \
163 netaddr.c xdmcp.c $(PAM_SRCS) $(SOLARIS_SRCS)
165 OBJS1 = access.o account.o auth.o genauth.o daemon.o dm.o \
166 dpylist.o error.o file.o mitauth.o protodpy.o policy.o \
167 reset.o resource.o server.o session.o socket.o util.o \
168 verify.o sysauth.o fontpath.o $(DESOBJS) qualify.o choose.o \
169 netaddr.o xdmcp.o $(PAM_OBJS) $(SOLARIS_OBJS)
172 #ifdef AlphaArchitecture
173 SRCS2 = vgcallback.c vglogo.c vgmain.c vgutil.c vglang.c vgsiaform.c
174 OBJS2 = vgcallback.o vglogo.o vgmain.o vgutil.o vglang.o vgsiaform.o
176 SRCS2 = vgcallback.c vglogo.c vgmain.c vgutil.c vglang.c
177 OBJS2 = vgcallback.o vglogo.o vgmain.o vgutil.o vglang.o
181 SRCS3 = chooser.c dtchooser.c vglogo.c vgutil.c \
182 vgcallback.c vglang.c
183 OBJS3 = chooser.o dtchooser.o vglogo.o vgutil.o \
184 vgcallback.o vglang.o
186 PROGRAMS = $(PROG1) $(PROG2) $(PROG3)
188 /**************************************************************************
192 **************************************************************************/
194 #if defined (SunArchitecture)
195 NATIVEXBINDIR = /usr/openwin/bin
196 #elif defined(FreeBSDArchitecture)
197 NATIVEXBINDIR = /usr/local/bin
198 #elif defined(OpenBSDArchitecture)
199 NATIVEXBINDIR = /usr/X11R6/bin
200 #elif defined(NetBSDArchitecture)
201 NATIVEXBINDIR = /usr/X11R7/bin
203 NATIVEXBINDIR = /usr/bin/X11
206 SIGDEFS = $(SIGNAL_DEFINES)
208 XBINDIR = $(XPROJECTROOT)/bin
209 OSMAJORVERSION = OSMajorVersion
210 OSMINORVERSION = OSMinorVersion
211 DTDEFINES = $(DESDEFS) ConnectionFlags \
212 -DBINDIR=\"$(XBINDIR)\" -DXDMDIR=\"$(XDMDIR)\" $(SIGDEFS) \
213 -DOSMAJORVERSION=$(OSMAJORVERSION) \
214 -DOSMINORVERSION=$(OSMINORVERSION) \
215 -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
216 -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\"
218 DEPEND_DEFINES = $(DEPENDDEFINES)
219 #if defined (HPArchitecture)
220 DEFINES = $(DTDEFINES) -D_XPG2 -DAUDIT -DBYPASSLOGIN ServerExtraDefines
221 #elif defined (RsArchitecture)
222 DEFINES = $(DTDEFINES) -D_ILS_MACROS -DBSD44SOCKETS \
223 -D__NetBSD__ -DENABLE_DYNAMIC_LANGLIST
224 #elif defined (AlphaArchitecture)
225 DEFINES = $(DTDEFINES) -DXDMCP -DSIA
226 #elif defined (LinuxArchitecture)
227 DEFINES = $(DTDEFINES) -DXDMCP
228 #elif defined (OpenBSDArchitecture)
229 DEFINES = $(DTDEFINES) -DXDMCP
230 #elif defined (FreeBSDArchitecture)
231 DEFINES = $(DTDEFINES) -DXDMCP
233 DEFINES = $(DTDEFINES) -D_NO_PROTO
237 XCOMM Special definitions for compiling default resources; these parameters
238 XCOMM should be set in util/imake.includes/site.def or the appropriate .macros
239 XCOMM file in that directory. The lack of initial spaces is to prevent imake
240 XCOMM from accidently turning the lines into rules by putting a leading tab.
242 XCOMM Do NOT change these lines!
244 DEF_SERVER = $(XBINDIR)/X
245 DEF_USER_PATH = DefaultUserPath:/usr/ccs/bin:$(NATIVEXBINDIR):$(XBINDIR)
246 DEF_SYSTEM_PATH = DefaultSystemPath:$(NATIVEXBINDIR):$(XBINDIR)
247 BOURNE_SHELL = DefaultSystemShell
249 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
250 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
252 RES_DEFINES = '-DDEF_SERVER_LINE=":0 Local local $(DEF_SERVER) :0"' \
253 '-DXRDB_PROGRAM="$(XBINDIR)/xrdb"' \
254 '-DDEF_USER_PATH="$(DEF_USER_PATH)"' \
255 '-DDEF_SYSTEM_PATH="$(DEF_SYSTEM_PATH)"' \
256 '-DDEF_FAILSAFE_CLIENT="$(XBINDIR)/xterm"' \
257 '-DDEF_AUTH_FILE="$(XDMDIR)/auth-server"' \
258 '-DDEF_AUTH_DIR="$(XDMDIR)"' \
259 '-DCPP_PROGRAM="$(CPP_PROGRAM)"' \
260 '-DDEF_PM_SEARCH_PATH="$(DEF_PM_PATH)"' \
261 '-DDEF_BM_SEARCH_PATH="$(DEF_BM_PATH)"'
264 XCOMM These -D flags had to be taken out of the RES_DEFINES macro in order
265 XCOMM to get around a buffer limitation in the Sun C compiler code generation
266 XCOMM phase. The code generation phase creates a temporary assembler file
267 XCOMM containing the command line to the compiler and all the .ident pragmas.
268 XCOMM With resent changes to the Imakefile, the command line had gotten so
269 XCOMM long that it exceeded an internal buffer length resulting in errors in
270 XCOMM the generated assembler code. The EXTRA_RES_DEFINES were extracted
271 XCOMM from the RES_DEFINES macro in order to shorten the command line on
272 XCOMM the Sun platform. These particular -D flags were chosen as the
273 XCOMM least likely to change or be system dependent.
275 #ifdef SunArchitecture
278 EXTRA_RES_DEFINES = \
279 '-DDEF_SESSION="$(CDE_INSTALLATION_TOP)/bin/Xsession"' \
280 '-DDEF_SYSTEM_SHELL="$(BOURNE_SHELL)"' \
281 '-DDEF_CHOOSER="$(CDE_INSTALLATION_TOP)/bin/dtchooser"' \
282 '-DDEF_XDM_CONFIG="Xconfig"'
287 /**************************************************************************
291 * BASE_LIBS1 = dtlogin base libraries
292 * BASE_LIBS2 = dtgreet base libraries
294 **************************************************************************/
297 DEPLIBS1 = $(DEPXAUTHLIB) $(DEPXDMCPLIB) $(LOGINDEPXMULIB) $(LOGINDEPXLIB)
298 DEPLIBS2 = $(DEPDTWIDGETLIB) $(DEPDTSVCLIB) $(DEPTTLIB) $(DEPXMLIB) \
299 $(DEPXTOOLLIB) $(DEPXLIB)
300 DEPLIBS3 = $(DEPXDMCPLIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
302 BASE_LIBS1 = $(XAUTHLIB) $(LOGINXMULIB) $(XDMCPLIB) $(LOGINXLIB)
303 BASE_LIBS2 = $(DTWIDGETLIB) $(DTSVCLIB) $(TTLIB) $(XMLIB) \
304 $(XTOOLLIB) $(XLIB) $(XINLIB)
305 BASE_LIBS3 = $(DTWIDGETLIB) $(DTSVCLIB) $(TTLIB) $(XDMCPLIB) $(XMLIB) \
306 $(XTOOLLIB) $(XLIB) $(XINLIB)
308 LOCAL_LIBRARIES1 = $(BASE_LIBS1) $(IAFSYSLIB)
309 LOCAL_LIBRARIES2 = $(BASE_LIBS2)
310 LOCAL_LIBRARIES3 = $(BASE_LIBS3)
312 /**************************************************************************
314 * Extra things for the HP-UX BLS version
316 **************************************************************************/
318 #if !defined(BLS) && defined(HPArchitecture) && (OSMajorVersion == 8) && \
319 (OSMinorVersion == 8)
326 EXTRA_DEFINES = -UAUDIT -D_NO_PROTO
327 EXTRA_CFLAGS = -Wp,-H256000
328 EXTRA_LIBRARIES = $(BLSLIBSRC)/libbls.a -lsec ExtraLibraries
329 STD_CPP_DEFINES = -DSYSV -DBLS
334 /**************************************************************************
336 * Extra things for the Kerberos/AFS version (dtlogin.krb)
338 **************************************************************************/
344 KRBLIBSRC = $(LIBSRC)/krb
345 DEPKRBLIB = $(KRBLIBSRC)/libkrb.a
346 KRBLIB = $(DEPKRBLIB)
348 DESLIBSRC = $(LIBSRC)/des
349 DEPDESLIB = $(DESLIBSRC)/libdes.a
350 DESLIB = $(DEPDESLIB)
352 KRBINCLUDESRC = $(KRBLIBSRC)/include
354 AFSINCLUDESRC = $(AFSLIBSRC)
355 EXTRA_INCLUDES = -I$(KRBINCLUDESRC) -I$(AFSINCLUDESRC)
356 EXTRA_DEFINES = -D__KERBEROS -D__AFS
358 LOCAL_LIBRARIES1 = $(BASE_LIBS1) \
361 $(AFSLIBSRC)/libafsutil.a \
362 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libdes.a
364 LOCAL_LIBRARIES2 = $(BASE_LIBS2) \
366 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libkauth.a \
367 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libprot.a \
368 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libubik.a \
369 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libauth.a \
370 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/librxkad.a \
371 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libsys.a \
372 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libdes.a \
373 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/librx.a \
374 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/liblwp.a \
375 $(AFSLIBSRC)/$(VENDOR)/$(HARDWARE)/libcom_err.a \
376 $(AFSLIBSRC)/libafsutil.a \
382 /**************************************************************************
384 * Extra things for the Passwd Etc. version (dtlogin.rgy)
386 **************************************************************************/
389 EXTRA_INCLUDES = -I$(RGYINCLUDESRC)
390 EXTRA_DEFINES = -D__PASSWD_ETC +e
391 EXTRA_LIBRARIES = $(RGYLIB) $(NCKLIB) -lndbm -lBSD ExtraLibraries
396 /**************************************************************************
398 * Extra things for Dtge
400 * HIDDEN_SYMBOLS1 = dtlogin hidden symbols
401 * HIDDEN_SYMBOLS2 = dtgreet hidden symbols
403 **************************************************************************/
405 #ifdef HPArchitecture
408 HIDDEN_SYMBOLS1 = -h _main -h _BecomeDaemon -h _GetHourGlass \
410 HIDDEN_SYMBOLS2 = -h _main -h _LogError -h _PingServer
414 HIDDEN_SYMBOLS1 = -h main -h BecomeDaemon -h GetHourGlass \
416 HIDDEN_SYMBOLS2 = -h main -h LogError -h PingServer
423 /**************************************************************************
427 **************************************************************************/
429 #if defined(USE_KRB) || defined(USE_RGY)
431 @for i in $(SRCS1) $(SRCS2) $(HEADERS); do \
433 echo "linking $(DTLOGINSRC)/$$i to $$i";\
434 ln -f -s $(DTLOGINSRC)/$$i .; \
439 ComplexProgramTarget_1($(PROG1),$(LOCAL_LIBRARIES1), $(LOGINLDOPTIONS))
440 ComplexProgramTarget_2($(PROG2),$(LOCAL_LIBRARIES2), /**/)
441 ComplexProgramTarget_3($(PROG3),$(LOCAL_LIBRARIES3), /**/)
444 /* Problem with "-O" in dtgreet ... wrong size login widget. */
445 /* Override "-O" (xO2) with "-xO1". */
448 $(CC) -c $(CFLAGS) -xO1 $(_NOOP_) $*.c
451 SpecialObjectRule(resource.o, $(ICONFIGFILES), $(EXTRA_RES_DEFINES) $(RES_DEFINES) $(CCINLIBS))
452 #if defined(HPArchitecture) && !defined(DEBUGTREE)
453 SpecialObjectRule(session.o,,+O1 $(CCINLIBS))
456 #if !defined(USE_KRB) && !defined(USE_RGY)
458 LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
459 -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
460 -DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP)
462 #endif /* USE_KRB && USE_RGY */
465 MakeDirectories(install,$(XDMDIR))
469 * Don't install; let people read the instructions about putting in the
470 * abort-display() resource:
473 InstallProgramWithFlags(xdmshell,$(XBINDIR), /**/)
476 #if !defined(USE_KRB) && !defined(USE_RGY) && defined(BuildHugeObject) && \
477 defined(HPArchitecture) && !defined(BLS)
478 /***** For dtge make a client_OBJS.o using client_main.o ******/
479 /***** This implies the existence of client_main.c ******/
480 SpecialRelocatableTarget(dtlogin,$(HIDDEN_SYMBOLS1),$(OBJS1))
481 SpecialRelocatableTarget(dtgreet,$(HIDDEN_SYMBOLS2),$(OBJS2))