Debian Codegraph @

Makefile.in

raw ◀ ▶
Source reconstructed at patch state 1 of 3 — not the installed (fully patched) source.
3 Debian patches touch this file
1 # -*- Makefile -*-
2 # Makefile.in
3 # $Id: Makefile.in,v 1.32 2006/01/18 03:41:01 elf Exp $
4 #
5 # written by Marc Singer
6 # 11 October 1997
7 #
8 # This file is part of the project Buici. See the file README for
9 # more information.
10 #
11 # Copyright (C) 1997 Marc Singer
12 #
13 # This program is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU General Public License as
15 # published by the Free Software Foundation; either version 2 of the
16 # License, or (at your option) any later version.
17 #
18 # This program is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 # General Public License for more details.
22 #
23 # You should have received a copy of the GNU General Public License
24 # in a file called COPYING along with this program; if not, write to
25 # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
26 # 02139, USA.
27 #
28 #
29
30 .PHONY: install clean all version revision patch
31
32
33 #
34 # --- Project specification
35 #
36
37 TARGET=buici-clock
38 PACKAGE=buici-clock
39 O_D=o/
40 SRC= \
41 main.cxx options.cxx version.cxx \
42 clock.cxx signal.cxx draw.cc
43
44 # system.cxx video.cxx timebase.cxx renderx.cxx
45 # lfile.cxx lstream.cxx lring.cxx lthread.cxx thread.s
46 # report.cxx stats.cxx
47 # dct.cxx
48
49 OBJ:=$(SRC)
50 OBJ:=$(OBJ:.c=.o)
51 OBJ:=$(OBJ:.cxx=.o)
52 OBJ:=$(OBJ:.cc=.o)
53 OBJ:=$(OBJ:.s=.o)
54
55 VERSION_HEADER=version.h
56 RELEASE_PATH=${HOME}/release
57
58 XO_PATH=@XO_PATH@
59 CC=@CXX@
60 CFLAGS_I=-I${XO_PATH} @CAIRO_CFLAGS@
61 CXXFLAGS=@CXXFLAGS@
62 #CXXFLAGS=$(CXXFLAGS) -O
63 #CXXFLAGS=$(CXXFLAGS) -O2
64 #CXXFLAGS=$(CXXFLAGS) -fomit-frame-pointer
65 #CXXFLAGS=$(CXXFLAGS) -pg
66
67 CXXFLAGS_=-g $(CFLAGS_I)@CFLAGS_W@@X_CFLAGS@
68 LFLAGS=-g @LDFLAGS@@X_LIBS@ -L${XO_PATH} @LIBS@ -lxo -lX11 -lXext@X_EXTRA_LIBS@ @CAIRO_LIBS@
69 #LFLAGS=-pg ${LFLAGS}
70 DEPEND=depend.m
71 ECHO=@/bin/echo
72 INSTALL=@INSTALL@
73 INSTALL_PROGRAM=@INSTALL_PROGRAM@
74 INSTALL_DATA=@INSTALL_DATA@
75
76 #
77 # --- Autoconf generated symbols
78 #
79
80 srcdir = @srcdir@
81 VPATH = @srcdir@
82 prefix = @prefix@
83 exec_prefix = @exec_prefix@
84 bindir = @bindir@
85 docdir = $(prefix)/share/doc/$(PACKAGE)
86 infodir = @infodir@
87 mandir = $(prefix)/share/man
88
89
90 # This is removed because it generates a line in the Makefile.in that
91 # breaks the use of 'make -f Makefile.in distclean' from
92 # debian/rules. We do call make on subdirectories, so this may be a
93 # problem.
94 # @SET_MAKE@
95
96 #
97 # --- Implicit rules
98 #
99
100 vpath %.o $(O_D)
101
102 %.o: %.cc
103 $(make_o)
104 $(ECHO) $(CC) -c $(CXXFLAGS) -o $(O_D)$@ $<
105 @$(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -o $(O_D)$@ $<
106
107 %.o: %.cxx
108 $(make_o)
109 $(ECHO) $(CC) -c $(CXXFLAGS) -o $(O_D)$@ $<
110 @$(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -o $(O_D)$@ $<
111
112 $(O_D)%.o: %.cxx
113 $(make_o)
114 $(ECHO) $(CC) -c $(CXXFLAGS) -o $@ $<
115 @$(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -o $@ $<
116
117 $(O_D)%.o: %.cc
118 $(make_o)
119 $(ECHO) $(CC) -c $(CXXFLAGS) -o $@ $<
120 @$(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -o $@ $<
121
122 %.o: %.s
123 $(make_o)
124 $(ECHO) $(AS) $(AFLAGS) -o $(O_D)$@ $<
125 @$(AS) $(AFLAGS) $(AFLAGS_) -o $(O_D)$@ $<
126
127 $(O_D)%.o: %.s
128 $(make_o)
129 $(ECHO) $(AS) $(AFLAGS) -o $@ $<
130 @$(AS) $(AFLAGS) $(AFLAGS_) -o $@ $<
131
132 %.i: %.cxx
133 $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -E -o $(notdir $@) $<
134
135 %.s: %.cxx
136 $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -S -o $@ $<
137
138 %.i: %.cc
139 $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -E -o $(notdir $@) $<
140
141 %.s: %.cc
142 $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -S -o $@ $<
143
144 %.s: %.c
145 $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -S -o $@ $<
146
147 #
148 # --- Primary targets
149 #
150
151 all: check_depend make_o _version.h xolib $(O_D)$(TARGET) $(TARGET) $(PACKAGE).README
152
153 .PHONY: make_o
154 make_o:
155 @if test ! -e $(O_D) ;\
156 then echo === Creating \'$(O_D)\' output directory ; mkdir $(O_D) ; fi
157
158 xolib:
159 @if test ! "${XO_PATH}" = "../xo" ; \
160 then (cd ${XO_PATH} ; [ -f config.log ] || ./configure ; $(MAKE) all) ; fi
161
162 $(O_D)$(TARGET): $(OBJ) $(XO_PATH)/libxo.a
163 $(CC) -o $@ $(addprefix $(O_D),$(OBJ)) $(LFLAGS)
164
165 $(TARGET): $(O_D)$(TARGET)
166 @echo -- Linking $(TARGET) to $(O_D)$(TARGET)
167 @ln -s $(O_D)$(TARGET) .
168
169 #install:
170 # cp $(TARGET).exe c:/usr/local
171
172 clean:
173 ifneq "$(O_D)" ""
174 -rm -rf $(O_D)
175 else
176 -rm $(OBJ)
177 endif
178 -rm *.i
179 @if test ! "${XO_PATH}" = "../xo" ; \
180 then $(MAKE) -C ${XO_PATH} clean ; fi
181
182 .PHONY: debclean
183 debclean: distclean
184
185 .PHONY: distclean dist_clean
186 distclean dist_clean: clean
187 -rm -f \#* *~ *.sed *.i *.cod
188 -rm -f config.cache config.status config.log
189 -chmod +w Makefile config.h
190 -rm Makefile config.h $(DEPEND)
191 -rm _version.h .version
192 # -rm build
193 @if test ! "${XO_PATH}" = "../xo" ; \
194 then $(MAKE) -C ${XO_PATH} distclean ; fi
195
196 #
197 # --- Version and Build Engineering
198 #
199
200 .version: .version_major .version_minor .version_patch
201 @/bin/echo -n `cat .version_major`.`cat .version_minor`.`cat \
202 .version_patch` > .version
203
204 _version.h: .version
205 @/bin/echo -e \#define SZ_VERSION \"`cat .version`\" > _version.h
206
207 .PHONY: transmit
208 transmit: # distribution-archive
209
210 @/bin/sh -c "cd .. ;\
211 distftp.sh ${PACKAGE} ${PACKAGE}-`cat .version`.tar.gz"
212 @distftp.sh ${PACKAGE} ANNOUNCEMENT
213 @distftp.sh ${PACKAGE} README
214 @distftp.sh ${PACKAGE} ${PACKAGE}-`cat .version`.lsm
215
216 version.sed: _version.h
217 @echo Creating version-specific sed script...
218 @/bin/echo s/\<\<version\>\>/`cat .version`/ > version.sed
219 @/bin/echo s/\<\<date\>\>/`date +"%d %B %Y"`/ >> version.sed
220 @/bin/echo s/\<\<tar-file\>\>/${PACKAGE}-`cat .version`.tar.gz/ \
221 >> version.sed
222 @/bin/echo s/\<\<lsm-file\>\>/${PACKAGE}-`cat .version`.lsm/ >> version.sed
223
224 .PHONY: ${PACKAGE}.lsm
225 ${PACKAGE}.lsm: version.sed LSM
226 @echo Creating LSM file...
227 @if test -f *.lsm ; then rm *.lsm ; fi
228 @sed -f version.sed LSM > ${PACKAGE}-`cat .version`.lsm
229
230 .PHONY: ${PACKAGE}.ANNOUNCEMENT
231 ${PACKAGE}.ANNOUNCEMENT: version.sed ANNOUNCEMENT
232 @echo Creating ANNOUNCEMENT file...
233 @if test -f *.ANNOUNCEMENT ; then rm *.ANNOUNCEMENT ; fi
234 @sed -f version.sed ANNOUNCEMENT \
235 > ${PACKAGE}-`cat .version`.ANNOUNCEMENT
236 @cat ${PACKAGE}-`cat .version`.lsm \
237 >> ${PACKAGE}-`cat .version`.ANNOUNCEMENT
238
239 .PHONY: ${PACKAGE}.README
240 ${PACKAGE}.README: version.sed README
241 @echo Creating README file...
242 @if test -f *.README ; then rm *.README ; fi
243 @sed -f version.sed README > ${PACKAGE}-`cat .version`.README
244
245 .PHONY: distribution-archive da
246 distribution-archive da: ${PACKAGE}.lsm ${PACKAGE}.ANNOUNCEMENT ${PACKAGE}.README dist_clean
247 @echo Creating distribution archive...
248 @/bin/sh -c "if test -x ../${PACKAGE}-`cat .version`;\
249 then rm ../${PACKAGE}-`cat .version` ; fi"
250 @ln -s ${PACKAGE} ../${PACKAGE}-`cat .version`
251 @find . -path CVS -prune\
252 -o -path o -prune\
253 -o -regex .\*/${PACKAGE} -prune\
254 -o -regex .\*/configure -prune\
255 -o -regex .\*/config.status -prune\
256 -o -regex .\*\.o -prune\
257 -o -type f -exec chmod 644 \{\} \;
258 @/bin/sh -c 'cd .. ; V=`cat ${PACKAGE}/.version` ;\
259 tar zcf ${PACKAGE}-$$V.tar.gz\
260 `find ${PACKAGE}-$$V/\
261 -regex .\*/CVS -prune\
262 -o -regex .\*~ -prune\
263 -o -regex .\*/o -prune\
264 -o -regex .\*\\\\.o -prune\
265 -o -regex .\*\\\\.a -prune\
266 -o -regex .\*\\\\.m -prune\
267 -o -regex .\*\\\\.bmp -prune\
268 -o -regex .\*/${PACKAGE} -prune\
269 -o -regex .\*/Makefile -prune\
270 -o -regex .\*/config.cache -prune\
271 -o -regex .\*/config.h -prune\
272 -o -regex .\*/config.log -prune\
273 -o -regex .\*/config.status -prune\
274 -o -regex .\*/configure.scan -prune\
275 -o -regex .\*/log -prune\
276 -o -regex .\*/gmon.out -prune\
277 -o -regex .\*/\.cvsignore -prune\
278 -o -regex .\*/\.gdbinit -prune\
279 -o -regex .\*/NOTES -prune\
280 -o -regex .\*/patches -prune\
281 -o -regex .\*/buici-.\* -prune\
282 -o -type f -print | sort`'
283 @-rm ../${PACKAGE}-`cat .version`
284 @echo Moving distribution file to ${RELEASE_PATH}...
285 @mv ../${PACKAGE}-`cat .version`.tar.gz ${RELEASE_PATH}
286 @mv ${PACKAGE}-`cat .version`.* ${RELEASE_PATH}
287
288 #
289 # --- Installation
290 #
291
292 .PHONY: install installdirs
293
294 install: installdirs $(TARGET)
295 # hello.info
296 $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)/$(binprefix)
297 # strip $(bindir)/$(binprefix)/$(TARGET)
298 # -$(INSTALL_DATA) options $(docdir)
299 $(INSTALL_DATA) $(TARGET).1 $(DESTDIR)$(mandir)/man1
300 # $(INSTALL_DATA) curves.5 $(mandir)/man5
301 $(INSTALL_DATA) ${PACKAGE}-`cat .version`.README $(DESTDIR)$(docdir)/README
302 installdirs:
303 $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
304 $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(docdir)
305 #$(docdir)
306 #$(mandir)/man5
307 #$(infodir)
308
309 #
310 # --- Dependencies: depend.m
311 #
312
313 .PHONY: depend check_depend
314
315 # *** removed _version.h to prevent forced dependency build
316 depend: $(DEPEND) # _version.h
317 $(DEPEND) depend: # _version.h $(SRC)
318 $(CC) $(CFLAGS_I) -M $(SRC) > $(DEPEND)
319
320 check_depend:
321 @if test ! -s ${DEPEND} ; then \
322 echo "-- Use 'make depend' to create dependencies file." \
323 " Continuing without it." ; fi
324
325 #
326 # --- Include dependencies always. Configure creates an empty file
327 #
328 ifneq "$(wildcard depend.m)" ""
329 include ${DEPEND}
330 endif