1# utils/Makefile.in --- xscreensaver, Copyright (c) 1997-2010 Jamie Zawinski.
2# the `../configure' script generates `jwxyz/Makefile' from this file.
3
4# JWXYZ Is Not Xlib.
5#
6# But it's a bunch of function definitions that bear some resemblance to
7# Xlib and that kinda sorta implement Xlib in terms of the native graphics
8# substrate (Cocoa, OpenGL, GLES, Java).
9
10@SET_MAKE@
11.SUFFIXES:
12.SUFFIXES: .c .o
13
14srcdir		= @srcdir@
15VPATH		= @srcdir@
16prefix		= @prefix@
17datarootdir	= @datarootdir@
18
19CC		= @CC@
20CFLAGS		= @CFLAGS@
21DEFS		= @DEFS@
22
23DEPEND		= @DEPEND@
24DEPEND_FLAGS	= @DEPEND_FLAGS@
25DEPEND_DEFINES	= @DEPEND_DEFINES@
26
27SHELL		= /bin/sh
28INSTALL		= @INSTALL@
29INSTALL_PROGRAM = @INSTALL_PROGRAM@
30INSTALL_DATA	= @INSTALL_DATA@
31INSTALL_DIRS	= @INSTALL_DIRS@
32
33X_CFLAGS	= @X_CFLAGS@
34
35INCLUDES_1	= -I$(srcdir) -I.. -I../utils
36INCLUDES	= $(INCLUDES_1) @INCLUDES@
37
38SRCS		= jwxyz-android.c jwxyz-cocoa.m jwxyz-common.c jwxyz-gl.c \
39		  jwxyz-timers.c jwxyz-image.c jwxyz.m jwzgles.c
40OBJS		=
41HDRS		= jwxyz-android.h jwxyz-cocoa.h jwxyz-timers.h jwxyz.h \
42		  jwxyzI.h jwzgles.h jwzglesI.h
43EXTRAS		= README Makefile.in
44
45TARFILES	= $(EXTRAS) $(SRCS) $(HDRS) $(LOGOS)
46
47
48default: all
49all: $(OBJS)
50
51install:   install-program   install-man
52uninstall: uninstall-program uninstall-man
53
54install-strip:
55	$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
56
57install-program:
58install-man:
59uninstall-program:
60uninstall-man:
61
62clean:
63	-rm -f *.o a.out core
64
65distclean: clean
66	-rm -f Makefile TAGS *~ "#"*
67
68# Adds all current dependencies to Makefile
69depend:
70	$(DEPEND) -s '# DO NOT DELETE: updated by make depend'		    \
71	$(DEPEND_FLAGS) --						    \
72	$(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) --	    \
73	$(SRCS)
74
75# Adds some dependencies to Makefile.in -- not totally accurate, but pretty
76# close.  This excludes dependencies on files in /usr/include, etc.  It tries
77# to include only dependencies on files which are themselves a part of this
78# package.
79distdepend::
80	@echo updating dependencies in `pwd`/Makefile.in... ;		    \
81	$(DEPEND) -w 0 -f - 						    \
82	-s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
83	$(INCLUDES_1) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) --    \
84	$(SRCS) 2>/dev/null |						    \
85	sort -d |							    \
86	(								    \
87	  awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
88	  sed -e '/^#.*/d'						    \
89	      -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d'			    \
90	      -e 's@ \([^$$]\)@ $$(srcdir)/\1@g'			    \
91	      -e 's@ $$(srcdir)/\(.*config.h\)@ \1@g' ;			    \
92	  echo ''							    \
93	) > /tmp/distdepend.$$$$ &&					    \
94	mv /tmp/distdepend.$$$$ Makefile.in
95
96TAGS: tags
97tags:
98	find $(srcdir) -name '*.[chly]' -print | xargs etags -a
99
100echo_tarfiles:
101	@echo $(TARFILES)
102
103
104# How we build object files in this directory.
105.c.o:
106	$(CC) -c $(INCLUDES) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(X_CFLAGS) $<
107
108
109# Rules for generating the VMS makefiles on Unix, so that it doesn't have to
110# be done by hand...
111#
112VMS_AXP_COMPILE=$$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-])
113
114compile_axp.com: Makefile.in
115	@echo generating $@ from $<...  ;				    \
116	( ( for c in $(SRCS) vms-*.c ; do				    \
117	      c=`echo $$c | tr a-z A-Z` ;				    \
118	      echo "$(VMS_AXP_COMPILE) $$c" ;				    \
119            done ;							    \
120	  ) | sort -d ;							    \
121          echo '$$ lib/cre utils.olb_axp' ; 				    \
122	  echo '$$ lib utils.olb_axp *.obj' ; 				    \
123	  echo '$$! delete/noconf *.obj;' ; 				    \
124        ) > $@
125
126compile_decc.com: compile_axp.com
127	@echo generating $@ from $<...  ;				    \
128	sed 's/axp/decc/g' < $< > $@
129
130distdepend:: compile_axp.com compile_decc.com
131
132
133##############################################################################
134#
135# DO NOT DELETE: updated by make distdepend
136
137jwxyz-common.o: ../config.h
138jwxyz-image.o: ../config.h
139jwxyz-timers.o: ../config.h
140jwzgles.o: ../config.h
141
142