MOTIF_SRCS = dialogs-Xm.c
MOTIF_OBJS = dialogs-Xm.o
+GTK_SRCS = dialogs-Gtk.c
+GTK_OBJS = dialogs-Gtk.o
+
ATHENA_SRCS = dialogs-Xaw.c
ATHENA_OBJS = dialogs-Xaw.o
LOCK_SRCS_1 = lock.c passwd.c
LOCK_OBJS_1 = lock.o passwd.o
-TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c
+TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c test-apm.c
-TOOLKIT_SRCS = @TOOLKIT_SRCS@
-TOOLKIT_OBJS = @TOOLKIT_OBJS@
-TOOLKIT_LIBS = @TOOLKIT_LIBS@
+MOTIF_LIBS = @MOTIF_LIBS@
+GTK_LIBS = @GTK_LIBS@
+ATHENA_LIBS = @ATHENA_LIBS@
+ATHENA3D_LIBS = @ATHENA3D_LIBS@
PASSWD_SRCS = @PASSWD_SRCS@
PASSWD_OBJS = @PASSWD_OBJS@
LOCK_SRCS = @LOCK_SRCS@
LOCK_OBJS = @LOCK_OBJS@
+XMU_SRCS = @XMU_SRCS@
+XMU_OBJS = @XMU_OBJS@
+
+GL_SRCS = @SAVER_GL_SRCS@
+GL_OBJS = @SAVER_GL_OBJS@
+GL_LIBS = @SAVER_GL_LIBS@
+
DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
$(UTILS_SRC)/visual.c
DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
xset.o splash.o setuid.o stderr.o
SAVER_SRCS = $(SAVER_SRCS_1) prefs.c $(LOCK_SRCS) \
- $(SAVER_UTIL_SRCS) @XMU_SRCS@
+ $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
SAVER_OBJS = $(SAVER_OBJS_1) prefs.o $(LOCK_OBJS) \
- $(SAVER_UTIL_OBJS) @XMU_OBJS@
+ $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
CMD_SRCS = remote.c xscreensaver-command.c
CMD_OBJS = remote.o xscreensaver-command.o
-DEMO_SRCS_1 = demo.c prefs.c
-DEMO_OBJS_1 = demo.o prefs.o
+DEMO_SRCS_1 = prefs.c demo.c $(XMU_SRCS)
+DEMO_OBJS_1 = prefs.o demo-Xm.o demo-Gtk.o demo-Xaw.o $(XMU_OBJS)
-DEMO_SRCS = $(DEMO_SRCS_1) remote.c \
- $(TOOLKIT_SRCS) $(DEMO_UTIL_SRCS)
-DEMO_OBJS = $(DEMO_OBJS_1) remote.o \
- $(TOOLKIT_OBJS) $(DEMO_UTIL_OBJS)
+DEMO_SRCS = prefs.c remote.c $(DEMO_UTIL_SRCS) demo.c
+DEMO_OBJS = prefs.o remote.o $(DEMO_UTIL_OBJS)
-SAVER_LIBS = $(LIBS) $(X_LIBS) @SAVER_LIBS@ \
+SAVER_LIBS = $(LIBS) $(X_LIBS) @SAVER_LIBS@ $(GL_LIBS) \
$(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
$(PASSWD_LIBS)
CMD_LIBS = $(LIBS) $(X_LIBS) \
$(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
-DEMO_LIBS = $(LIBS) $(X_LIBS) $(TOOLKIT_LIBS) \
- $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
-
EXES = xscreensaver xscreensaver-command xscreensaver-demo
+EXES2 = @ALL_DEMO_PROGRAMS@
HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h
MEN = xscreensaver.man xscreensaver-demo.man \
vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
- $(MOTIF_SRCS) $(ATHENA_SRCS) $(PWENT_SRCS) $(KERBEROS_SRCS) \
- $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
- $(HDRS) $(TEST_SRCS) $(MEN)
+ $(MOTIF_SRCS) $(GTK_SRCS) $(ATHENA_SRCS) $(PWENT_SRCS) \
+ $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
+ $(CMD_SRCS) $(HDRS) $(TEST_SRCS) $(MEN)
-all: $(EXES)
+default: $(EXES)
+all: $(EXES) $(EXES2)
install: install-program install-ad install-man @INSTALL_PAM@
uninstall: uninstall-program uninstall-ad uninstall-man
@if [ ! -d $(bindir) ]; then $(INSTALL_DIRS) $(bindir) ; fi
@inst="$(INSTALL_PROGRAM)" ; \
if [ @NEED_SETUID@ = yes ]; then \
- me="`whoami`" ; \
+ me=`PATH="$$PATH:/usr/ucb" whoami` ; \
if [ "$$me" = root ]; then \
inst="$(INSTALL_SETUID)" ; \
else \
e=echo ; \
$$e "" ;\
+ $$e " ####################################################################";\
$$e " Warning: xscreensaver has been compiled with support for shadow" ;\
$$e " passwords. If your system actually uses shadow passwords," ;\
$$e " then xscreensaver must be installed as a setuid root" ;\
$$e "" ;\
$$e " For now, xscreensaver will be installed non-setuid, which" ;\
$$e " means that locking might not work. (Try it and see.)" ;\
+ $$e " ####################################################################";\
$$e "" ;\
fi ; \
fi ; \
install-ad: XScreenSaver.ad
@if [ ! -d $(AD_DIR) ]; then $(INSTALL_DIRS) $(AD_DIR) ; fi
- $(INSTALL_DATA) XScreenSaver.ad $(AD_DIR)/XScreenSaver
+ @-echo $(INSTALL_DATA) XScreenSaver.ad $(AD_DIR)/XScreenSaver ; \
+ if $(INSTALL_DATA) XScreenSaver.ad $(AD_DIR)/XScreenSaver ; then \
+ true ; \
+ else \
+ e=echo ; \
+ if [ -f $(AD_DIR)/XScreenSaver ]; then \
+ $$e "" ;\
+ $$e " ####################################################################";\
+ $$e " Warning: unable to install $(AD_DIR)/XScreenSaver" ;\
+ $$e " That file exists, and is unwritable. It is probably from" ;\
+ $$e " an older version of xscreensaver, and could cause things" ;\
+ $$e " to malfunction. Please delete it!" ;\
+ $$e " ####################################################################";\
+ $$e "" ;\
+ exit 1 ; \
+ else \
+ $$e "" ;\
+ $$e " ####################################################################";\
+ $$e " Warning: unable to install $(AD_DIR)/XScreenSaver" ;\
+ $$e " The directory is unwritable. This is probably ok;" ;\
+ $$e " xscreensaver should work without that file." ;\
+ $$e " ####################################################################";\
+ $$e "" ;\
+ exit 0 ; \
+ fi \
+ fi
install-man: $(MEN)
@men="$(MEN)" ; \
if [ ! -f $$dir/$$dest ]; then \
e=echo ; \
$$e "" ;\
+ $$e " ####################################################################";\
$$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
$$e " Authentication Modules (PAM). However, we were unable to" ;\
- $$e " install the file $$dir/$$dest. PAM is unlikely to work" ;\
- $$e " without this file (and old-style password authentication" ;\
- $$e " will be used instead, which may or may not work.)" ;\
+ $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
+ $$e " to work without this file (and old-style password" ;\
+ $$e " authentication will be used instead, which may or may not" ;\
+ $$e " work.)" ;\
+ $$e " ####################################################################";\
$$e "" ;\
fi ; \
elif [ -f $$conf ]; then \
else \
e=echo ; \
$$e "" ;\
+ $$e " ####################################################################";\
$$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
$$e " Authentication Modules (PAM). To complete the installation";\
- $$e " of PAM support, you must add this to the file $$conf:" ;\
+ $$e " of PAM support, you must add the following line to the file";\
+ $$e " $$conf:" ;\
$$e "" ;\
- cat $$src | grep -v '#%' | sed "s/^/ $$dest /" ; \
+ $$e " $$dest auth required /usr/lib/security/pam_unix.so.1" ;\
+ $$e "" ;\
+ $$e " Be careful: if you mess up that file, you could completely" ;\
+ $$e " hose your machine (e.g., \`login' and \`su' won't work, and";\
+ $$e " you'll have to boot single-user to fix it.)" ;\
+ $$e " ####################################################################";\
echo ""; \
fi ; \
fi
clean:
- -rm -f *.o a.out core $(EXES) XScreenSaver_ad.h
+ -rm -f *.o a.out core $(EXES) $(EXES2) XScreenSaver_ad.h
distclean: clean
-rm -f Makefile XScreenSaver.ad TAGS *~ "#"*
$(DEPEND) -w 0 -f - \
-s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
$(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
- $(SAVER_SRCS_1) $(MOTIF_SRCS) $(ATHENA_SRCS) $(PWENT_SRCS) \
- $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) $(TEST_SRCS) | \
+ $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(ATHENA_SRCS) \
+ $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
+ $(TEST_SRCS) | \
( \
awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
# subprocs is the only one that takes an extra -D option.
subprocs.o: subprocs.c
- $(CC) -c $(INCLUDES) $(DEFS2) $(CFLAGS) $(X_CFLAGS) $<
+ $(CC) -c $(INCLUDES) $(DEFS2) $(CFLAGS) $(X_CFLAGS) \
+ $(srcdir)/subprocs.c
# How we build the default app-defaults file into the program.
xscreensaver-command: $(CMD_OBJS)
$(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
-xscreensaver-demo: $(DEMO_OBJS)
- $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(DEMO_LIBS)
+
+xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
+ cp -p @PREFERRED_DEMO_PROGRAM@ $@
+
+xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS) demo-Xm.o
+ $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) demo-Xm.o \
+ $(LIBS) $(X_LIBS) \
+ $(MOTIF_LIBS) $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
+
+xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS) demo-Gtk.o
+ $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) demo-Gtk.o \
+ $(LIBS) $(X_LIBS) \
+ $(GTK_LIBS) $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
+
+xscreensaver-demo-Xaw: $(DEMO_OBJS) $(ATHENA_OBJS) demo-Xaw.o
+ $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(ATHENA_OBJS) demo-Xaw.o \
+ $(LIBS) $(X_LIBS) \
+ $(ATHENA_LIBS) $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
+
+xscreensaver-demo-Xaw3d: $(DEMO_OBJS) $(ATHENA_OBJS) demo-Xaw.o
+ $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(ATHENA_OBJS) demo-Xaw.o \
+ $(LIBS) $(X_LIBS) \
+ $(ATHENA3D_LIBS) $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
+
+demo-Xm.o: demo.c XScreenSaver_ad.h
+ $(CC) -o $@ -c -DFORCE_MOTIF \
+ $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $(srcdir)/demo.c
+demo-Gtk.o: demo.c XScreenSaver_ad.h
+ $(CC) -o $@ -c -DFORCE_GTK \
+ $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $(srcdir)/demo.c
+demo-Xaw.o: demo.c XScreenSaver_ad.h
+ $(CC) -o $@ -c -DFORCE_ATHENA \
+ $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $(srcdir)/demo.c
+
$(SAVER_UTIL_OBJS)
test-passwd.o: XScreenSaver_ad.h
+tests:: test-passwd
test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
$(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
+tests:: test-uid
test-uid: test-uid.o
$(CC) $(LDFLAGS) -o $@ test-uid.o
+tests:: test-xdpms
test-xdpms: test-xdpms.o
$(CC) $(LDFLAGS) -o $@ test-xdpms.o $(SAVER_LIBS)
+tests:: test-grab
test-grab: test-grab.o
$(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
-
-# This kludge is so that I can build/test the Athena version of the
-# xscreensaver-demo program without having to re-run configure.
-# Normally it builds it with Motif if possible; this lets me build
-# both.
-#
-xscreensaver-demo-Xaw: $(ATHENA_OBJS) demo-Xaw.o $(DEMO_OBJS)
- $(CC) $(LDFLAGS) -o $@ demo-Xaw.o prefs.o remote.o \
- $(ATHENA_OBJS) $(DEMO_UTIL_OBJS) \
- $(LIBS) $(X_LIBS) -lXaw \
- $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
-xscreensaver-demo-Xaw3d: $(ATHENA_OBJS) demo-Xaw.o $(DEMO_OBJS)
- $(CC) $(LDFLAGS) -o $@ demo-Xaw.o prefs.o remote.o \
- $(ATHENA_OBJS) $(DEMO_UTIL_OBJS) \
- $(LIBS) $(X_LIBS) -lXaw3d \
- $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
-demo-Xaw.o: demo.c XScreenSaver_ad.h
- $(CC) -o $@ -c -DHAVE_ATHENA_KLUDGE \
- $(INCLUDES) $(DEFS2) $(CFLAGS) $(X_CFLAGS) $<
+tests:: test-apm
+test-apm: test-apm.o
+ $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
stderr.o: $(UTILS_SRC)/visual.h
dialogs-Xm.o: ../config.h
dialogs-Xm.o: $(UTILS_SRC)/visual.h
+dialogs-Gtk.o: ../config.h
+dialogs-Gtk.o: $(UTILS_SRC)/resources.h
dialogs-Xaw.o: ../config.h
dialogs-Xaw.o: $(UTILS_SRC)/visual.h
passwd-pwent.o: ../config.h
lock.o: $(srcdir)/prefs.h
lock.o: $(UTILS_SRC)/resources.h
passwd.o: ../config.h
+prefs.o: ../config.h
+prefs.o: $(srcdir)/prefs.h
+prefs.o: $(UTILS_SRC)/resources.h
demo.o: ../config.h
demo.o: $(UTILS_SRC)/version.h
demo.o: $(srcdir)/prefs.h
demo.o: $(srcdir)/remote.h
demo.o: $(UTILS_SRC)/usleep.h
demo.o: XScreenSaver_ad.h
-prefs.o: ../config.h
-prefs.o: $(srcdir)/prefs.h
-prefs.o: $(UTILS_SRC)/resources.h
remote.o: ../config.h
remote.o: $(srcdir)/remote.h
xscreensaver-command.o: ../config.h
test-uid.o: ../config.h
test-xdpms.o: ../config.h
test-grab.o: ../config.h
+test-apm.o: ../config.h