1 # driver/Makefile.in --- xscreensaver, Copyright (c) 1997-2005 Jamie Zawinski.
2 # the `../configure' script generates `driver/Makefile' from this file.
10 top_srcdir = @top_srcdir@
15 exec_prefix = @exec_prefix@
18 localedir = $(datadir)/locale
20 libexecdir = @libexecdir@
22 manNdir = $(mandir)/man$(mansuffix)
24 INTLTOOL_MERGE = @INTLTOOL_MERGE@
26 GTK_DATADIR = @GTK_DATADIR@
27 GTK_APPDIR = $(GTK_DATADIR)/applications
28 GTK_ICONDIR = $(GTK_DATADIR)/pixmaps
29 GTK_GLADEDIR = $(GTK_DATADIR)/xscreensaver/glade
30 HACK_CONF_DIR = @HACK_CONF_DIR@
37 INTL_DEFS = -DLOCALEDIR=\"$(localedir)\"
38 SUBP_DEFS = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
39 GTK_DEFS = $(DEFS) -DDEFAULT_ICONDIR='"$(GTK_GLADEDIR)"'
40 CONF_DEFS = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"'
43 INTL_LIBS = @INTLLIBS@
44 JPEG_LIBS = @JPEG_LIBS@
48 DEPEND_FLAGS = @DEPEND_FLAGS@
49 DEPEND_DEFINES = @DEPEND_DEFINES@
53 SUID_FLAGS = -o root -m 4755
54 INSTALL_PROGRAM = @INSTALL_PROGRAM@
55 INSTALL_SCRIPT = @INSTALL_SCRIPT@
56 INSTALL_SETUID = @INSTALL_SETUID@
57 INSTALL_DATA = @INSTALL_DATA@
58 INSTALL_DIRS = @INSTALL_DIRS@
62 X_PRE_LIBS = @X_PRE_LIBS@
63 X_EXTRA_LIBS = @X_EXTRA_LIBS@
69 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
70 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
71 # and that must come before -lX11. (e.g., -lSM and -lICE.)
72 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
73 # (e.g., -lsocket, -lnsl, etc.)
75 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
77 # SAVER_LIBS is the link line for "xscreensaver", and
78 # CMD_LIBS is the link line for "xscreensaver-command".
79 # GETIMG_LIBS is the link line for "xscreensaver-getimage".
82 AD_DIR = @APPDEFAULTS@
84 PAM_CONF = /etc/pam.conf
86 UTILS_SRC = $(srcdir)/../utils
89 INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
91 MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
92 MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
94 GTK_SRCS = demo-Gtk.c demo-Gtk-conf.c \
95 demo-Gtk-widgets.c demo-Gtk-support.c
96 GTK_EXTRA_OBJS = demo-Gtk-widgets.o demo-Gtk-support.o
97 GTK_OBJS = demo-Gtk.o demo-Gtk-conf.o @GTK_EXTRA_OBJS@
99 PWENT_SRCS = passwd-pwent.c
100 PWENT_OBJS = passwd-pwent.o
102 KERBEROS_SRCS = passwd-kerberos.c
103 KERBEROS_OBJS = passwd-kerberos.o
105 PAM_SRCS = passwd-pam.c
106 PAM_OBJS = passwd-pam.o
108 PWHELPER_SRCS = passwd-helper.c
109 PWHELPER_OBJS = passwd-helper.o
111 LOCK_SRCS_1 = lock.c passwd.c
112 LOCK_OBJS_1 = lock.o passwd.o
113 NOLOCK_SRCS_1 = lock.c
114 NOLOCK_OBJS_1 = lock.o
116 TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
117 test-apm.c test-fade.c test-xinerama.c test-vp.c \
118 test-randr.c xdpyinfo.c
119 TEST_EXES = test-passwd test-uid test-xdpms test-grab \
120 test-apm test-fade test-xinerama test-vp \
123 MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
124 GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS)
125 XML_LIBS = @XML_LIBS@
127 XDPMS_LIBS = @XDPMS_LIBS@
128 XINERAMA_LIBS = @XINERAMA_LIBS@
130 PASSWD_SRCS = @PASSWD_SRCS@
131 PASSWD_OBJS = @PASSWD_OBJS@
132 PASSWD_LIBS = @PASSWD_LIBS@
134 LOCK_SRCS = @LOCK_SRCS@
135 LOCK_OBJS = @LOCK_OBJS@
137 XMU_SRCS = @XMU_SRCS@
138 XMU_OBJS = @XMU_OBJS@
140 GL_SRCS = @SAVER_GL_SRCS@
141 GL_OBJS = @SAVER_GL_OBJS@
142 GL_LIBS = @SAVER_GL_LIBS@
144 ICON_SRC = $(UTILS_SRC)/images
145 LOGO = $(ICON_SRC)/logo-50.xpm
146 GTK_ICONS = $(ICON_SRC)/screensaver-*.png
148 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
149 $(UTILS_SRC)/visual.c
150 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
151 $(UTILS_BIN)/visual.o
153 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
154 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
156 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
157 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
160 GETIMG_SRCS_1 = xscreensaver-getimage.c
161 GETIMG_OBJS_1 = xscreensaver-getimage.o
163 GETIMG_SRCS = $(GETIMG_SRCS_1) \
164 $(UTILS_SRC)/colorbars.o $(UTILS_SRC)/resources.o \
165 $(UTILS_SRC)/yarandom.o $(UTILS_SRC)/visual.o \
166 $(UTILS_SRC)/usleep.o $(UTILS_SRC)/hsv.o \
167 $(UTILS_SRC)/colors.o $(UTILS_SRC)/grabscreen.o \
168 $(UTILS_SRC)/logo.o prefs.o $(XMU_SRCS)
170 GETIMG_OBJS = $(GETIMG_OBJS_1) \
171 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
172 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
173 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
174 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
175 $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS)
177 SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c exec.c \
178 xset.c splash.c setuid.c stderr.c
179 SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o exec.o \
180 xset.o splash.o setuid.o stderr.o
182 SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
183 $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
184 SAVER_OBJS = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
185 $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
187 CMD_SRCS = remote.c xscreensaver-command.c
188 CMD_OBJS = remote.o xscreensaver-command.o
190 DEMO_SRCS_1 = prefs.c dpms.c $(XMU_SRCS)
191 DEMO_OBJS_1 = prefs.o dpms.o $(XMU_OBJS)
193 DEMO_SRCS = prefs.c dpms.c remote.c exec.c $(DEMO_UTIL_SRCS)
194 DEMO_OBJS = prefs.o dpms.o remote.o exec.o $(DEMO_UTIL_OBJS)
196 PDF2JPEG_SRCS = pdf2jpeg.m
197 PDF2JPEG_OBJS = pdf2jpeg.o
198 PDF2JPEG_LIBS = -framework Cocoa
200 SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
201 $(XDPMS_LIBS) $(XINERAMA_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
202 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
205 CMD_LIBS = $(LIBS) $(X_LIBS) \
206 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
208 GETIMG_LIBS = $(LIBS) $(X_LIBS) $(XPM_LIBS) $(JPEG_LIBS) \
209 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
211 EXES = xscreensaver xscreensaver-command xscreensaver-demo \
212 xscreensaver-getimage @EXES_OSX@
213 EXES2 = @ALL_DEMO_PROGRAMS@
216 SCRIPTS_1 = xscreensaver-getimage-file xscreensaver-getimage-video \
218 SCRIPTS_OSX = xscreensaver-getimage-desktop
219 SCRIPTS = $(SCRIPTS_1) @SCRIPTS_OSX@
221 HDRS = XScreenSaver_ad.h XScreenSaver_Xm_ad.h \
222 xscreensaver.h prefs.h remote.h \
223 demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
225 MEN_1 = xscreensaver.man xscreensaver-demo.man \
226 xscreensaver-command.man \
227 xscreensaver-text.man \
228 xscreensaver-getimage.man \
229 xscreensaver-getimage-file.man \
230 xscreensaver-getimage-video.man
231 MEN_OSX = xscreensaver-getimage-desktop.man pdf2jpeg.man
232 MEN = $(MEN_1) @MEN_OSX@
234 EXTRAS = README Makefile.in \
235 XScreenSaver.ad.in XScreenSaver-Xm.ad xscreensaver.pam \
236 xscreensaver-demo.glade2 xscreensaver-demo.glade2p \
237 screensaver-properties.desktop.in \
239 VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
240 vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
241 vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
243 TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
244 $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) $(PWHELPER_SRCS) \
245 $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
246 $(CMD_SRCS) $(GETIMG_SRCS_1) $(PDF2JPEG_SRCS) $(HDRS) \
247 $(SCRIPTS_1) $(SCRIPTS_OSX) $(MEN_1) $(MEN_OSX) \
252 all: $(EXES) $(EXES2)
255 install: install-program install-ad install-scripts \
256 install-gnome install-man install-xml install-pam
257 uninstall: uninstall-program uninstall-ad \
258 uninstall-gnome uninstall-man uninstall-xml
261 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
264 install-program: $(EXES)
265 @if [ ! -d $(install_prefix)$(bindir) ]; then \
266 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
268 @inst="$(INSTALL_PROGRAM)" ; \
269 if [ @NEED_SETUID@ = yes ]; then \
270 me=`PATH="$$PATH:/usr/ucb" whoami` ; \
271 if [ "$$me" = root ]; then \
272 inst="$(INSTALL_SETUID)" ; \
276 $$e " ####################################################################";\
277 $$e " Warning: xscreensaver has been compiled with support for shadow" ;\
278 $$e " passwords. If your system actually uses shadow passwords," ;\
279 $$e " then xscreensaver must be installed as a setuid root" ;\
280 $$e " program in order for locking to work. To do this, you" ;\
281 $$e " must run 'make install' as 'root', not as '$$me'." ;\
283 $$e " For now, xscreensaver will be installed non-setuid, which" ;\
284 $$e " means that locking might not work. (Try it and see.)" ;\
285 $$e " ####################################################################";\
289 echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \
290 $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
291 @for exe in xscreensaver-command xscreensaver-demo \
292 xscreensaver-getimage @EXES_OSX@ ; do \
293 echo $(INSTALL_PROGRAM) $$exe $(install_prefix)$(bindir)/$$exe ; \
294 $(INSTALL_PROGRAM) $$exe $(install_prefix)$(bindir)/$$exe ; \
297 install-ad: XScreenSaver.ad
298 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
299 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
301 @-echo $(INSTALL_DATA) XScreenSaver.ad \
302 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
303 if $(INSTALL_DATA) XScreenSaver.ad \
304 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
308 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
310 $$e " ####################################################################";\
311 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
312 $$e " That file exists, and is unwritable. It is probably from" ;\
313 $$e " an older version of xscreensaver, and could cause things" ;\
314 $$e " to malfunction. Please delete it!" ;\
315 $$e " ####################################################################";\
320 $$e " ####################################################################";\
321 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
322 $$e " The directory is unwritable. This is probably ok;" ;\
323 $$e " xscreensaver should work without that file." ;\
324 $$e " ####################################################################";\
330 install-scripts: $(SCRIPTS) munge-scripts
331 @for program in $(SCRIPTS); do \
332 if [ -r $$program ] ; then \
335 p=$(srcdir)/$$program ; \
337 echo $(INSTALL_SCRIPT) $$p \
338 $(install_prefix)$(bindir)/$$program ; \
339 $(INSTALL_SCRIPT) $$p \
340 $(install_prefix)$(bindir)/$$program ; \
343 munge-scripts: $(SCRIPTS)
344 @tmp=/tmp/mf.$$$$ ; \
347 for program in $(SCRIPTS); do \
348 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
349 < $(srcdir)/$$program > $$tmp ; \
350 if cmp -s $(srcdir)/$$program $$tmp ; then \
353 echo "$$program: setting interpreter to $$perl" ; \
354 cat $$tmp > ./$$program ; \
361 if [ ! -d $(install_prefix)$(manNdir) ]; then \
362 $(INSTALL_DIRS) $(install_prefix)$(manNdir) ; \
364 for man in $$men; do \
365 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
366 echo $(INSTALL_DATA) $(srcdir)/$$man \
367 $(install_prefix)$(manNdir)/$$instname ; \
368 $(INSTALL_DATA) $(srcdir)/$$man \
369 $(install_prefix)$(manNdir)/$$instname ; \
373 @for program in $(EXES) $(SCRIPTS); do \
374 echo rm -f $(install_prefix)$(bindir)/$$program ; \
375 rm -f $(install_prefix)$(bindir)/$$program ; \
379 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
383 for man in $$men; do \
384 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
385 echo rm -f $(install_prefix)$(manNdir)/$$instname ; \
386 rm -f $(install_prefix)$(manNdir)/$$instname ; \
390 @src="$(srcdir)/xscreensaver.pam" ; \
391 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
393 dir="$(install_prefix)$(PAM_DIR)" ; \
394 conf="$(PAM_CONF)" ; \
396 if [ -d $$dir ] ; then \
398 if [ -f $$dir/xdm ]; then \
400 elif [ -f $$dir/login ]; then \
404 if [ -z "$$src2" ]; then \
405 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
406 $(INSTALL_DATA) $$src $$dir/$$dest ; \
408 src="xscreensaver.pam.$$$$" ; \
409 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
410 grep '^#%\|^auth' $$src2 > $$src ; \
411 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
412 $(INSTALL_DATA) $$src $$dir/$$dest ; \
417 if [ ! -f $$dir/$$dest ]; then \
420 $$e " ####################################################################";\
421 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
422 $$e " Authentication Modules (PAM). However, we were unable to" ;\
423 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
424 $$e " to work without this file (and old-style password" ;\
425 $$e " authentication will be used instead, which may or may not" ;\
427 $$e " ####################################################################";\
430 elif [ -f $$conf ]; then \
431 if ( grep $$dest $$conf >/dev/null ); then \
432 echo "$$conf unchanged: already has an entry for $$dest" ; \
434 src="pam.conf.$$$$" ; \
435 echo "grep -v $$dest $$conf > $$src" ; \
436 grep -v $$dest $$conf > $$src ; \
437 extras=`sed -n "s/^login\(.*auth.*\)$$/$$dest\1/p" $$conf`; \
438 echo "$$extras" >> $$src ; \
439 if [ "x$$extras" = "x" ]; then \
440 echo "Error: no login rules in $$conf?" >&2 ; \
442 echo "adding $$dest rules to $$src:" ; \
443 echo "$$extras" | sed 's/^/ /' ; \
445 echo $(INSTALL_DATA) $$src $$conf ; \
446 $(INSTALL_DATA) $$src $$conf ; \
450 if ! ( grep $$dest $$conf >/dev/null ); then \
453 $$e " ####################################################################";\
454 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
455 $$e " Authentication Modules (PAM). However, we were unable to" ;\
456 $$e " install xscreensaver rules in the file $$conf." ;\
457 $$e " PAM is unlikely to work without this (and old-style" ;\
458 $$e " password authentication will be used instead, which may" ;\
459 $$e " or may not work.)" ;\
460 $$e " ####################################################################";\
465 # screensaver-properties.desktop
466 # into /usr/share/applications/
467 install-gnome:: screensaver-properties.desktop
468 @if [ "$(GTK_DATADIR)" != "" ]; then \
469 if [ ! -d "$(install_prefix)$(GTK_APPDIR)" ]; then \
470 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_APPDIR)" ;\
471 $(INSTALL_DIRS) "$(install_prefix)$(GTK_APPDIR)" ;\
473 name2=gnome-screensaver-properties.desktop ;\
474 echo $(INSTALL_DATA) screensaver-properties.desktop \
475 $(install_prefix)$(GTK_APPDIR)/$$name2 ;\
476 $(INSTALL_DATA) screensaver-properties.desktop \
477 $(install_prefix)$(GTK_APPDIR)/$$name2 ;\
482 # into /usr/share/pixmaps/
483 install-gnome:: $(LOGO)
484 @if [ "$(GTK_DATADIR)" != "" ]; then \
485 if [ ! -d "$(install_prefix)$(GTK_ICONDIR)" ]; then \
486 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
487 $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
489 target=xscreensaver.xpm ;\
490 echo $(INSTALL_DATA) $(LOGO) \
491 $(install_prefix)$(GTK_ICONDIR)/$$target ;\
492 $(INSTALL_DATA) $(LOGO) \
493 $(install_prefix)$(GTK_ICONDIR)/$$target ;\
496 # ../utils/images/screensaver-*.png
497 # into /usr/share/xscreensaver/glade/
499 @if [ "$(GTK_GLADEDIR)" != "" ]; then \
500 if [ ! -d "$(install_prefix)$(GTK_GLADEDIR)" ]; then \
501 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
502 $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
504 for target in $(GTK_ICONS) ; do \
505 dest=`echo $$target | sed 's@^.*/@@'` ;\
506 echo $(INSTALL_DATA) $$target \
507 $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
508 $(INSTALL_DATA) $$target \
509 $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
513 # xscreensaver-demo.glade2
514 # into /usr/share/xscreensaver/glade/
515 install-gnome:: xscreensaver-demo.glade2
516 @if [ "$(GTK_GLADEDIR)" != "" ]; then \
517 if [ ! -d "$(install_prefix)$(GTK_GLADEDIR)" ]; then \
518 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
519 $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
521 target=xscreensaver-demo.glade2 ;\
522 echo $(INSTALL_DATA) $(srcdir)/$$target \
523 $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
524 if $(INSTALL_DATA) $(srcdir)/$$target \
525 $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
530 $$e " ####################################################################";\
531 $$e " Warning: unable to install $$target into" ;\
532 $$e " $(install_prefix)$(GTK_GLADEDIR)/." ;\
533 $$e " Without this file, xscreensaver-demo will not" ;\
534 $$e " be able to run properly." ;\
535 $$e " ####################################################################";\
542 # screensaver-properties.desktop
543 # into /usr/share/applications/
545 @if [ "$(GTK_DATADIR)" != "" ]; then \
546 f=screensaver-properties.desktop ;\
547 echo rm -f $(install_prefix)$(GTK_APPDIR)/$$f ;\
548 rm -f $(install_prefix)$(GTK_APPDIR)/$$f ;\
552 # into /usr/share/pixmaps/
554 @if [ "$(GTK_ICONDIR)" != "" ]; then \
555 target=xscreensaver.xpm ;\
556 echo rm -f $(install_prefix)$(GTK_ICONDIR)/$$target ;\
557 rm -f $(install_prefix)$(GTK_ICONDIR)/$$target ;\
560 # ../utils/images/screensaver-*.png
561 # into /usr/share/xscreensaver/glade/
563 @if [ "$(GTK_GLADEDIR)" != "" ]; then \
564 for target in $(GTK_ICONS) ; do \
565 dest=`echo $$target | sed 's@^.*/@@'` ;\
566 echo rm -f $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
567 rm -f $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
571 # xscreensaver-demo.glade2
572 # into /usr/share/xscreensaver/glade/
573 uninstall-gnome:: xscreensaver-demo.glade2
574 @if [ "$(GTK_GLADEDIR)" != "" ]; then \
575 target=xscreensaver-demo.glade2 ;\
576 echo rm -f $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
577 rm -f $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
580 # /usr/share/xscreensaver/config/README
582 @dest=$(install_prefix)$(HACK_CONF_DIR) ; \
583 if [ ! -d $$dest ]; then \
584 $(INSTALL_DIRS) $$dest ; \
586 src=$(srcdir)/../hacks/config ; \
587 echo $(INSTALL_DATA) $$src/README $$dest/README ; \
588 $(INSTALL_DATA) $$src/README $$dest/README
591 # /usr/share/xscreensaver/config/README
593 rm -f $(install_prefix)$(HACK_CONF_DIR)/README
596 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) \
597 XScreenSaver_ad.h XScreenSaver_Xm_ad.h
600 -rm -f Makefile XScreenSaver.ad XScreenSaver-Xm.ad \
601 TAGS *~ "#"* screensaver-properties.desktop
603 # Adds all current dependencies to Makefile
604 depend: XScreenSaver_ad.h XScreenSaver_Xm_ad.h
605 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
607 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
608 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
610 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
611 # close. This excludes dependencies on files in /usr/include, etc. It tries
612 # to include only dependencies on files which are themselves a part of this
614 distdepend: check_men update_ad_version update_man_version XScreenSaver_ad.h XScreenSaver_Xm_ad.h
615 @echo updating dependencies in `pwd`/Makefile.in... ; \
616 $(DEPEND) -w 0 -f - \
617 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
618 $(INCLUDES) -I$(ICON_SRC) $(DEFS) $(DEPEND_DEFINES) \
619 $(CFLAGS) $(X_CFLAGS) -- \
620 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
621 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
622 $(TEST_SRCS) 2>/dev/null | \
625 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
627 -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
628 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
629 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
630 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
631 -e 's@$$.*\(XScreenSaver_Xm_ad\)@\1@g' \
632 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
634 ) > /tmp/distdepend.$$$$ && \
635 mv Makefile.in Makefile.in.bak && \
636 mv /tmp/distdepend.$$$$ Makefile.in
638 # Updates the version number in the app-defaults file to be in sync with
639 # the version number in version.h. This is so people can tell when they
640 # have a version skew between the app-defaults file and the executable.
641 # Also update hacks/config/README in the same way.
643 @files="XScreenSaver.ad.in ../hacks/config/README" ; \
644 U=$(UTILS_SRC)/version.h ; \
645 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
646 D=`date '+%d-%b-%Y'` ; \
647 for S in $$files ; do \
649 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
650 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
652 if cmp -s $$S $$T ; then \
656 echo "updated $$S to $$V $$D" ; \
662 @for S in $(MEN); do \
663 U=$(UTILS_SRC)/version.h ; \
664 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
665 V="`date '+%d-%b-%Y'` ($$V)" ; \
667 sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/" \
669 if cmp -s $$S $$T ; then \
673 echo "updated $$S to \"$$V\"" ; \
680 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
683 @$(MAKE) XScreenSaver_ad.h XScreenSaver_Xm_ad.h 2>&1 >&- /dev/null
688 for exe in $(EXES); do \
689 if ! [ -f $(srcdir)/$$exe.man ]; then \
690 badmen="$$badmen $$exe" ; \
693 if [ -n "$$badmen" ]; then \
695 echo "Warning: The following programs have no manuals:" ; \
697 for m in $$badmen ; do \
704 # Rules for noticing when the objects from the utils directory are out of
705 # date with respect to their sources, and going and building them according
706 # to the rules in their own Makefile...
708 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
709 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
710 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
711 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
712 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
713 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
714 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
715 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
716 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
720 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
722 # How we build object files in this directory.
724 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
727 $(OBJCC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
729 # subprocs takes an extra -D option.
730 subprocs.o: subprocs.c
731 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
734 # demo-Gtk takes extra -D options, and an extra -I option.
735 demo-Gtk.o: demo-Gtk.c
736 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) \
737 $(GTK_DEFS) $(INTL_DEFS) $(CFLAGS) $(X_CFLAGS) \
740 # demo-Gtk-conf takes an extra -D option.
741 demo-Gtk-conf.o: demo-Gtk-conf.c
742 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
743 $(srcdir)/demo-Gtk-conf.c
746 # How we build the default app-defaults file into the program.
748 XScreenSaver_ad.h: XScreenSaver.ad
749 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
751 XScreenSaver_Xm_ad.h: XScreenSaver-Xm.ad
752 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver-Xm.ad > XScreenSaver_Xm_ad.h
754 @INTLTOOL_DESKTOP_RULE@
756 # The executables linked in this directory.
758 xscreensaver: $(SAVER_OBJS)
759 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
761 xscreensaver-command: $(CMD_OBJS)
762 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
765 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
766 @if [ "@PREFERRED_DEMO_PROGRAM@" = "" ]; then \
767 echo "WARNING: neither GTK nor Motif are available," \
768 "therefore no xscreensaver-demo!" ; \
771 echo cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
772 cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
775 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
776 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
777 $(MOTIF_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
778 $(XDPMS_LIBS) $(XINERAMA_LIBS) -lXext $(X_EXTRA_LIBS)
780 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
781 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
782 $(GTK_LIBS) $(XPM_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) \
783 -lXt -lX11 $(XDPMS_LIBS) $(XINERAMA_LIBS) -lXext $(X_EXTRA_LIBS)
785 xscreensaver-getimage: $(GETIMG_OBJS)
786 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
788 pdf2jpeg: $(PDF2JPEG_OBJS)
789 $(OBJCC) $(LDFLAGS) -o $@ $(PDF2JPEG_OBJS) $(PDF2JPEG_LIBS) -lm
792 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
793 subprocs.o setuid.o splash.o prefs.o \
795 test-passwd.o: XScreenSaver_ad.h
797 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
798 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
801 $(CC) $(LDFLAGS) -o $@ test-uid.o
803 test-xdpms: test-xdpms.o
804 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
805 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
807 test-xinerama: test-xinerama.o
808 $(CC) $(LDFLAGS) -o $@ test-xinerama.o $(LIBS) $(X_LIBS) $(SAVER_LIBS)\
809 $(X_PRE_LIBS) $(XINERAMA_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
812 $(CC) $(LDFLAGS) -o $@ test-vp.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
813 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
815 test-randr: test-randr.o
816 $(CC) $(LDFLAGS) -o $@ test-randr.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
817 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
819 test-grab: test-grab.o
820 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
823 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
825 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
826 test-fade: test-fade.o $(UTILS_BIN)/fade.o
827 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
830 xdpyinfo.o: xdpyinfo.c
831 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
835 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
836 $(LIBS) $(X_LIBS) @GL_LIBS@ \
837 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
840 ##############################################################################
842 # DO NOT DELETE: updated by make distdepend
844 demo-Gtk-conf.o: ../config.h
845 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
846 demo-Gtk.o: ../config.h
847 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
848 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
849 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
850 demo-Gtk.o: $(srcdir)/prefs.h
851 demo-Gtk.o: $(srcdir)/remote.h
852 demo-Gtk.o: XScreenSaver_ad.h
853 demo-Gtk-support.o: ../config.h
854 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
855 demo-Gtk-widgets.o: ../config.h
856 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
857 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
858 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
859 demo-Xm.o: ../config.h
860 demo-Xm-widgets.o: ../config.h
862 dpms.o: $(srcdir)/prefs.h
863 dpms.o: $(srcdir)/xscreensaver.h
866 lock.o: $(srcdir)/prefs.h
867 lock.o: $(srcdir)/xscreensaver.h
868 passwd.o: ../config.h
869 passwd-pwent.o: ../config.h
871 prefs.o: $(srcdir)/prefs.h
872 remote.o: ../config.h
873 remote.o: $(srcdir)/remote.h
874 setuid.o: ../config.h
875 setuid.o: $(srcdir)/prefs.h
876 setuid.o: $(srcdir)/xscreensaver.h
877 splash.o: ../config.h
878 splash.o: $(srcdir)/prefs.h
879 splash.o: $(srcdir)/xscreensaver.h
880 stderr.o: ../config.h
881 stderr.o: $(srcdir)/prefs.h
882 stderr.o: $(srcdir)/xscreensaver.h
883 subprocs.o: ../config.h
884 subprocs.o: $(srcdir)/prefs.h
885 subprocs.o: $(srcdir)/xscreensaver.h
886 test-apm.o: ../config.h
887 test-fade.o: ../config.h
888 test-fade.o: $(srcdir)/prefs.h
889 test-fade.o: $(srcdir)/xscreensaver.h
890 test-grab.o: ../config.h
891 test-passwd.o: ../config.h
892 test-passwd.o: $(srcdir)/prefs.h
893 test-passwd.o: XScreenSaver_ad.h
894 test-passwd.o: $(srcdir)/xscreensaver.h
895 test-randr.o: ../config.h
896 test-uid.o: ../config.h
897 test-vp.o: ../config.h
898 test-xdpms.o: ../config.h
899 test-xinerama.o: ../config.h
900 timers.o: ../config.h
901 timers.o: $(srcdir)/prefs.h
902 timers.o: $(srcdir)/xscreensaver.h
903 windows.o: ../config.h
904 windows.o: $(srcdir)/prefs.h
905 windows.o: $(srcdir)/xscreensaver.h
906 xscreensaver-command.o: ../config.h
907 xscreensaver-command.o: $(srcdir)/remote.h
908 xscreensaver-getimage.o: ../config.h
909 xscreensaver-getimage.o: XScreenSaver_ad.h
910 xscreensaver-getimage.o: $(srcdir)/prefs.h
911 xscreensaver.o: ../config.h
912 xscreensaver.o: $(srcdir)/prefs.h
913 xscreensaver.o: XScreenSaver_ad.h
914 xscreensaver.o: $(srcdir)/xscreensaver.h
916 xset.o: $(srcdir)/prefs.h
917 xset.o: $(srcdir)/xscreensaver.h