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@
17 datarootdir = @datarootdir@
19 localedir = $(datadir)/locale
21 libexecdir = @libexecdir@
23 manNdir = $(mandir)/man$(mansuffix)
25 INTLTOOL_MERGE = @INTLTOOL_MERGE@
27 GTK_DATADIR = @GTK_DATADIR@
28 GTK_APPDIR = $(GTK_DATADIR)/applications
29 GTK_ICONDIR = $(GTK_DATADIR)/pixmaps
30 GTK_GLADEDIR = $(GTK_DATADIR)/xscreensaver/glade
31 HACK_CONF_DIR = @HACK_CONF_DIR@
38 INTL_DEFS = -DLOCALEDIR=\"$(localedir)\"
39 SUBP_DEFS = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
40 GTK_DEFS = $(DEFS) -DDEFAULT_ICONDIR='"$(GTK_GLADEDIR)"'
41 CONF_DEFS = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"'
44 INTL_LIBS = @INTLLIBS@
45 JPEG_LIBS = @JPEG_LIBS@
49 DEPEND_FLAGS = @DEPEND_FLAGS@
50 DEPEND_DEFINES = @DEPEND_DEFINES@
54 SUID_FLAGS = -o root -m 4755
55 INSTALL_PROGRAM = @INSTALL_PROGRAM@
56 INSTALL_SCRIPT = @INSTALL_SCRIPT@
57 INSTALL_SETUID = @INSTALL_SETUID@
58 INSTALL_DATA = @INSTALL_DATA@
59 INSTALL_DIRS = @INSTALL_DIRS@
63 X_PRE_LIBS = @X_PRE_LIBS@
64 X_EXTRA_LIBS = @X_EXTRA_LIBS@
70 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
71 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
72 # and that must come before -lX11. (e.g., -lSM and -lICE.)
73 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
74 # (e.g., -lsocket, -lnsl, etc.)
76 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
78 # SAVER_LIBS is the link line for "xscreensaver", and
79 # CMD_LIBS is the link line for "xscreensaver-command".
80 # GETIMG_LIBS is the link line for "xscreensaver-getimage".
83 AD_DIR = @APPDEFAULTS@
85 PAM_CONF = /etc/pam.conf
87 UTILS_SRC = $(srcdir)/../utils
90 INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
92 MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
93 MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
95 GTK_SRCS = demo-Gtk.c demo-Gtk-conf.c \
96 demo-Gtk-widgets.c demo-Gtk-support.c
97 GTK_EXTRA_OBJS = demo-Gtk-widgets.o demo-Gtk-support.o
98 GTK_OBJS = demo-Gtk.o demo-Gtk-conf.o @GTK_EXTRA_OBJS@
100 PWENT_SRCS = passwd-pwent.c
101 PWENT_OBJS = passwd-pwent.o
103 KERBEROS_SRCS = passwd-kerberos.c
104 KERBEROS_OBJS = passwd-kerberos.o
106 PAM_SRCS = passwd-pam.c
107 PAM_OBJS = passwd-pam.o
109 PWHELPER_SRCS = passwd-helper.c
110 PWHELPER_OBJS = passwd-helper.o
112 LOCK_SRCS_1 = lock.c passwd.c
113 LOCK_OBJS_1 = lock.o passwd.o
114 NOLOCK_SRCS_1 = lock.c
115 NOLOCK_OBJS_1 = lock.o
117 TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
118 test-apm.c test-fade.c test-xinerama.c test-vp.c \
119 test-randr.c xdpyinfo.c test-mlstring.c test-screens.c
120 TEST_EXES = test-passwd test-uid test-xdpms test-grab \
121 test-apm test-fade test-xinerama test-vp \
122 test-randr xdpyinfo test-mlstring test-screens
124 MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
125 GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS)
126 XML_LIBS = @XML_LIBS@
128 XDPMS_LIBS = @XDPMS_LIBS@
129 XINERAMA_LIBS = @XINERAMA_LIBS@
131 PASSWD_SRCS = @PASSWD_SRCS@
132 PASSWD_OBJS = @PASSWD_OBJS@
133 PASSWD_LIBS = @PASSWD_LIBS@
135 LOCK_SRCS = @LOCK_SRCS@
136 LOCK_OBJS = @LOCK_OBJS@
138 XMU_SRCS = @XMU_SRCS@
139 XMU_OBJS = @XMU_OBJS@
141 GL_SRCS = @SAVER_GL_SRCS@
142 GL_OBJS = @SAVER_GL_OBJS@
143 GL_LIBS = @SAVER_GL_LIBS@
145 ICON_SRC = $(UTILS_SRC)/images
146 LOGO = $(ICON_SRC)/logo-50.xpm
147 GTK_ICONS = $(ICON_SRC)/screensaver-*.png
149 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
150 $(UTILS_SRC)/visual.c $(XMU_SRCS)
151 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
152 $(UTILS_BIN)/visual.o $(XMU_OBJS)
154 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
155 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
156 $(UTILS_SRC)/minixpm.c \
158 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
159 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
160 $(UTILS_BIN)/minixpm.o \
163 GETIMG_SRCS_1 = xscreensaver-getimage.c
164 GETIMG_OBJS_1 = xscreensaver-getimage.o
166 GETIMG_SRCS = $(GETIMG_SRCS_1) \
167 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
168 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
169 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
170 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
171 $(UTILS_BIN)/logo.o $(UTILS_BIN)/minixpm.o prefs.o \
174 GETIMG_OBJS = $(GETIMG_OBJS_1) \
175 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
176 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
177 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
178 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
179 $(UTILS_BIN)/logo.o $(UTILS_BIN)/minixpm.o prefs.o \
182 SAVER_SRCS_1 = xscreensaver.c windows.c screens.c timers.c subprocs.c \
183 exec.c xset.c splash.c setuid.c stderr.c mlstring.c
184 SAVER_OBJS_1 = xscreensaver.o windows.o screens.o timers.o subprocs.o \
185 exec.o xset.o splash.o setuid.o stderr.o mlstring.o
187 SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
188 $(SAVER_UTIL_SRCS) $(GL_SRCS)
189 SAVER_OBJS = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
190 $(SAVER_UTIL_OBJS) $(GL_OBJS)
192 CMD_SRCS = remote.c xscreensaver-command.c
193 CMD_OBJS = remote.o xscreensaver-command.o
195 DEMO_SRCS_1 = prefs.c dpms.c
196 DEMO_OBJS_1 = prefs.o dpms.o
198 DEMO_SRCS = $(DEMO_SRCS_1) remote.c exec.c $(DEMO_UTIL_SRCS)
199 DEMO_OBJS = $(DEMO_OBJS_1) remote.o exec.o $(DEMO_UTIL_OBJS)
201 PDF2JPEG_SRCS = pdf2jpeg.m
202 PDF2JPEG_OBJS = pdf2jpeg.o
203 PDF2JPEG_LIBS = -framework Cocoa
205 SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
206 $(XDPMS_LIBS) $(XINERAMA_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
207 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
210 CMD_LIBS = $(LIBS) $(X_LIBS) \
211 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
213 GETIMG_LIBS = $(LIBS) $(X_LIBS) $(XPM_LIBS) $(JPEG_LIBS) \
214 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
216 EXES = xscreensaver xscreensaver-command xscreensaver-demo \
217 xscreensaver-getimage @EXES_OSX@
218 EXES2 = @ALL_DEMO_PROGRAMS@
221 SCRIPTS_1 = xscreensaver-getimage-file xscreensaver-getimage-video \
223 SCRIPTS_OSX = xscreensaver-getimage-desktop
224 SCRIPTS = $(SCRIPTS_1) @SCRIPTS_OSX@
226 HDRS = XScreenSaver_ad.h XScreenSaver_Xm_ad.h \
227 xscreensaver.h prefs.h remote.h exec.h \
228 demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
229 demo-Gtk-conf.h auth.h mlstring.h types.h
230 MEN_1 = xscreensaver.man xscreensaver-demo.man \
231 xscreensaver-command.man \
232 xscreensaver-text.man \
233 xscreensaver-getimage.man \
234 xscreensaver-getimage-file.man \
235 xscreensaver-getimage-video.man
236 MEN_OSX = xscreensaver-getimage-desktop.man pdf2jpeg.man
237 MEN = $(MEN_1) @MEN_OSX@
239 EXTRAS = README Makefile.in \
240 XScreenSaver.ad.in XScreenSaver-Xm.ad xscreensaver.pam \
241 xscreensaver-demo.glade2 xscreensaver-demo.glade2p \
242 screensaver-properties.desktop.in \
244 VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
245 vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
246 vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
248 TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
249 $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) $(PWHELPER_SRCS) \
250 $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
251 $(CMD_SRCS) $(GETIMG_SRCS_1) $(PDF2JPEG_SRCS) $(HDRS) \
252 $(SCRIPTS_1) $(SCRIPTS_OSX) $(MEN_1) $(MEN_OSX) \
257 all: $(EXES) $(EXES2)
260 install: install-program install-ad install-scripts \
261 install-gnome install-man install-xml install-pam
262 uninstall: uninstall-program uninstall-ad \
263 uninstall-gnome uninstall-man uninstall-xml
266 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
269 install-program: $(EXES)
270 @if [ ! -d $(install_prefix)$(bindir) ]; then \
271 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
273 @inst="$(INSTALL_PROGRAM)" ; \
274 if [ @NEED_SETUID@ = yes ]; then \
275 me=`PATH="$$PATH:/usr/ucb" whoami` ; \
276 if [ "$$me" = root ]; then \
277 inst="$(INSTALL_SETUID)" ; \
281 $$e " ####################################################################";\
282 $$e " Warning: xscreensaver has been compiled with support for shadow" ;\
283 $$e " passwords. If your system actually uses shadow passwords," ;\
284 $$e " then xscreensaver must be installed as a setuid root" ;\
285 $$e " program in order for locking to work. To do this, you" ;\
286 $$e " must run 'make install' as 'root', not as '$$me'." ;\
288 $$e " For now, xscreensaver will be installed non-setuid, which" ;\
289 $$e " means that locking might not work. (Try it and see.)" ;\
290 $$e " ####################################################################";\
294 echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \
295 $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
296 @for exe in xscreensaver-command xscreensaver-demo \
297 xscreensaver-getimage @EXES_OSX@ ; do \
298 echo $(INSTALL_PROGRAM) $$exe $(install_prefix)$(bindir)/$$exe ; \
299 $(INSTALL_PROGRAM) $$exe $(install_prefix)$(bindir)/$$exe ; \
302 install-ad: XScreenSaver.ad
303 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
304 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
306 @-echo $(INSTALL_DATA) XScreenSaver.ad \
307 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
308 if $(INSTALL_DATA) XScreenSaver.ad \
309 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
313 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
315 $$e " ####################################################################";\
316 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
317 $$e " That file exists, and is unwritable. It is probably from" ;\
318 $$e " an older version of xscreensaver, and could cause things" ;\
319 $$e " to malfunction. Please delete it!" ;\
320 $$e " ####################################################################";\
325 $$e " ####################################################################";\
326 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
327 $$e " The directory is unwritable. This is probably ok;" ;\
328 $$e " xscreensaver should work without that file." ;\
329 $$e " ####################################################################";\
335 install-scripts: $(SCRIPTS) munge-scripts
336 @for program in $(SCRIPTS); do \
337 if [ -r $$program ] ; then \
340 p=$(srcdir)/$$program ; \
342 echo $(INSTALL_SCRIPT) $$p \
343 $(install_prefix)$(bindir)/$$program ; \
344 $(INSTALL_SCRIPT) $$p \
345 $(install_prefix)$(bindir)/$$program ; \
348 munge-scripts: $(SCRIPTS)
349 @tmp=/tmp/mf.$$$$ ; \
352 for program in $(SCRIPTS); do \
353 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
354 < $(srcdir)/$$program > $$tmp ; \
355 if cmp -s $(srcdir)/$$program $$tmp ; then \
358 echo "$$program: setting interpreter to $$perl" >&2 ; \
359 cat $$tmp > ./$$program ; \
364 # When installing man pages, we install "foo.man" as "foo.N" and update
365 # the .TH line in the installed file with one like
367 # .TH XScreenSaver N "V.VV (DD-MMM-YYYY)" "X Version 11"
369 # where N is the manual section suffix.
373 U=$(UTILS_SRC)/version.h ; \
374 V=`sed -n 's/.*xscreensaver \([0-9]\.[^)]*)\).*/\1/p' < $$U` ; \
375 T=/tmp/xs$$$$.$(mansuffix) ; \
376 TH=".TH XScreenSaver $(mansuffix) \"$$V\" \"X Version 11\"" ; \
377 echo "installing man pages: $$TH" ; \
379 if [ ! -d $(install_prefix)$(manNdir) ]; then \
380 $(INSTALL_DIRS) $(install_prefix)$(manNdir) ; \
383 for man in $$men; do \
384 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
385 manbase=`echo $$man | sed 's/\.man$$//'` ; \
386 TH=".TH $$manbase $(mansuffix) \"$$V\" \"X Version 11\" \"XScreenSaver manual\"" ; \
387 sed -e "s/^\.TH.*/$$TH/" \
388 -e 's/^\(\.BR xscr.*(\)[^()]\(.*\)/\1$(mansuffix)\2/' \
389 -e 's@(MANSUFFIX)@($(mansuffix))@g' \
390 < $(srcdir)/$$man > $$T ; \
391 echo $(INSTALL_DATA) $(srcdir)/$$man \
392 $(install_prefix)$(manNdir)/$$instname ; \
393 $(INSTALL_DATA) $$T \
394 $(install_prefix)$(manNdir)/$$instname ; \
399 @for program in $(EXES) $(SCRIPTS); do \
400 echo rm -f $(install_prefix)$(bindir)/$$program ; \
401 rm -f $(install_prefix)$(bindir)/$$program ; \
405 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
409 for man in $$men; do \
410 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
411 echo rm -f $(install_prefix)$(manNdir)/$$instname* ; \
412 rm -f $(install_prefix)$(manNdir)/$$instname* ; \
416 @src="$(srcdir)/xscreensaver.pam" ; \
417 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
419 dir="$(install_prefix)$(PAM_DIR)" ; \
420 conf="$(PAM_CONF)" ; \
422 if [ -d $$dir ] ; then \
424 if [ -f $$dir/xdm ]; then \
426 elif [ -f $$dir/login ]; then \
430 if [ -z "$$src2" ]; then \
431 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
432 $(INSTALL_DATA) $$src $$dir/$$dest ; \
434 src="xscreensaver.pam.$$$$" ; \
435 echo "grep '^#%\|^auth\|^@include' $$src2 > $$src" ; \
436 grep '^#%\|^auth\|^@include' $$src2 > $$src ; \
437 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
438 $(INSTALL_DATA) $$src $$dir/$$dest ; \
443 if [ ! -f $$dir/$$dest ]; then \
446 $$e " ####################################################################";\
447 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
448 $$e " Authentication Modules (PAM). However, we were unable to" ;\
449 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
450 $$e " to work without this file (and old-style password" ;\
451 $$e " authentication will be used instead, which may or may not" ;\
453 $$e " ####################################################################";\
456 elif [ -f $$conf -a "x$$dest" != "x" ]; then \
457 if ( grep $$dest $$conf >/dev/null ); then \
458 echo "$$conf unchanged: already has an entry for $$dest" ; \
460 src="pam.conf.$$$$" ; \
461 echo "grep -v $$dest $$conf > $$src" ; \
462 grep -v $$dest $$conf > $$src ; \
463 extras=`sed -n "s/^login\(.*auth.*\)$$/$$dest\1/p" $$conf`; \
464 echo "$$extras" >> $$src ; \
465 if [ "x$$extras" = "x" ]; then \
466 echo "Error: no login rules in $$conf?" >&2 ; \
468 echo "adding $$dest rules to $$src:" ; \
469 echo "$$extras" | sed 's/^/ /' ; \
471 echo $(INSTALL_DATA) $$src $$conf ; \
472 $(INSTALL_DATA) $$src $$conf ; \
476 if ( grep $$dest $$conf >/dev/null ); then \
481 $$e " ####################################################################";\
482 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
483 $$e " Authentication Modules (PAM). However, we were unable to" ;\
484 $$e " install xscreensaver rules in the file $$conf." ;\
485 $$e " PAM is unlikely to work without this (and old-style" ;\
486 $$e " password authentication will be used instead, which may" ;\
487 $$e " or may not work.)" ;\
488 $$e " ####################################################################";\
493 # screensaver-properties.desktop
494 # into /usr/share/applications/
495 install-gnome:: screensaver-properties.desktop
496 @if [ "$(GTK_DATADIR)" != "" ]; then \
497 if [ ! -d "$(install_prefix)$(GTK_APPDIR)" ]; then \
498 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_APPDIR)" ;\
499 $(INSTALL_DIRS) "$(install_prefix)$(GTK_APPDIR)" ;\
501 name2=xscreensaver-properties.desktop ;\
502 echo $(INSTALL_DATA) screensaver-properties.desktop \
503 $(install_prefix)$(GTK_APPDIR)/$$name2 ;\
504 $(INSTALL_DATA) screensaver-properties.desktop \
505 $(install_prefix)$(GTK_APPDIR)/$$name2 ;\
510 # into /usr/share/pixmaps/
511 install-gnome:: $(LOGO)
512 @if [ "$(GTK_DATADIR)" != "" ]; then \
513 if [ ! -d "$(install_prefix)$(GTK_ICONDIR)" ]; then \
514 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
515 $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
517 target=xscreensaver.xpm ;\
518 echo $(INSTALL_DATA) $(LOGO) \
519 $(install_prefix)$(GTK_ICONDIR)/$$target ;\
520 $(INSTALL_DATA) $(LOGO) \
521 $(install_prefix)$(GTK_ICONDIR)/$$target ;\
524 # ../utils/images/screensaver-*.png
525 # into /usr/share/xscreensaver/glade/
527 @if [ "$(GTK_DATADIR)" != "" ]; then \
528 if [ ! -d "$(install_prefix)$(GTK_GLADEDIR)" ]; then \
529 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
530 $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
532 for target in $(GTK_ICONS) ; do \
533 dest=`echo $$target | sed 's@^.*/@@'` ;\
534 echo $(INSTALL_DATA) $$target \
535 $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
536 $(INSTALL_DATA) $$target \
537 $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
541 # xscreensaver-demo.glade2
542 # into /usr/share/xscreensaver/glade/
543 install-gnome:: xscreensaver-demo.glade2
544 @if [ "$(GTK_DATADIR)" != "" ]; then \
545 if [ ! -d "$(install_prefix)$(GTK_GLADEDIR)" ]; then \
546 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
547 $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
549 target=xscreensaver-demo.glade2 ;\
550 echo $(INSTALL_DATA) $(srcdir)/$$target \
551 $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
552 if $(INSTALL_DATA) $(srcdir)/$$target \
553 $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
558 $$e " ####################################################################";\
559 $$e " Warning: unable to install $$target into" ;\
560 $$e " $(install_prefix)$(GTK_GLADEDIR)/." ;\
561 $$e " Without this file, xscreensaver-demo will not" ;\
562 $$e " be able to run properly." ;\
563 $$e " ####################################################################";\
570 # screensaver-properties.desktop
571 # into /usr/share/applications/
573 @if [ "$(GTK_DATADIR)" != "" ]; then \
574 f=xscreensaver-properties.desktop ;\
575 echo rm -f $(install_prefix)$(GTK_APPDIR)/$$f ;\
576 rm -f $(install_prefix)$(GTK_APPDIR)/$$f ;\
580 # into /usr/share/pixmaps/
582 @if [ "$(GTK_ICONDIR)" != "" ]; then \
583 target=xscreensaver.xpm ;\
584 echo rm -f $(install_prefix)$(GTK_ICONDIR)/$$target ;\
585 rm -f $(install_prefix)$(GTK_ICONDIR)/$$target ;\
588 # ../utils/images/screensaver-*.png
589 # into /usr/share/xscreensaver/glade/
591 @if [ "$(GTK_DATADIR)" != "" ]; then \
592 for target in $(GTK_ICONS) ; do \
593 dest=`echo $$target | sed 's@^.*/@@'` ;\
594 echo rm -f $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
595 rm -f $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
599 # xscreensaver-demo.glade2
600 # into /usr/share/xscreensaver/glade/
601 uninstall-gnome:: xscreensaver-demo.glade2
602 @if [ "$(GTK_DATADIR)" != "" ]; then \
603 target=xscreensaver-demo.glade2 ;\
604 echo rm -f $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
605 rm -f $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
608 # /usr/share/xscreensaver/config/README
610 @dest=$(install_prefix)$(HACK_CONF_DIR) ; \
611 if [ ! -d $$dest ]; then \
612 $(INSTALL_DIRS) $$dest ; \
614 src=$(srcdir)/../hacks/config ; \
615 echo $(INSTALL_DATA) $$src/README $$dest/README ; \
616 $(INSTALL_DATA) $$src/README $$dest/README
619 # /usr/share/xscreensaver/config/README
621 rm -f $(install_prefix)$(HACK_CONF_DIR)/README
624 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) \
625 XScreenSaver_ad.h XScreenSaver_Xm_ad.h
628 -rm -f Makefile XScreenSaver.ad \
629 TAGS *~ "#"* screensaver-properties.desktop
631 # Adds all current dependencies to Makefile
632 depend: XScreenSaver_ad.h XScreenSaver_Xm_ad.h
633 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
635 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
636 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
638 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
639 # close. This excludes dependencies on files in /usr/include, etc. It tries
640 # to include only dependencies on files which are themselves a part of this
642 distdepend: check_men update_ad_version XScreenSaver_ad.h XScreenSaver_Xm_ad.h
643 @echo updating dependencies in `pwd`/Makefile.in... ; \
644 $(DEPEND) -w 0 -f - \
645 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
646 $(INCLUDES) -I$(ICON_SRC) $(DEFS) $(DEPEND_DEFINES) \
647 $(CFLAGS) $(X_CFLAGS) -- \
648 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
649 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
650 $(TEST_SRCS) 2>/dev/null | \
653 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
655 -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
656 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
657 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
658 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
659 -e 's@$$.*\(XScreenSaver_Xm_ad\)@\1@g' \
660 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
662 ) > /tmp/distdepend.$$$$ && \
663 mv Makefile.in Makefile.in.bak && \
664 mv /tmp/distdepend.$$$$ Makefile.in
666 # Updates the version number in the app-defaults file to be in sync with
667 # the version number in version.h. This is so people can tell when they
668 # have a version skew between the app-defaults file and the executable.
669 # Also update hacks/config/README in the same way.
672 files="XScreenSaver.ad.in ../hacks/config/README ../OSX/bindist.rtf" ; \
673 U=$(UTILS_SRC)/version.h ; \
674 V=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' < $$U` ; \
675 D=`date '+%d-%b-%Y'` ; \
676 for S in $$files ; do \
678 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*[ab]*[0-9]*\(.*\)/\1$$V\2/" \
679 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
681 if cmp -s $$S $$T ; then \
685 echo "updated $$S to $$V $$D" ; \
692 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
695 @$(MAKE) XScreenSaver_ad.h XScreenSaver_Xm_ad.h 2>&1 >/dev/null
700 for exe in $(EXES); do \
701 if ! [ -f $(srcdir)/$$exe.man ]; then \
702 badmen="$$badmen $$exe" ; \
705 if [ -n "$$badmen" ]; then \
707 echo "Warning: The following programs have no manuals:" ; \
709 for m in $$badmen ; do \
716 # Rules for noticing when the objects from the utils directory are out of
717 # date with respect to their sources, and going and building them according
718 # to the rules in their own Makefile...
720 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
721 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
722 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
723 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
724 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
725 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
726 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
727 $(UTILS_BIN)/minixpm.o: $(UTILS_SRC)/minixpm.c
728 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
729 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
733 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
735 # How we build object files in this directory.
737 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
740 $(OBJCC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
742 # subprocs takes an extra -D option.
743 subprocs.o: subprocs.c
744 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
747 # demo-Gtk takes extra -D options, and an extra -I option.
748 demo-Gtk.o: demo-Gtk.c
749 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) \
750 $(GTK_DEFS) $(INTL_DEFS) $(CFLAGS) $(X_CFLAGS) \
753 # demo-Gtk-conf takes an extra -D option.
754 demo-Gtk-conf.o: demo-Gtk-conf.c
755 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
756 $(srcdir)/demo-Gtk-conf.c
759 # How we build the default app-defaults file into the program.
761 XScreenSaver_ad.h: XScreenSaver.ad
762 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
764 XScreenSaver_Xm_ad.h: XScreenSaver-Xm.ad
765 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver-Xm.ad > XScreenSaver_Xm_ad.h
767 @INTLTOOL_DESKTOP_RULE@
769 # The executables linked in this directory.
771 xscreensaver: $(SAVER_OBJS)
772 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
774 xscreensaver-command: $(CMD_OBJS)
775 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
778 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
779 @if [ "@PREFERRED_DEMO_PROGRAM@" = "" ]; then \
780 echo "WARNING: neither GTK nor Motif are available," \
781 "therefore no xscreensaver-demo!" ; \
784 echo cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
785 cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
788 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
789 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
790 $(MOTIF_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
791 $(XDPMS_LIBS) $(XINERAMA_LIBS) -lXext $(X_EXTRA_LIBS)
793 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
794 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
795 $(GTK_LIBS) $(XPM_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) \
796 -lXt -lX11 $(XDPMS_LIBS) $(XINERAMA_LIBS) -lXext $(X_EXTRA_LIBS)
798 demo-Gtk.o: XScreenSaver_ad.h
799 demo-Xm.o: XScreenSaver_Xm_ad.h
801 xscreensaver-getimage: $(GETIMG_OBJS)
802 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
804 pdf2jpeg: $(PDF2JPEG_OBJS)
805 $(OBJCC) $(LDFLAGS) -o $@ $(PDF2JPEG_OBJS) $(PDF2JPEG_LIBS) -lm
808 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
809 subprocs.o setuid.o splash.o prefs.o mlstring.o exec.o \
811 test-passwd.o: XScreenSaver_ad.h
813 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
814 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
817 $(CC) $(LDFLAGS) -o $@ test-uid.o
819 test-xdpms: test-xdpms.o
820 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
821 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
823 test-xinerama: test-xinerama.o
824 $(CC) $(LDFLAGS) -o $@ test-xinerama.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
825 $(X_PRE_LIBS) $(XINERAMA_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
828 $(CC) $(LDFLAGS) -o $@ test-vp.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
829 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
831 test-randr: test-randr.o
832 $(CC) $(LDFLAGS) -o $@ test-randr.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
833 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
835 test-grab: test-grab.o
836 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
839 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
841 test-mlstring.o: mlstring.c
842 test-mlstring: test-mlstring.o
843 $(CC) -DTEST $(LDFLAGS) -o $@ test-mlstring.o $(SAVER_LIBS)
845 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
846 test-fade: test-fade.o $(UTILS_BIN)/fade.o
847 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
849 TEST_SCREENS_OBJS = test-screens.o $(DEMO_UTIL_OBJS)
850 test-screens.o: screens.c
851 test-screens: test-screens.o
852 $(CC) $(LDFLAGS) -o $@ $(TEST_SCREENS_OBJS) $(SAVER_LIBS)
855 xdpyinfo.o: xdpyinfo.c
856 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
860 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
861 $(LIBS) $(X_LIBS) @GL_LIBS@ \
862 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
865 ##############################################################################
867 # DO NOT DELETE: updated by make distdepend