X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=driver%2FMakefile.in;h=64e19587877e12b5367f5ee96259b39a7850246b;hp=ae4f62bf1a1fb40d73beec59ad96cd0957bab068;hb=481b95e2617b69e6fd4444432747d7e1e0c3dc85;hpb=c6b273ef7292ba10943694df1656b05203d7b62f diff --git a/driver/Makefile.in b/driver/Makefile.in index ae4f62bf..64e19587 100644 --- a/driver/Makefile.in +++ b/driver/Makefile.in @@ -20,6 +20,7 @@ CC = @CC@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ DEFS = @DEFS@ +DEFS2 = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"' LIBS = @LIBS@ DEPEND = @DEPEND@ @@ -32,13 +33,24 @@ SUID_FLAGS = -o root -m 4755 INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SETUID = @INSTALL_SETUID@ INSTALL_DATA = @INSTALL_DATA@ +INSTALL_DIRS = @INSTALL_DIRS@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ -XLIBS = $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) +# Note: +# +# X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.) +# X_PRE_LIBS contains extra libraries you have to link against on some systems, +# and that must come before -lX11. (e.g., -lSM and -lICE.) +# X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X. +# (e.g., -lsocket, -lnsl, etc.) +# +# SAVER_LIBS is the link line for "xscreensaver", and +# CMD_LIBS is the link line for "xscreensaver-command". + AD_DIR = @APPDEFAULTS@ @@ -88,11 +100,17 @@ SAVER_OBJS_1 = demo.o stderr.o subprocs.o timers.o windows.o \ SAVER_SRCS = $(SAVER_SRCS_1) $(DIALOG_SRCS) $(LOCK_SRCS) $(UTIL_SRCS) SAVER_OBJS = $(SAVER_OBJS_1) $(DIALOG_OBJS) $(LOCK_OBJS) $(UTIL_OBJS) -SAVER_LIBS = $(X_LIBS) @SAVER_LIBS@ -lXt $(XLIBS) $(PASSWD_LIBS) $(LIBS) CMD_SRCS = xscreensaver-command.c CMD_OBJS = xscreensaver-command.o -CMD_LIBS = $(X_LIBS) $(XLIBS) $(LIBS) + +SAVER_LIBS = $(X_LIBS) $(X_PRE_LIBS) @SAVER_LIBS@ -lXt \ + -lX11 -lXext $(X_EXTRA_LIBS) $(PASSWD_LIBS) \ + $(LIBS) + +CMD_LIBS = $(X_LIBS) $(X_PRE_LIBS) \ + -lX11 -lXext $(X_EXTRA_LIBS) \ + $(LIBS) EXES = xscreensaver xscreensaver-command @@ -138,15 +156,18 @@ install-program: $$e "" ;\ fi ; \ fi ; \ + if [ ! -d $(bindir) ]; then $(INSTALL_DIRS) $(bindir) ; fi ; \ echo $$inst xscreensaver $(bindir)/xscreensaver ; \ $$inst xscreensaver $(bindir)/xscreensaver $(INSTALL_PROGRAM) xscreensaver-command $(bindir)/xscreensaver-command install-ad: + @if [ ! -d $(AD_DIR) ]; then $(INSTALL_DIRS) $(AD_DIR) ; fi ; \ $(INSTALL_DATA) XScreenSaver.ad $(AD_DIR)/XScreenSaver install-man: @men="$(MEN)" ; \ + if [ ! -d $(man1dir) ]; then $(INSTALL_DIRS) $(man1dir) ; fi ; \ for man in $$men; do \ instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \ echo $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ; \ @@ -181,7 +202,7 @@ depend: XScreenSaver_ad.h $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \ $(DEPEND_FLAGS) -- \ $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \ - $(SAVER_SRCS_1) $(CMD_SRCS) + $(SAVER_SRCS) $(CMD_SRCS) # Adds some dependencies to Makefile.in -- not totally accurate, but pretty # close. This excludes dependencies on files in /usr/include, etc. It tries @@ -192,7 +213,8 @@ distdepend: update_ad_version update_man_version XScreenSaver_ad.h $(DEPEND) -w 0 -f - \ -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \ $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \ - $(SAVER_SRCS_1) $(CMD_SRCS) | \ + $(SAVER_SRCS_1) $(MOTIF_SRCS) $(ATHENA_SRCS) $(PWENT_SRCS) \ + $(LOCK_SRCS_1) $(CMD_SRCS) | \ ( \ awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \ sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \ @@ -273,7 +295,11 @@ $(UTIL_OBJS): # How we build object files in this directory. .c.o: - $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $< + $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $< + +# subprocs is the only one that takes an extra -D option. +subprocs.o: subprocs.c + $(CC) -c $(INCLUDES) $(DEFS2) $(CFLAGS) $(X_CFLAGS) $< # How we build the default app-defaults file into the program. @@ -290,6 +316,13 @@ xscreensaver-command: $(CMD_OBJS) $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS) +TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PWENT_OBJS) $(DIALOG_OBJS) \ + subprocs.o demo.o \ + $(UTIL_OBJS) + +test-passwd: $(TEST_PASSWD_OBJS) + $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS) + ############################################################################## # # DO NOT DELETE: updated by make distdepend @@ -319,6 +352,14 @@ xscreensaver.o: $(UTILS_SRC)/visual.h xscreensaver.o: XScreenSaver_ad.h xset.o: ../config.h xset.o: $(srcdir)/xscreensaver.h +dialogs-Xm.o: ../config.h +dialogs-Xm.o: $(UTILS_SRC)/visual.h +dialogs-Xaw.o: ../config.h +dialogs-Xaw.o: $(UTILS_SRC)/visual.h +passwd.o: ../config.h +lock.o: ../config.h +lock.o: $(srcdir)/xscreensaver.h +lock.o: $(UTILS_SRC)/resources.h xscreensaver-command.o: ../config.h xscreensaver-command.o: $(UTILS_SRC)/version.h