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" >&2 ; \
354 cat $$tmp > ./$$program ; \
359 # When installing man pages, we install "foo.man" as "foo.N" and update
360 # the .TH line in the installed file with one like
362 # .TH XScreenSaver N "V.VV (DD-MMM-YYYY)" "X Version 11"
364 # where N is the manual section suffix.
368 U=$(UTILS_SRC)/version.h ; \
369 V=`sed -n 's/.*\([0-9]\.[^)]*)\).*/\1/p' < $$U` ; \
370 T=/tmp/xs$$$$.$(mansuffix) ; \
371 TH=".TH XScreenSaver $(mansuffix) \"$$V\" \"X Version 11\"" ; \
372 echo "installing man pages: $$TH" ; \
374 if [ ! -d $(install_prefix)$(manNdir) ]; then \
375 $(INSTALL_DIRS) $(install_prefix)$(manNdir) ; \
378 for man in $$men; do \
379 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
380 sed -e "s/^\.TH.*/$$TH/" \
381 -e 's/^\(\.BR xscr.*(\)[^()]\(.*\)/\1$(mansuffix)\2/' \
382 < $(srcdir)/$$man > $$T ; \
383 echo $(INSTALL_DATA) $(srcdir)/$$man \
384 $(install_prefix)$(manNdir)/$$instname ; \
385 $(INSTALL_DATA) $$T \
386 $(install_prefix)$(manNdir)/$$instname ; \
391 @for program in $(EXES) $(SCRIPTS); do \
392 echo rm -f $(install_prefix)$(bindir)/$$program ; \
393 rm -f $(install_prefix)$(bindir)/$$program ; \
397 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
401 for man in $$men; do \
402 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
403 echo rm -f $(install_prefix)$(manNdir)/$$instname* ; \
404 rm -f $(install_prefix)$(manNdir)/$$instname* ; \
408 @src="$(srcdir)/xscreensaver.pam" ; \
409 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
411 dir="$(install_prefix)$(PAM_DIR)" ; \
412 conf="$(PAM_CONF)" ; \
414 if [ -d $$dir ] ; then \
416 if [ -f $$dir/xdm ]; then \
418 elif [ -f $$dir/login ]; then \
422 if [ -z "$$src2" ]; then \
423 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
424 $(INSTALL_DATA) $$src $$dir/$$dest ; \
426 src="xscreensaver.pam.$$$$" ; \
427 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
428 grep '^#%\|^auth' $$src2 > $$src ; \
429 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
430 $(INSTALL_DATA) $$src $$dir/$$dest ; \
435 if [ ! -f $$dir/$$dest ]; then \
438 $$e " ####################################################################";\
439 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
440 $$e " Authentication Modules (PAM). However, we were unable to" ;\
441 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
442 $$e " to work without this file (and old-style password" ;\
443 $$e " authentication will be used instead, which may or may not" ;\
445 $$e " ####################################################################";\
448 elif [ -f $$conf ]; then \
449 if ( grep $$dest $$conf >/dev/null ); then \
450 echo "$$conf unchanged: already has an entry for $$dest" ; \
452 src="pam.conf.$$$$" ; \
453 echo "grep -v $$dest $$conf > $$src" ; \
454 grep -v $$dest $$conf > $$src ; \
455 extras=`sed -n "s/^login\(.*auth.*\)$$/$$dest\1/p" $$conf`; \
456 echo "$$extras" >> $$src ; \
457 if [ "x$$extras" = "x" ]; then \
458 echo "Error: no login rules in $$conf?" >&2 ; \
460 echo "adding $$dest rules to $$src:" ; \
461 echo "$$extras" | sed 's/^/ /' ; \
463 echo $(INSTALL_DATA) $$src $$conf ; \
464 $(INSTALL_DATA) $$src $$conf ; \
468 if ! ( grep $$dest $$conf >/dev/null ); then \
471 $$e " ####################################################################";\
472 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
473 $$e " Authentication Modules (PAM). However, we were unable to" ;\
474 $$e " install xscreensaver rules in the file $$conf." ;\
475 $$e " PAM is unlikely to work without this (and old-style" ;\
476 $$e " password authentication will be used instead, which may" ;\
477 $$e " or may not work.)" ;\
478 $$e " ####################################################################";\
483 # screensaver-properties.desktop
484 # into /usr/share/applications/
485 install-gnome:: screensaver-properties.desktop
486 @if [ "$(GTK_DATADIR)" != "" ]; then \
487 if [ ! -d "$(install_prefix)$(GTK_APPDIR)" ]; then \
488 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_APPDIR)" ;\
489 $(INSTALL_DIRS) "$(install_prefix)$(GTK_APPDIR)" ;\
491 name2=gnome-screensaver-properties.desktop ;\
492 echo $(INSTALL_DATA) screensaver-properties.desktop \
493 $(install_prefix)$(GTK_APPDIR)/$$name2 ;\
494 $(INSTALL_DATA) screensaver-properties.desktop \
495 $(install_prefix)$(GTK_APPDIR)/$$name2 ;\
500 # into /usr/share/pixmaps/
501 install-gnome:: $(LOGO)
502 @if [ "$(GTK_DATADIR)" != "" ]; then \
503 if [ ! -d "$(install_prefix)$(GTK_ICONDIR)" ]; then \
504 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
505 $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
507 target=xscreensaver.xpm ;\
508 echo $(INSTALL_DATA) $(LOGO) \
509 $(install_prefix)$(GTK_ICONDIR)/$$target ;\
510 $(INSTALL_DATA) $(LOGO) \
511 $(install_prefix)$(GTK_ICONDIR)/$$target ;\
514 # ../utils/images/screensaver-*.png
515 # into /usr/share/xscreensaver/glade/
517 @if [ "$(GTK_GLADEDIR)" != "" ]; then \
518 if [ ! -d "$(install_prefix)$(GTK_GLADEDIR)" ]; then \
519 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
520 $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
522 for target in $(GTK_ICONS) ; do \
523 dest=`echo $$target | sed 's@^.*/@@'` ;\
524 echo $(INSTALL_DATA) $$target \
525 $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
526 $(INSTALL_DATA) $$target \
527 $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
531 # xscreensaver-demo.glade2
532 # into /usr/share/xscreensaver/glade/
533 install-gnome:: xscreensaver-demo.glade2
534 @if [ "$(GTK_GLADEDIR)" != "" ]; then \
535 if [ ! -d "$(install_prefix)$(GTK_GLADEDIR)" ]; then \
536 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
537 $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
539 target=xscreensaver-demo.glade2 ;\
540 echo $(INSTALL_DATA) $(srcdir)/$$target \
541 $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
542 if $(INSTALL_DATA) $(srcdir)/$$target \
543 $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
548 $$e " ####################################################################";\
549 $$e " Warning: unable to install $$target into" ;\
550 $$e " $(install_prefix)$(GTK_GLADEDIR)/." ;\
551 $$e " Without this file, xscreensaver-demo will not" ;\
552 $$e " be able to run properly." ;\
553 $$e " ####################################################################";\
560 # screensaver-properties.desktop
561 # into /usr/share/applications/
563 @if [ "$(GTK_DATADIR)" != "" ]; then \
564 f=gnome-screensaver-properties.desktop ;\
565 echo rm -f $(install_prefix)$(GTK_APPDIR)/$$f ;\
566 rm -f $(install_prefix)$(GTK_APPDIR)/$$f ;\
570 # into /usr/share/pixmaps/
572 @if [ "$(GTK_ICONDIR)" != "" ]; then \
573 target=xscreensaver.xpm ;\
574 echo rm -f $(install_prefix)$(GTK_ICONDIR)/$$target ;\
575 rm -f $(install_prefix)$(GTK_ICONDIR)/$$target ;\
578 # ../utils/images/screensaver-*.png
579 # into /usr/share/xscreensaver/glade/
581 @if [ "$(GTK_GLADEDIR)" != "" ]; then \
582 for target in $(GTK_ICONS) ; do \
583 dest=`echo $$target | sed 's@^.*/@@'` ;\
584 echo rm -f $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
585 rm -f $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
589 # xscreensaver-demo.glade2
590 # into /usr/share/xscreensaver/glade/
591 uninstall-gnome:: xscreensaver-demo.glade2
592 @if [ "$(GTK_GLADEDIR)" != "" ]; then \
593 target=xscreensaver-demo.glade2 ;\
594 echo rm -f $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
595 rm -f $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
598 # /usr/share/xscreensaver/config/README
600 @dest=$(install_prefix)$(HACK_CONF_DIR) ; \
601 if [ ! -d $$dest ]; then \
602 $(INSTALL_DIRS) $$dest ; \
604 src=$(srcdir)/../hacks/config ; \
605 echo $(INSTALL_DATA) $$src/README $$dest/README ; \
606 $(INSTALL_DATA) $$src/README $$dest/README
609 # /usr/share/xscreensaver/config/README
611 rm -f $(install_prefix)$(HACK_CONF_DIR)/README
614 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) \
615 XScreenSaver_ad.h XScreenSaver_Xm_ad.h
618 -rm -f Makefile XScreenSaver.ad XScreenSaver-Xm.ad \
619 TAGS *~ "#"* screensaver-properties.desktop
621 # Adds all current dependencies to Makefile
622 depend: XScreenSaver_ad.h XScreenSaver_Xm_ad.h
623 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
625 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
626 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
628 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
629 # close. This excludes dependencies on files in /usr/include, etc. It tries
630 # to include only dependencies on files which are themselves a part of this
632 distdepend: check_men update_ad_version XScreenSaver_ad.h XScreenSaver_Xm_ad.h
633 @echo updating dependencies in `pwd`/Makefile.in... ; \
634 $(DEPEND) -w 0 -f - \
635 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
636 $(INCLUDES) -I$(ICON_SRC) $(DEFS) $(DEPEND_DEFINES) \
637 $(CFLAGS) $(X_CFLAGS) -- \
638 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
639 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
640 $(TEST_SRCS) 2>/dev/null | \
643 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
645 -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
646 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
647 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
648 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
649 -e 's@$$.*\(XScreenSaver_Xm_ad\)@\1@g' \
650 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
652 ) > /tmp/distdepend.$$$$ && \
653 mv Makefile.in Makefile.in.bak && \
654 mv /tmp/distdepend.$$$$ Makefile.in
656 # Updates the version number in the app-defaults file to be in sync with
657 # the version number in version.h. This is so people can tell when they
658 # have a version skew between the app-defaults file and the executable.
659 # Also update hacks/config/README in the same way.
661 @files="XScreenSaver.ad.in ../hacks/config/README" ; \
662 U=$(UTILS_SRC)/version.h ; \
663 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
664 D=`date '+%d-%b-%Y'` ; \
665 for S in $$files ; do \
667 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
668 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
670 if cmp -s $$S $$T ; then \
674 echo "updated $$S to $$V $$D" ; \
681 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
684 @$(MAKE) XScreenSaver_ad.h XScreenSaver_Xm_ad.h 2>&1 >&- /dev/null
689 for exe in $(EXES); do \
690 if ! [ -f $(srcdir)/$$exe.man ]; then \
691 badmen="$$badmen $$exe" ; \
694 if [ -n "$$badmen" ]; then \
696 echo "Warning: The following programs have no manuals:" ; \
698 for m in $$badmen ; do \
705 # Rules for noticing when the objects from the utils directory are out of
706 # date with respect to their sources, and going and building them according
707 # to the rules in their own Makefile...
709 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
710 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
711 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
712 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
713 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
714 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
715 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
716 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
717 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
721 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
723 # How we build object files in this directory.
725 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
728 $(OBJCC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
730 # subprocs takes an extra -D option.
731 subprocs.o: subprocs.c
732 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
735 # demo-Gtk takes extra -D options, and an extra -I option.
736 demo-Gtk.o: demo-Gtk.c
737 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) \
738 $(GTK_DEFS) $(INTL_DEFS) $(CFLAGS) $(X_CFLAGS) \
741 # demo-Gtk-conf takes an extra -D option.
742 demo-Gtk-conf.o: demo-Gtk-conf.c
743 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
744 $(srcdir)/demo-Gtk-conf.c
747 # How we build the default app-defaults file into the program.
749 XScreenSaver_ad.h: XScreenSaver.ad
750 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
752 XScreenSaver_Xm_ad.h: XScreenSaver-Xm.ad
753 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver-Xm.ad > XScreenSaver_Xm_ad.h
755 @INTLTOOL_DESKTOP_RULE@
757 # The executables linked in this directory.
759 xscreensaver: $(SAVER_OBJS)
760 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
762 xscreensaver-command: $(CMD_OBJS)
763 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
766 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
767 @if [ "@PREFERRED_DEMO_PROGRAM@" = "" ]; then \
768 echo "WARNING: neither GTK nor Motif are available," \
769 "therefore no xscreensaver-demo!" ; \
772 echo cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
773 cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
776 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
777 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
778 $(MOTIF_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
779 $(XDPMS_LIBS) $(XINERAMA_LIBS) -lXext $(X_EXTRA_LIBS)
781 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
782 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
783 $(GTK_LIBS) $(XPM_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) \
784 -lXt -lX11 $(XDPMS_LIBS) $(XINERAMA_LIBS) -lXext $(X_EXTRA_LIBS)
786 demo-Gtk.o: XScreenSaver_ad.h
787 demo-Xm.o: XScreenSaver_ad_Xm.h
789 xscreensaver-getimage: $(GETIMG_OBJS)
790 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
792 pdf2jpeg: $(PDF2JPEG_OBJS)
793 $(OBJCC) $(LDFLAGS) -o $@ $(PDF2JPEG_OBJS) $(PDF2JPEG_LIBS) -lm
796 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
797 subprocs.o setuid.o splash.o prefs.o \
799 test-passwd.o: XScreenSaver_ad.h
801 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
802 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
805 $(CC) $(LDFLAGS) -o $@ test-uid.o
807 test-xdpms: test-xdpms.o
808 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
809 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
811 test-xinerama: test-xinerama.o
812 $(CC) $(LDFLAGS) -o $@ test-xinerama.o $(LIBS) $(X_LIBS) $(SAVER_LIBS)\
813 $(X_PRE_LIBS) $(XINERAMA_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
816 $(CC) $(LDFLAGS) -o $@ test-vp.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
817 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
819 test-randr: test-randr.o
820 $(CC) $(LDFLAGS) -o $@ test-randr.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
821 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
823 test-grab: test-grab.o
824 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
827 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
829 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
830 test-fade: test-fade.o $(UTILS_BIN)/fade.o
831 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
834 xdpyinfo.o: xdpyinfo.c
835 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
839 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
840 $(LIBS) $(X_LIBS) @GL_LIBS@ \
841 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
844 ##############################################################################
846 # DO NOT DELETE: updated by make distdepend
848 demo-Gtk-conf.o: ../config.h
849 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
850 demo-Gtk.o: XScreenSaver_ad.h
851 demo-Gtk.o: ../config.h
852 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
853 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
854 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
855 demo-Gtk.o: $(srcdir)/prefs.h
856 demo-Gtk.o: $(srcdir)/remote.h
857 demo-Gtk-support.o: ../config.h
858 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
859 demo-Gtk-widgets.o: ../config.h
860 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
861 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
862 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
863 demo-Xm.o: ../config.h
864 demo-Xm-widgets.o: ../config.h
866 dpms.o: $(srcdir)/prefs.h
867 dpms.o: $(srcdir)/xscreensaver.h
870 lock.o: $(srcdir)/prefs.h
871 lock.o: $(srcdir)/xscreensaver.h
872 passwd.o: ../config.h
873 passwd-pwent.o: ../config.h
875 prefs.o: $(srcdir)/prefs.h
876 remote.o: ../config.h
877 remote.o: $(srcdir)/remote.h
878 setuid.o: ../config.h
879 setuid.o: $(srcdir)/prefs.h
880 setuid.o: $(srcdir)/xscreensaver.h
881 splash.o: ../config.h
882 splash.o: $(srcdir)/prefs.h
883 splash.o: $(srcdir)/xscreensaver.h
884 stderr.o: ../config.h
885 stderr.o: $(srcdir)/prefs.h
886 stderr.o: $(srcdir)/xscreensaver.h
887 subprocs.o: ../config.h
888 subprocs.o: $(srcdir)/prefs.h
889 subprocs.o: $(srcdir)/xscreensaver.h
890 test-apm.o: ../config.h
891 test-fade.o: ../config.h
892 test-fade.o: $(srcdir)/prefs.h
893 test-fade.o: $(srcdir)/xscreensaver.h
894 test-grab.o: ../config.h
895 test-passwd.o: XScreenSaver_ad.h
896 test-passwd.o: ../config.h
897 test-passwd.o: $(srcdir)/prefs.h
898 test-passwd.o: $(srcdir)/xscreensaver.h
899 test-randr.o: ../config.h
900 test-uid.o: ../config.h
901 test-vp.o: ../config.h
902 test-xdpms.o: ../config.h
903 test-xinerama.o: ../config.h
904 timers.o: ../config.h
905 timers.o: $(srcdir)/prefs.h
906 timers.o: $(srcdir)/xscreensaver.h
907 windows.o: ../config.h
908 windows.o: $(srcdir)/prefs.h
909 windows.o: $(srcdir)/xscreensaver.h
910 xscreensaver-command.o: ../config.h
911 xscreensaver-command.o: $(srcdir)/remote.h
912 xscreensaver-getimage.o: ../config.h
913 xscreensaver-getimage.o: XScreenSaver_ad.h
914 xscreensaver-getimage.o: $(srcdir)/prefs.h
915 xscreensaver.o: XScreenSaver_ad.h
916 xscreensaver.o: ../config.h
917 xscreensaver.o: $(srcdir)/prefs.h
918 xscreensaver.o: $(srcdir)/xscreensaver.h
920 xset.o: $(srcdir)/prefs.h
921 xset.o: $(srcdir)/xscreensaver.h