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 -e 's@(MANSUFFIX)@($(mansuffix))@g' \
383 < $(srcdir)/$$man > $$T ; \
384 echo $(INSTALL_DATA) $(srcdir)/$$man \
385 $(install_prefix)$(manNdir)/$$instname ; \
386 $(INSTALL_DATA) $$T \
387 $(install_prefix)$(manNdir)/$$instname ; \
392 @for program in $(EXES) $(SCRIPTS); do \
393 echo rm -f $(install_prefix)$(bindir)/$$program ; \
394 rm -f $(install_prefix)$(bindir)/$$program ; \
398 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
402 for man in $$men; do \
403 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
404 echo rm -f $(install_prefix)$(manNdir)/$$instname* ; \
405 rm -f $(install_prefix)$(manNdir)/$$instname* ; \
409 @src="$(srcdir)/xscreensaver.pam" ; \
410 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
412 dir="$(install_prefix)$(PAM_DIR)" ; \
413 conf="$(PAM_CONF)" ; \
415 if [ -d $$dir ] ; then \
417 if [ -f $$dir/xdm ]; then \
419 elif [ -f $$dir/login ]; then \
423 if [ -z "$$src2" ]; then \
424 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
425 $(INSTALL_DATA) $$src $$dir/$$dest ; \
427 src="xscreensaver.pam.$$$$" ; \
428 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
429 grep '^#%\|^auth' $$src2 > $$src ; \
430 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
431 $(INSTALL_DATA) $$src $$dir/$$dest ; \
436 if [ ! -f $$dir/$$dest ]; then \
439 $$e " ####################################################################";\
440 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
441 $$e " Authentication Modules (PAM). However, we were unable to" ;\
442 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
443 $$e " to work without this file (and old-style password" ;\
444 $$e " authentication will be used instead, which may or may not" ;\
446 $$e " ####################################################################";\
449 elif [ -f $$conf ]; then \
450 if ( grep $$dest $$conf >/dev/null ); then \
451 echo "$$conf unchanged: already has an entry for $$dest" ; \
453 src="pam.conf.$$$$" ; \
454 echo "grep -v $$dest $$conf > $$src" ; \
455 grep -v $$dest $$conf > $$src ; \
456 extras=`sed -n "s/^login\(.*auth.*\)$$/$$dest\1/p" $$conf`; \
457 echo "$$extras" >> $$src ; \
458 if [ "x$$extras" = "x" ]; then \
459 echo "Error: no login rules in $$conf?" >&2 ; \
461 echo "adding $$dest rules to $$src:" ; \
462 echo "$$extras" | sed 's/^/ /' ; \
464 echo $(INSTALL_DATA) $$src $$conf ; \
465 $(INSTALL_DATA) $$src $$conf ; \
469 if ! ( grep $$dest $$conf >/dev/null ); then \
472 $$e " ####################################################################";\
473 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
474 $$e " Authentication Modules (PAM). However, we were unable to" ;\
475 $$e " install xscreensaver rules in the file $$conf." ;\
476 $$e " PAM is unlikely to work without this (and old-style" ;\
477 $$e " password authentication will be used instead, which may" ;\
478 $$e " or may not work.)" ;\
479 $$e " ####################################################################";\
484 # screensaver-properties.desktop
485 # into /usr/share/applications/
486 install-gnome:: screensaver-properties.desktop
487 @if [ "$(GTK_DATADIR)" != "" ]; then \
488 if [ ! -d "$(install_prefix)$(GTK_APPDIR)" ]; then \
489 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_APPDIR)" ;\
490 $(INSTALL_DIRS) "$(install_prefix)$(GTK_APPDIR)" ;\
492 name2=gnome-screensaver-properties.desktop ;\
493 echo $(INSTALL_DATA) screensaver-properties.desktop \
494 $(install_prefix)$(GTK_APPDIR)/$$name2 ;\
495 $(INSTALL_DATA) screensaver-properties.desktop \
496 $(install_prefix)$(GTK_APPDIR)/$$name2 ;\
501 # into /usr/share/pixmaps/
502 install-gnome:: $(LOGO)
503 @if [ "$(GTK_DATADIR)" != "" ]; then \
504 if [ ! -d "$(install_prefix)$(GTK_ICONDIR)" ]; then \
505 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
506 $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
508 target=xscreensaver.xpm ;\
509 echo $(INSTALL_DATA) $(LOGO) \
510 $(install_prefix)$(GTK_ICONDIR)/$$target ;\
511 $(INSTALL_DATA) $(LOGO) \
512 $(install_prefix)$(GTK_ICONDIR)/$$target ;\
515 # ../utils/images/screensaver-*.png
516 # into /usr/share/xscreensaver/glade/
518 @if [ "$(GTK_GLADEDIR)" != "" ]; then \
519 if [ ! -d "$(install_prefix)$(GTK_GLADEDIR)" ]; then \
520 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
521 $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
523 for target in $(GTK_ICONS) ; do \
524 dest=`echo $$target | sed 's@^.*/@@'` ;\
525 echo $(INSTALL_DATA) $$target \
526 $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
527 $(INSTALL_DATA) $$target \
528 $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
532 # xscreensaver-demo.glade2
533 # into /usr/share/xscreensaver/glade/
534 install-gnome:: xscreensaver-demo.glade2
535 @if [ "$(GTK_GLADEDIR)" != "" ]; then \
536 if [ ! -d "$(install_prefix)$(GTK_GLADEDIR)" ]; then \
537 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
538 $(INSTALL_DIRS) "$(install_prefix)$(GTK_GLADEDIR)" ;\
540 target=xscreensaver-demo.glade2 ;\
541 echo $(INSTALL_DATA) $(srcdir)/$$target \
542 $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
543 if $(INSTALL_DATA) $(srcdir)/$$target \
544 $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
549 $$e " ####################################################################";\
550 $$e " Warning: unable to install $$target into" ;\
551 $$e " $(install_prefix)$(GTK_GLADEDIR)/." ;\
552 $$e " Without this file, xscreensaver-demo will not" ;\
553 $$e " be able to run properly." ;\
554 $$e " ####################################################################";\
561 # screensaver-properties.desktop
562 # into /usr/share/applications/
564 @if [ "$(GTK_DATADIR)" != "" ]; then \
565 f=gnome-screensaver-properties.desktop ;\
566 echo rm -f $(install_prefix)$(GTK_APPDIR)/$$f ;\
567 rm -f $(install_prefix)$(GTK_APPDIR)/$$f ;\
571 # into /usr/share/pixmaps/
573 @if [ "$(GTK_ICONDIR)" != "" ]; then \
574 target=xscreensaver.xpm ;\
575 echo rm -f $(install_prefix)$(GTK_ICONDIR)/$$target ;\
576 rm -f $(install_prefix)$(GTK_ICONDIR)/$$target ;\
579 # ../utils/images/screensaver-*.png
580 # into /usr/share/xscreensaver/glade/
582 @if [ "$(GTK_GLADEDIR)" != "" ]; then \
583 for target in $(GTK_ICONS) ; do \
584 dest=`echo $$target | sed 's@^.*/@@'` ;\
585 echo rm -f $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
586 rm -f $(install_prefix)$(GTK_GLADEDIR)/$$dest ;\
590 # xscreensaver-demo.glade2
591 # into /usr/share/xscreensaver/glade/
592 uninstall-gnome:: xscreensaver-demo.glade2
593 @if [ "$(GTK_GLADEDIR)" != "" ]; then \
594 target=xscreensaver-demo.glade2 ;\
595 echo rm -f $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
596 rm -f $(install_prefix)$(GTK_GLADEDIR)/$$target ;\
599 # /usr/share/xscreensaver/config/README
601 @dest=$(install_prefix)$(HACK_CONF_DIR) ; \
602 if [ ! -d $$dest ]; then \
603 $(INSTALL_DIRS) $$dest ; \
605 src=$(srcdir)/../hacks/config ; \
606 echo $(INSTALL_DATA) $$src/README $$dest/README ; \
607 $(INSTALL_DATA) $$src/README $$dest/README
610 # /usr/share/xscreensaver/config/README
612 rm -f $(install_prefix)$(HACK_CONF_DIR)/README
615 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) \
616 XScreenSaver_ad.h XScreenSaver_Xm_ad.h
619 -rm -f Makefile XScreenSaver.ad XScreenSaver-Xm.ad \
620 TAGS *~ "#"* screensaver-properties.desktop
622 # Adds all current dependencies to Makefile
623 depend: XScreenSaver_ad.h XScreenSaver_Xm_ad.h
624 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
626 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
627 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
629 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
630 # close. This excludes dependencies on files in /usr/include, etc. It tries
631 # to include only dependencies on files which are themselves a part of this
633 distdepend: check_men update_ad_version XScreenSaver_ad.h XScreenSaver_Xm_ad.h
634 @echo updating dependencies in `pwd`/Makefile.in... ; \
635 $(DEPEND) -w 0 -f - \
636 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
637 $(INCLUDES) -I$(ICON_SRC) $(DEFS) $(DEPEND_DEFINES) \
638 $(CFLAGS) $(X_CFLAGS) -- \
639 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
640 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
641 $(TEST_SRCS) 2>/dev/null | \
644 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
646 -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
647 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
648 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
649 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
650 -e 's@$$.*\(XScreenSaver_Xm_ad\)@\1@g' \
651 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
653 ) > /tmp/distdepend.$$$$ && \
654 mv Makefile.in Makefile.in.bak && \
655 mv /tmp/distdepend.$$$$ Makefile.in
657 # Updates the version number in the app-defaults file to be in sync with
658 # the version number in version.h. This is so people can tell when they
659 # have a version skew between the app-defaults file and the executable.
660 # Also update hacks/config/README in the same way.
662 @files="XScreenSaver.ad.in ../hacks/config/README" ; \
663 U=$(UTILS_SRC)/version.h ; \
664 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
665 D=`date '+%d-%b-%Y'` ; \
666 for S in $$files ; do \
668 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
669 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
671 if cmp -s $$S $$T ; then \
675 echo "updated $$S to $$V $$D" ; \
682 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
685 @$(MAKE) XScreenSaver_ad.h XScreenSaver_Xm_ad.h 2>&1 >&- /dev/null
690 for exe in $(EXES); do \
691 if ! [ -f $(srcdir)/$$exe.man ]; then \
692 badmen="$$badmen $$exe" ; \
695 if [ -n "$$badmen" ]; then \
697 echo "Warning: The following programs have no manuals:" ; \
699 for m in $$badmen ; do \
706 # Rules for noticing when the objects from the utils directory are out of
707 # date with respect to their sources, and going and building them according
708 # to the rules in their own Makefile...
710 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
711 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
712 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
713 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
714 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
715 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
716 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
717 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
718 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
722 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
724 # How we build object files in this directory.
726 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
729 $(OBJCC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
731 # subprocs takes an extra -D option.
732 subprocs.o: subprocs.c
733 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
736 # demo-Gtk takes extra -D options, and an extra -I option.
737 demo-Gtk.o: demo-Gtk.c
738 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) \
739 $(GTK_DEFS) $(INTL_DEFS) $(CFLAGS) $(X_CFLAGS) \
742 # demo-Gtk-conf takes an extra -D option.
743 demo-Gtk-conf.o: demo-Gtk-conf.c
744 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
745 $(srcdir)/demo-Gtk-conf.c
748 # How we build the default app-defaults file into the program.
750 XScreenSaver_ad.h: XScreenSaver.ad
751 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
753 XScreenSaver_Xm_ad.h: XScreenSaver-Xm.ad
754 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver-Xm.ad > XScreenSaver_Xm_ad.h
756 @INTLTOOL_DESKTOP_RULE@
758 # The executables linked in this directory.
760 xscreensaver: $(SAVER_OBJS)
761 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
763 xscreensaver-command: $(CMD_OBJS)
764 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
767 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
768 @if [ "@PREFERRED_DEMO_PROGRAM@" = "" ]; then \
769 echo "WARNING: neither GTK nor Motif are available," \
770 "therefore no xscreensaver-demo!" ; \
773 echo cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
774 cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
777 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
778 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
779 $(MOTIF_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
780 $(XDPMS_LIBS) $(XINERAMA_LIBS) -lXext $(X_EXTRA_LIBS)
782 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
783 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
784 $(GTK_LIBS) $(XPM_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) \
785 -lXt -lX11 $(XDPMS_LIBS) $(XINERAMA_LIBS) -lXext $(X_EXTRA_LIBS)
787 demo-Gtk.o: XScreenSaver_ad.h
788 demo-Xm.o: XScreenSaver_ad_Xm.h
790 xscreensaver-getimage: $(GETIMG_OBJS)
791 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
793 pdf2jpeg: $(PDF2JPEG_OBJS)
794 $(OBJCC) $(LDFLAGS) -o $@ $(PDF2JPEG_OBJS) $(PDF2JPEG_LIBS) -lm
797 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
798 subprocs.o setuid.o splash.o prefs.o \
800 test-passwd.o: XScreenSaver_ad.h
802 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
803 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
806 $(CC) $(LDFLAGS) -o $@ test-uid.o
808 test-xdpms: test-xdpms.o
809 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
810 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
812 test-xinerama: test-xinerama.o
813 $(CC) $(LDFLAGS) -o $@ test-xinerama.o $(LIBS) $(X_LIBS) $(SAVER_LIBS)\
814 $(X_PRE_LIBS) $(XINERAMA_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
817 $(CC) $(LDFLAGS) -o $@ test-vp.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
818 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
820 test-randr: test-randr.o
821 $(CC) $(LDFLAGS) -o $@ test-randr.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
822 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
824 test-grab: test-grab.o
825 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
828 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
830 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
831 test-fade: test-fade.o $(UTILS_BIN)/fade.o
832 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
835 xdpyinfo.o: xdpyinfo.c
836 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
840 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
841 $(LIBS) $(X_LIBS) @GL_LIBS@ \
842 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
845 ##############################################################################
847 # DO NOT DELETE: updated by make distdepend
849 demo-Gtk-conf.o: ../config.h
850 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
851 demo-Gtk.o: XScreenSaver_ad.h
852 demo-Gtk.o: ../config.h
853 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
854 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
855 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
856 demo-Gtk.o: $(srcdir)/prefs.h
857 demo-Gtk.o: $(srcdir)/remote.h
858 demo-Gtk-support.o: ../config.h
859 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
860 demo-Gtk-widgets.o: ../config.h
861 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
862 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
863 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
864 demo-Xm.o: ../config.h
865 demo-Xm-widgets.o: ../config.h
867 dpms.o: $(srcdir)/prefs.h
868 dpms.o: $(srcdir)/xscreensaver.h
871 lock.o: $(srcdir)/prefs.h
872 lock.o: $(srcdir)/xscreensaver.h
873 passwd.o: ../config.h
874 passwd-pwent.o: ../config.h
876 prefs.o: $(srcdir)/prefs.h
877 remote.o: ../config.h
878 remote.o: $(srcdir)/remote.h
879 setuid.o: ../config.h
880 setuid.o: $(srcdir)/prefs.h
881 setuid.o: $(srcdir)/xscreensaver.h
882 splash.o: ../config.h
883 splash.o: $(srcdir)/prefs.h
884 splash.o: $(srcdir)/xscreensaver.h
885 stderr.o: ../config.h
886 stderr.o: $(srcdir)/prefs.h
887 stderr.o: $(srcdir)/xscreensaver.h
888 subprocs.o: ../config.h
889 subprocs.o: $(srcdir)/prefs.h
890 subprocs.o: $(srcdir)/xscreensaver.h
891 test-apm.o: ../config.h
892 test-fade.o: ../config.h
893 test-fade.o: $(srcdir)/prefs.h
894 test-fade.o: $(srcdir)/xscreensaver.h
895 test-grab.o: ../config.h
896 test-passwd.o: XScreenSaver_ad.h
897 test-passwd.o: ../config.h
898 test-passwd.o: $(srcdir)/prefs.h
899 test-passwd.o: $(srcdir)/xscreensaver.h
900 test-randr.o: ../config.h
901 test-uid.o: ../config.h
902 test-vp.o: ../config.h
903 test-xdpms.o: ../config.h
904 test-xinerama.o: ../config.h
905 timers.o: ../config.h
906 timers.o: $(srcdir)/prefs.h
907 timers.o: $(srcdir)/xscreensaver.h
908 windows.o: ../config.h
909 windows.o: $(srcdir)/prefs.h
910 windows.o: $(srcdir)/xscreensaver.h
911 xscreensaver-command.o: ../config.h
912 xscreensaver-command.o: $(srcdir)/remote.h
913 xscreensaver-getimage.o: ../config.h
914 xscreensaver-getimage.o: XScreenSaver_ad.h
915 xscreensaver-getimage.o: $(srcdir)/prefs.h
916 xscreensaver.o: XScreenSaver_ad.h
917 xscreensaver.o: ../config.h
918 xscreensaver.o: $(srcdir)/prefs.h
919 xscreensaver.o: $(srcdir)/xscreensaver.h
921 xset.o: $(srcdir)/prefs.h
922 xset.o: $(srcdir)/xscreensaver.h