1 # driver/Makefile.in --- xscreensaver, Copyright (c) 1997-2010 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 = @PO_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_1 = -I. -I$(srcdir) -I$(UTILS_SRC) -I..
91 INCLUDES = $(INCLUDES_1) @INCLUDES@
93 MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
94 MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
96 GTK_SRCS = demo-Gtk.c demo-Gtk-conf.c \
97 demo-Gtk-widgets.c demo-Gtk-support.c
98 GTK_EXTRA_OBJS = demo-Gtk-widgets.o demo-Gtk-support.o
99 GTK_OBJS = demo-Gtk.o demo-Gtk-conf.o @GTK_EXTRA_OBJS@
101 PWENT_SRCS = passwd-pwent.c
102 PWENT_OBJS = passwd-pwent.o
104 KERBEROS_SRCS = passwd-kerberos.c
105 KERBEROS_OBJS = passwd-kerberos.o
107 PAM_SRCS = passwd-pam.c
108 PAM_OBJS = passwd-pam.o
110 PWHELPER_SRCS = passwd-helper.c
111 PWHELPER_OBJS = passwd-helper.o
113 LOCK_SRCS_1 = lock.c passwd.c
114 LOCK_OBJS_1 = lock.o passwd.o
115 NOLOCK_SRCS_1 = lock.c
116 NOLOCK_OBJS_1 = lock.o
118 TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
119 test-apm.c test-fade.c test-xinerama.c test-vp.c \
120 test-randr.c xdpyinfo.c test-mlstring.c test-screens.c
121 TEST_EXES = test-passwd test-uid test-xdpms test-grab \
122 test-apm test-fade test-xinerama test-vp \
123 test-randr xdpyinfo test-mlstring test-screens
125 MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
126 GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS)
127 XML_LIBS = @XML_LIBS@
129 XDPMS_LIBS = @XDPMS_LIBS@
130 XINERAMA_LIBS = @XINERAMA_LIBS@
131 XINPUT_LIBS = @XINPUT_LIBS@
133 PASSWD_SRCS = @PASSWD_SRCS@
134 PASSWD_OBJS = @PASSWD_OBJS@
135 PASSWD_LIBS = @PASSWD_LIBS@
137 LOCK_SRCS = @LOCK_SRCS@
138 LOCK_OBJS = @LOCK_OBJS@
140 XMU_SRCS = @XMU_SRCS@
141 XMU_OBJS = @XMU_OBJS@
143 GL_SRCS = @SAVER_GL_SRCS@
144 GL_OBJS = @SAVER_GL_OBJS@
145 GL_LIBS = @SAVER_GL_LIBS@
147 ICON_SRC = $(UTILS_SRC)/images
148 LOGO = $(ICON_SRC)/logo-50.xpm
149 GTK_ICONS = $(ICON_SRC)/screensaver-*.png
151 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
152 $(UTILS_SRC)/visual.c $(XMU_SRCS)
153 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
154 $(UTILS_BIN)/visual.o $(XMU_OBJS)
156 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
157 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
158 $(UTILS_SRC)/minixpm.c \
160 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
161 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
162 $(UTILS_BIN)/minixpm.o \
165 GETIMG_SRCS_1 = xscreensaver-getimage.c
166 GETIMG_OBJS_1 = xscreensaver-getimage.o
168 GETIMG_SRCS = $(GETIMG_SRCS_1) \
169 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
170 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
171 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
172 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
173 $(UTILS_BIN)/logo.o $(UTILS_BIN)/minixpm.o prefs.o \
176 GETIMG_OBJS = $(GETIMG_OBJS_1) \
177 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
178 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
179 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
180 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
181 $(UTILS_BIN)/logo.o $(UTILS_BIN)/minixpm.o prefs.o \
184 SAVER_SRCS_1 = xscreensaver.c windows.c screens.c timers.c subprocs.c \
185 exec.c xset.c splash.c setuid.c stderr.c mlstring.c
186 SAVER_OBJS_1 = xscreensaver.o windows.o screens.o timers.o subprocs.o \
187 exec.o xset.o splash.o setuid.o stderr.o mlstring.o
189 SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
190 $(SAVER_UTIL_SRCS) $(GL_SRCS)
191 SAVER_OBJS = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
192 $(SAVER_UTIL_OBJS) $(GL_OBJS)
194 CMD_SRCS = remote.c xscreensaver-command.c
195 CMD_OBJS = remote.o xscreensaver-command.o
197 DEMO_SRCS_1 = prefs.c dpms.c
198 DEMO_OBJS_1 = prefs.o dpms.o
200 DEMO_SRCS = $(DEMO_SRCS_1) remote.c exec.c $(DEMO_UTIL_SRCS)
201 DEMO_OBJS = $(DEMO_OBJS_1) remote.o exec.o $(DEMO_UTIL_OBJS)
203 PDF2JPEG_SRCS = pdf2jpeg.m
204 PDF2JPEG_OBJS = pdf2jpeg.o
205 PDF2JPEG_LIBS = -framework Cocoa
207 SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
208 $(XDPMS_LIBS) $(XINERAMA_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
209 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
212 CMD_LIBS = $(LIBS) $(X_LIBS) \
213 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
215 GETIMG_LIBS = $(LIBS) $(X_LIBS) $(XPM_LIBS) $(JPEG_LIBS) \
216 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
218 EXES = xscreensaver xscreensaver-command xscreensaver-demo \
219 xscreensaver-getimage @EXES_OSX@
220 EXES2 = @ALL_DEMO_PROGRAMS@
223 SCRIPTS_1 = xscreensaver-getimage-file xscreensaver-getimage-video \
225 SCRIPTS_OSX = xscreensaver-getimage-desktop
226 SCRIPTS = $(SCRIPTS_1) @SCRIPTS_OSX@
228 HDRS = XScreenSaver_ad.h XScreenSaver_Xm_ad.h \
229 xscreensaver.h prefs.h remote.h exec.h \
230 demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
231 demo-Gtk-conf.h auth.h mlstring.h types.h
232 MEN_1 = xscreensaver.man xscreensaver-demo.man \
233 xscreensaver-command.man \
234 xscreensaver-text.man \
235 xscreensaver-getimage.man \
236 xscreensaver-getimage-file.man \
237 xscreensaver-getimage-video.man
238 MEN_OSX = xscreensaver-getimage-desktop.man pdf2jpeg.man
239 MEN = $(MEN_1) @MEN_OSX@
241 EXTRAS = README Makefile.in \
242 XScreenSaver.ad.in XScreenSaver-Xm.ad xscreensaver.pam.in \
243 xscreensaver-demo.glade2 xscreensaver-demo.glade2p \
244 screensaver-properties.desktop.in \
246 VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
247 vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
248 vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
250 TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
251 $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) $(PWHELPER_SRCS) \
252 $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
253 $(CMD_SRCS) $(GETIMG_SRCS_1) $(PDF2JPEG_SRCS) $(HDRS) \
254 $(SCRIPTS_1) $(SCRIPTS_OSX) $(MEN_1) $(MEN_OSX) \
259 all: $(EXES) $(EXES2)
262 install: install-program install-ad install-scripts \
263 install-gnome install-man install-xml install-pam
264 uninstall: uninstall-program uninstall-ad \
265 uninstall-gnome uninstall-man uninstall-xml
268 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
271 install-program: $(EXES)
272 @if [ ! -d $(install_prefix)$(bindir) ]; then \
273 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
275 @inst="$(INSTALL_PROGRAM)" ; \
276 if [ @NEED_SETUID@ = yes ]; then \
277 me=`PATH="$$PATH:/usr/ucb" whoami` ; \
278 if [ "$$me" = root ]; then \
279 inst="$(INSTALL_SETUID)" ; \
283 $$e " ####################################################################";\
284 $$e " Warning: xscreensaver has been compiled with support for shadow" ;\
285 $$e " passwords. If your system actually uses shadow passwords," ;\
286 $$e " then xscreensaver must be installed as a setuid root" ;\
287 $$e " program in order for locking to work. To do this, you" ;\
288 $$e " must run 'make install' as 'root', not as '$$me'." ;\
290 $$e " For now, xscreensaver will be installed non-setuid, which" ;\
291 $$e " means that locking might not work. (Try it and see.)" ;\
292 $$e " ####################################################################";\
296 echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \
297 $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
298 @for exe in xscreensaver-command xscreensaver-demo \
299 xscreensaver-getimage @EXES_OSX@ ; do \
300 echo $(INSTALL_PROGRAM) $$exe $(install_prefix)$(bindir)/$$exe ; \
301 $(INSTALL_PROGRAM) $$exe $(install_prefix)$(bindir)/$$exe ; \
304 install-ad: XScreenSaver.ad
305 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
306 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
308 @-echo $(INSTALL_DATA) XScreenSaver.ad \
309 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
310 if $(INSTALL_DATA) XScreenSaver.ad \
311 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
315 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
317 $$e " ####################################################################";\
318 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
319 $$e " That file exists, and is unwritable. It is probably from" ;\
320 $$e " an older version of xscreensaver, and could cause things" ;\
321 $$e " to malfunction. Please delete it!" ;\
322 $$e " ####################################################################";\
327 $$e " ####################################################################";\
328 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
329 $$e " The directory is unwritable. This is probably ok;" ;\
330 $$e " xscreensaver should work without that file." ;\
331 $$e " ####################################################################";\
337 install-scripts: $(SCRIPTS) munge-scripts
338 @for program in $(SCRIPTS); do \
339 if [ -r $$program ] ; then \
342 p=$(srcdir)/$$program ; \
344 echo $(INSTALL_SCRIPT) $$p \
345 $(install_prefix)$(bindir)/$$program ; \
346 $(INSTALL_SCRIPT) $$p \
347 $(install_prefix)$(bindir)/$$program ; \
350 munge-scripts: $(SCRIPTS)
351 @tmp=/tmp/mf.$$$$ ; \
354 for program in $(SCRIPTS); do \
355 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
356 < $(srcdir)/$$program > $$tmp ; \
357 if cmp -s $(srcdir)/$$program $$tmp ; then \
360 echo "$$program: setting interpreter to $$perl" >&2 ; \
361 cat $$tmp > ./$$program ; \
366 # When installing man pages, we install "foo.man" as "foo.N" and update
367 # the .TH line in the installed file with one like
369 # .TH XScreenSaver N "V.VV (DD-MMM-YYYY)" "X Version 11"
371 # where N is the manual section suffix.
375 U=$(UTILS_SRC)/version.h ; \
376 V=`sed -n 's/.*xscreensaver \([0-9]\.[^)]*)\).*/\1/p' < $$U` ; \
377 T=/tmp/xs$$$$.$(mansuffix) ; \
378 TH=".TH XScreenSaver $(mansuffix) \"$$V\" \"X Version 11\"" ; \
379 echo "installing man pages: $$TH" ; \
381 if [ ! -d $(install_prefix)$(manNdir) ]; then \
382 $(INSTALL_DIRS) $(install_prefix)$(manNdir) ; \
385 for man in $$men; do \
386 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
387 manbase=`echo $$man | sed 's/\.man$$//'` ; \
388 TH=".TH $$manbase $(mansuffix) \"$$V\" \"X Version 11\" \"XScreenSaver manual\"" ; \
389 sed -e "s/^\.TH.*/$$TH/" \
390 -e 's/^\(\.BR xscr.*(\)[^()]\(.*\)/\1$(mansuffix)\2/' \
391 -e 's@(MANSUFFIX)@($(mansuffix))@g' \
392 < $(srcdir)/$$man > $$T ; \
393 echo $(INSTALL_DATA) $(srcdir)/$$man \
394 $(install_prefix)$(manNdir)/$$instname ; \
395 $(INSTALL_DATA) $$T \
396 $(install_prefix)$(manNdir)/$$instname ; \
401 @for program in $(EXES) $(SCRIPTS); do \
402 echo rm -f $(install_prefix)$(bindir)/$$program ; \
403 rm -f $(install_prefix)$(bindir)/$$program ; \
407 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
411 for man in $$men; do \
412 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
413 echo rm -f $(install_prefix)$(manNdir)/$$instname* ; \
414 rm -f $(install_prefix)$(manNdir)/$$instname* ; \
417 install-pam: xscreensaver.pam
418 @src="xscreensaver.pam" ; \
419 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
421 dir="$(install_prefix)$(PAM_DIR)" ; \
422 conf="$(PAM_CONF)" ; \
424 if [ -d $$dir ] ; then \
426 if [ -f $$dir/xdm ]; then \
428 elif [ -f $$dir/login ]; then \
432 if [ -z "$$src2" ]; then \
433 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
434 $(INSTALL_DATA) $$src $$dir/$$dest ; \
436 src="xscreensaver.pam.$$$$" ; \
437 echo "grep '^#%\|^auth\|^@include' $$src2 > $$src" ; \
438 grep '^#%\|^auth\|^@include' $$src2 > $$src ; \
439 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
440 $(INSTALL_DATA) $$src $$dir/$$dest ; \
445 if [ ! -f $$dir/$$dest ]; then \
448 $$e " ####################################################################";\
449 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
450 $$e " Authentication Modules (PAM). However, we were unable to" ;\
451 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
452 $$e " to work without this file (and old-style password" ;\
453 $$e " authentication will be used instead, which may or may not" ;\
455 $$e " ####################################################################";\
458 elif [ -f $$conf -a "x$$dest" != "x" ]; then \
459 if ( grep $$dest $$conf >/dev/null ); then \
460 echo "$$conf unchanged: already has an entry for $$dest" ; \
462 src="pam.conf.$$$$" ; \
463 echo "grep -v $$dest $$conf > $$src" ; \
464 grep -v $$dest $$conf > $$src ; \
465 extras=`sed -n "s/^login\(.*auth.*\)$$/$$dest\1/p" $$conf`; \
466 echo "$$extras" >> $$src ; \
467 if [ "x$$extras" = "x" ]; then \
468 echo "Error: no login rules in $$conf?" >&2 ; \
470 echo "adding $$dest rules to $$src:" ; \
471 echo "$$extras" | sed 's/^/ /' ; \
473 echo $(INSTALL_DATA) $$src $$conf ; \
474 $(INSTALL_DATA) $$src $$conf ; \
478 if ( grep $$dest $$conf >/dev/null ); then \
483 $$e " ####################################################################";\
484 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
485 $$e " Authentication Modules (PAM). However, we were unable to" ;\
486 $$e " install xscreensaver rules in the file $$conf." ;\
487 $$e " PAM is unlikely to work without this (and old-style" ;\
488 $$e " password authentication will be used instead, which may" ;\
489 $$e " or may not work.)" ;\
490 $$e " ####################################################################";\
495 # screensaver-properties.desktop
496 # into /usr/share/applications/
497 install-gnome:: screensaver-properties.desktop
498 @if [ "$(GTK_DATADIR)" != "" ]; then \
499 if [ ! -d "$(install_prefix)$(GTK_APPDIR)" ]; then \
500 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_APPDIR)" ;\
501 $(INSTALL_DIRS) "$(install_prefix)$(GTK_APPDIR)" ;\
503 name2=xscreensaver-properties.desktop ;\
504 echo $(INSTALL_DATA) screensaver-properties.desktop \
505 $(install_prefix)$(GTK_APPDIR)/$$name2 ;\
506 $(INSTALL_DATA) screensaver-properties.desktop \
507 $(install_prefix)$(GTK_APPDIR)/$$name2 ;\
512 # into /usr/share/pixmaps/
513 install-gnome:: $(LOGO)
514 @if [ "$(GTK_DATADIR)" != "" ]; then \
515 if [ ! -d "$(install_prefix)$(GTK_ICONDIR)" ]; then \
516 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
517 $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
519 target=xscreensaver.xpm ;\
520 echo $(INSTALL_DATA) $(LOGO) \
521 $(install_prefix)$(GTK_ICONDIR)/$$target ;\
522 $(INSTALL_DATA) $(LOGO) \
523 $(install_prefix)$(GTK_ICONDIR)/$$target ;\
526 # ../utils/images/screensaver-*.png
527 # into /usr/share/xscreensaver/glade/
529 @if [ "$(GTK_DATADIR)" != "" ]; then \
530 if [ ! -d "$(install_prefix)$(GTK_GLADEDIR)" ]; then \
531 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
532 $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
534 for target in $(GTK_ICONS) ; do \
535 dest=`echo $$target | sed 's@^.*/@@'` ;\
536 echo $(INSTALL_DATA) $$target \
537 $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
538 $(INSTALL_DATA) $$target \
539 $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
543 # xscreensaver-demo.glade2
544 # into /usr/share/xscreensaver/glade/
545 install-gnome:: xscreensaver-demo.glade2
546 @if [ "$(GTK_DATADIR)" != "" ]; then \
547 if [ ! -d "$(install_prefix)$(GTK_GLADEDIR)" ]; then \
548 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
549 $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
551 target=xscreensaver-demo.glade2 ;\
552 echo $(INSTALL_DATA) $(srcdir)/$$target \
553 $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
554 if $(INSTALL_DATA) $(srcdir)/$$target \
555 $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
560 $$e " ####################################################################";\
561 $$e " Warning: unable to install $$target into" ;\
562 $$e " $(install_prefix)$(GTK_GLADEDIR)/." ;\
563 $$e " Without this file, xscreensaver-demo will not" ;\
564 $$e " be able to run properly." ;\
565 $$e " ####################################################################";\
572 # screensaver-properties.desktop
573 # into /usr/share/applications/
575 @if [ "$(GTK_DATADIR)" != "" ]; then \
576 f=xscreensaver-properties.desktop ;\
577 echo rm -f $(install_prefix)$(GTK_APPDIR)/$$f ;\
578 rm -f $(install_prefix)$(GTK_APPDIR)/$$f ;\
582 # into /usr/share/pixmaps/
584 @if [ "$(GTK_ICONDIR)" != "" ]; then \
585 target=xscreensaver.xpm ;\
586 echo rm -f $(install_prefix)$(GTK_ICONDIR)/$$target ;\
587 rm -f $(install_prefix)$(GTK_ICONDIR)/$$target ;\
590 # ../utils/images/screensaver-*.png
591 # into /usr/share/xscreensaver/glade/
593 @if [ "$(GTK_DATADIR)" != "" ]; then \
594 for target in $(GTK_ICONS) ; do \
595 dest=`echo $$target | sed 's@^.*/@@'` ;\
596 echo rm -f $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
597 rm -f $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
601 # xscreensaver-demo.glade2
602 # into /usr/share/xscreensaver/glade/
603 uninstall-gnome:: xscreensaver-demo.glade2
604 @if [ "$(GTK_DATADIR)" != "" ]; then \
605 target=xscreensaver-demo.glade2 ;\
606 echo rm -f $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
607 rm -f $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
610 # /usr/share/xscreensaver/config/README
612 @dest=$(install_prefix)$(HACK_CONF_DIR) ; \
613 if [ ! -d $$dest ]; then \
614 $(INSTALL_DIRS) $$dest ; \
616 src=$(srcdir)/../hacks/config ; \
617 echo $(INSTALL_DATA) $$src/README $$dest/README ; \
618 $(INSTALL_DATA) $$src/README $$dest/README
621 # /usr/share/xscreensaver/config/README
623 rm -f $(install_prefix)$(HACK_CONF_DIR)/README
626 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) \
627 XScreenSaver_ad.h XScreenSaver_Xm_ad.h
630 -rm -f Makefile XScreenSaver.ad \
631 TAGS *~ "#"* screensaver-properties.desktop
633 # Adds all current dependencies to Makefile
634 depend: XScreenSaver_ad.h XScreenSaver_Xm_ad.h
635 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
637 $(INCLUDES_1) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
638 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
640 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
641 # close. This excludes dependencies on files in /usr/include, etc. It tries
642 # to include only dependencies on files which are themselves a part of this
644 distdepend: check_men update_ad_version XScreenSaver_ad.h XScreenSaver_Xm_ad.h
645 @echo updating dependencies in `pwd`/Makefile.in... ; \
646 $(DEPEND) -w 0 -f - \
647 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
648 $(INCLUDES_1) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
649 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
650 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
651 $(TEST_SRCS) 2>/dev/null | \
654 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
656 -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
657 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
658 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
659 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
660 -e 's@$$.*\(XScreenSaver_Xm_ad\)@\1@g' \
661 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
663 ) > /tmp/distdepend.$$$$ && \
664 mv Makefile.in Makefile.in.bak && \
665 mv /tmp/distdepend.$$$$ Makefile.in
667 # Updates the version number in the app-defaults file to be in sync with
668 # the version number in version.h. This is so people can tell when they
669 # have a version skew between the app-defaults file and the executable.
670 # Also update hacks/config/README in the same way.
673 files="XScreenSaver.ad.in ../hacks/config/README ../OSX/bindist.rtf" ; \
674 U=$(UTILS_SRC)/version.h ; \
675 V=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' < $$U` ; \
677 D=`date '+%d-%b-%Y'` ; \
678 for S in $$files ; do \
680 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*[ab]*[0-9]*\(.*\)/\1$$V\2/" \
681 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
682 -e "s/\( [0-9][0-9][0-9][0-9]-\)[0-9][0-9][0-9][0-9] /\1$$Y /" \
684 if cmp -s $$S $$T ; then \
688 echo "updated $$S to $$V $$D" ; \
695 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
698 @$(MAKE) XScreenSaver_ad.h XScreenSaver_Xm_ad.h 2>&1 >/dev/null
703 for exe in $(EXES); do \
704 if ! [ -f $(srcdir)/$$exe.man ]; then \
705 badmen="$$badmen $$exe" ; \
708 if [ -n "$$badmen" ]; then \
710 echo "Warning: The following programs have no manuals:" ; \
712 for m in $$badmen ; do \
719 # Rules for noticing when the objects from the utils directory are out of
720 # date with respect to their sources, and going and building them according
721 # to the rules in their own Makefile...
723 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
724 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
725 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
726 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
727 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
728 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
729 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
730 $(UTILS_BIN)/minixpm.o: $(UTILS_SRC)/minixpm.c
731 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
732 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
735 $(MAKE) -C $(UTILS_BIN) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
737 # How we build object files in this directory.
739 $(CC) -c $(INCLUDES) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(X_CFLAGS) $<
742 $(OBJCC) -c $(INCLUDES) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(X_CFLAGS) $<
744 # subprocs takes an extra -D option.
745 subprocs.o: subprocs.c
746 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CPPFLAGS) $(CFLAGS) $(X_CFLAGS) \
749 # xscreensaver takes an extra -D option.
750 xscreensaver.o: xscreensaver.c
751 $(CC) -c $(INCLUDES) $(DEFS) $(INTL_DEFS) $(CPPFLAGS) $(CFLAGS) $(X_CFLAGS) \
752 $(srcdir)/xscreensaver.c
754 # demo-Gtk takes extra -D options, and an extra -I option.
755 demo-Gtk.o: demo-Gtk.c
756 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) \
757 $(GTK_DEFS) $(INTL_DEFS) $(CPPFLAGS) $(CFLAGS) $(X_CFLAGS) \
760 # demo-Gtk-conf takes an extra -D option.
761 demo-Gtk-conf.o: demo-Gtk-conf.c
762 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CPPFLAGS) $(CFLAGS) $(X_CFLAGS) \
763 $(srcdir)/demo-Gtk-conf.c
766 # How we build the default app-defaults file into the program.
768 XScreenSaver_ad.h: XScreenSaver.ad
769 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
771 XScreenSaver_Xm_ad.h: XScreenSaver-Xm.ad
772 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver-Xm.ad > XScreenSaver_Xm_ad.h
774 # What was this for? Now it's undefined.
775 # @INTLTOOL_DESKTOP_RULE@
777 # The executables linked in this directory.
779 xscreensaver: $(SAVER_OBJS)
780 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
782 xscreensaver-command: $(CMD_OBJS)
783 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
786 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
787 @if [ "@PREFERRED_DEMO_PROGRAM@" = "" ]; then \
788 echo "WARNING: neither GTK nor Motif are available," \
789 "therefore no xscreensaver-demo!" ; \
792 echo cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
793 cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
796 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
797 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
798 $(MOTIF_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
799 $(XDPMS_LIBS) $(XINERAMA_LIBS) -lXext $(X_EXTRA_LIBS)
801 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
802 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
803 $(GTK_LIBS) $(XPM_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) \
804 -lXt -lX11 $(XDPMS_LIBS) $(XINERAMA_LIBS) -lXext $(X_EXTRA_LIBS)
806 demo-Gtk.o: XScreenSaver_ad.h
807 demo-Xm.o: XScreenSaver_Xm_ad.h
808 xscreensaver.o: XScreenSaver_ad.h
809 xscreensaver-getimage.o: XScreenSaver_ad.h
811 xscreensaver-getimage: $(GETIMG_OBJS)
812 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
814 pdf2jpeg: $(PDF2JPEG_OBJS)
815 $(OBJCC) $(LDFLAGS) -o $@ $(PDF2JPEG_OBJS) $(PDF2JPEG_LIBS) -lm
818 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
819 subprocs.o setuid.o splash.o prefs.o mlstring.o exec.o \
821 test-passwd.o: XScreenSaver_ad.h
823 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
824 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
827 $(CC) $(LDFLAGS) -o $@ test-uid.o
829 test-xdpms: test-xdpms.o
830 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
831 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
833 test-xinerama: test-xinerama.o
834 $(CC) $(LDFLAGS) -o $@ test-xinerama.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
835 $(X_PRE_LIBS) $(XINERAMA_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
838 $(CC) $(LDFLAGS) -o $@ test-vp.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
839 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
841 test-randr: test-randr.o
842 $(CC) $(LDFLAGS) -o $@ test-randr.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
843 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
845 test-grab: test-grab.o
846 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
849 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
851 test-mlstring.o: mlstring.c
852 test-mlstring: test-mlstring.o
853 $(CC) -DTEST $(LDFLAGS) -o $@ test-mlstring.o $(SAVER_LIBS)
855 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
856 test-fade: test-fade.o $(UTILS_BIN)/fade.o
857 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
859 TEST_SCREENS_OBJS = test-screens.o $(DEMO_UTIL_OBJS)
860 test-screens.o: screens.c
861 test-screens: test-screens.o
862 $(CC) $(LDFLAGS) -o $@ $(TEST_SCREENS_OBJS) $(SAVER_LIBS)
865 xdpyinfo.o: xdpyinfo.c
866 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CPPFLAGS) $(CFLAGS) $(X_CFLAGS) \
870 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
871 $(LIBS) $(X_LIBS) @GL_LIBS@ \
872 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
875 ##############################################################################
877 # DO NOT DELETE: updated by make distdepend
879 demo-Gtk-conf.o: ../config.h
880 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
881 demo-Gtk-conf.o: $(UTILS_SRC)/xscreensaver-intl.h
882 demo-Gtk.o: XScreenSaver_ad.h
883 demo-Gtk.o: ../config.h
884 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
885 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
886 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
887 demo-Gtk.o: $(srcdir)/prefs.h
888 demo-Gtk.o: $(srcdir)/remote.h
889 demo-Gtk.o: $(srcdir)/types.h
890 demo-Gtk.o: $(UTILS_SRC)/resources.h
891 demo-Gtk.o: $(UTILS_SRC)/usleep.h
892 demo-Gtk.o: $(UTILS_SRC)/version.h
893 demo-Gtk.o: $(UTILS_SRC)/visual.h
894 demo-Gtk.o: $(UTILS_SRC)/xscreensaver-intl.h
895 demo-Gtk-support.o: ../config.h
896 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
897 demo-Gtk-widgets.o: ../config.h
898 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
899 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
900 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
901 demo-Xm.o: ../config.h
902 demo-Xm-widgets.o: ../config.h
904 dpms.o: $(srcdir)/prefs.h
905 dpms.o: $(srcdir)/types.h
906 dpms.o: $(srcdir)/xscreensaver.h
908 exec.o: $(srcdir)/exec.h
909 lock.o: $(srcdir)/auth.h
911 lock.o: $(srcdir)/mlstring.h
912 lock.o: $(srcdir)/prefs.h
913 lock.o: $(srcdir)/types.h
914 lock.o: $(UTILS_SRC)/resources.h
915 lock.o: $(srcdir)/xscreensaver.h
916 mlstring.o: $(srcdir)/mlstring.h
917 passwd.o: $(srcdir)/auth.h
918 passwd.o: ../config.h
919 passwd.o: $(srcdir)/prefs.h
920 passwd.o: $(srcdir)/types.h
921 passwd.o: $(srcdir)/xscreensaver.h
922 passwd-pwent.o: ../config.h
924 prefs.o: $(srcdir)/prefs.h
925 prefs.o: $(srcdir)/types.h
926 prefs.o: $(UTILS_SRC)/resources.h
927 prefs.o: $(UTILS_SRC)/version.h
928 remote.o: ../config.h
929 remote.o: $(srcdir)/remote.h
930 screens.o: ../config.h
931 screens.o: $(srcdir)/prefs.h
932 screens.o: $(srcdir)/types.h
933 screens.o: $(UTILS_SRC)/visual.h
934 screens.o: $(srcdir)/xscreensaver.h
935 setuid.o: ../config.h
936 setuid.o: $(srcdir)/prefs.h
937 setuid.o: $(srcdir)/types.h
938 setuid.o: $(srcdir)/xscreensaver.h
939 splash.o: ../config.h
940 splash.o: $(srcdir)/prefs.h
941 splash.o: $(srcdir)/types.h
942 splash.o: $(UTILS_SRC)/resources.h
943 splash.o: $(srcdir)/xscreensaver.h
944 stderr.o: ../config.h
945 stderr.o: $(srcdir)/prefs.h
946 stderr.o: $(srcdir)/types.h
947 stderr.o: $(UTILS_SRC)/resources.h
948 stderr.o: $(UTILS_SRC)/visual.h
949 stderr.o: $(srcdir)/xscreensaver.h
950 subprocs.o: ../config.h
951 subprocs.o: $(srcdir)/exec.h
952 subprocs.o: $(srcdir)/prefs.h
953 subprocs.o: $(srcdir)/types.h
954 subprocs.o: $(UTILS_SRC)/visual.h
955 subprocs.o: $(UTILS_SRC)/yarandom.h
956 subprocs.o: $(srcdir)/xscreensaver.h
957 test-apm.o: ../config.h
958 test-fade.o: ../config.h
959 test-fade.o: $(srcdir)/prefs.h
960 test-fade.o: $(srcdir)/types.h
961 test-fade.o: $(UTILS_SRC)/fade.h
962 test-fade.o: $(srcdir)/xscreensaver.h
963 test-grab.o: ../config.h
964 test-mlstring.o: $(srcdir)/mlstring.c
965 test-mlstring.o: $(srcdir)/mlstring.h
966 test-passwd.o: XScreenSaver_ad.h
967 test-passwd.o: $(srcdir)/auth.h
968 test-passwd.o: ../config.h
969 test-passwd.o: $(srcdir)/prefs.h
970 test-passwd.o: $(srcdir)/types.h
971 test-passwd.o: $(UTILS_SRC)/resources.h
972 test-passwd.o: $(UTILS_SRC)/version.h
973 test-passwd.o: $(UTILS_SRC)/visual.h
974 test-passwd.o: $(srcdir)/xscreensaver.h
975 test-randr.o: ../config.h
976 test-screens.o: ../config.h
977 test-screens.o: $(srcdir)/prefs.h
978 test-screens.o: $(srcdir)/screens.c
979 test-screens.o: $(srcdir)/types.h
980 test-screens.o: $(UTILS_SRC)/visual.h
981 test-screens.o: $(srcdir)/xscreensaver.h
982 test-uid.o: ../config.h
983 test-vp.o: ../config.h
984 test-xdpms.o: ../config.h
985 test-xinerama.o: ../config.h
986 timers.o: ../config.h
987 timers.o: $(srcdir)/prefs.h
988 timers.o: $(srcdir)/types.h
989 timers.o: $(srcdir)/xscreensaver.h
990 windows.o: ../config.h
991 windows.o: $(srcdir)/prefs.h
992 windows.o: $(srcdir)/types.h
993 windows.o: $(UTILS_SRC)/fade.h
994 windows.o: $(UTILS_SRC)/visual.h
995 windows.o: $(srcdir)/xscreensaver.h
996 xscreensaver-command.o: ../config.h
997 xscreensaver-command.o: $(srcdir)/remote.h
998 xscreensaver-command.o: $(UTILS_SRC)/version.h
999 xscreensaver-getimage.o: ../config.h
1000 xscreensaver-getimage.o: XScreenSaver_ad.h
1001 xscreensaver-getimage.o: $(srcdir)/prefs.h
1002 xscreensaver-getimage.o: $(srcdir)/types.h
1003 xscreensaver-getimage.o: $(UTILS_SRC)/colorbars.h
1004 xscreensaver-getimage.o: $(UTILS_SRC)/grabscreen.h
1005 xscreensaver-getimage.o: $(UTILS_SRC)/resources.h
1006 xscreensaver-getimage.o: $(UTILS_SRC)/utils.h
1007 xscreensaver-getimage.o: $(UTILS_SRC)/version.h
1008 xscreensaver-getimage.o: $(UTILS_SRC)/visual.h
1009 xscreensaver-getimage.o: $(UTILS_SRC)/vroot.h
1010 xscreensaver-getimage.o: $(UTILS_SRC)/yarandom.h
1011 xscreensaver.o: XScreenSaver_ad.h
1012 xscreensaver.o: $(srcdir)/auth.h
1013 xscreensaver.o: ../config.h
1014 xscreensaver.o: $(srcdir)/prefs.h
1015 xscreensaver.o: $(srcdir)/types.h
1016 xscreensaver.o: $(UTILS_SRC)/resources.h
1017 xscreensaver.o: $(UTILS_SRC)/usleep.h
1018 xscreensaver.o: $(UTILS_SRC)/version.h
1019 xscreensaver.o: $(UTILS_SRC)/visual.h
1020 xscreensaver.o: $(UTILS_SRC)/yarandom.h
1021 xscreensaver.o: $(srcdir)/xscreensaver.h
1023 xset.o: $(srcdir)/prefs.h
1024 xset.o: $(srcdir)/types.h
1025 xset.o: $(srcdir)/xscreensaver.h