Debian Codegraph @

xo/Makefile.in

raw ◀ ▶
3 Debian patches touch this file
1 # -*- Makefile -*-
2 # Makefile.in
3 # $Id: Makefile.in,v 1.15 2006/01/17 19:48:14 elf Exp $
4 #
5 # written by Marc Singer
6 # 8 May 1996
7 #
8 #
9
10 .PHONY: install clean all version revision patch
11
12 #
13 # --- Project specification
14 #
15
16 PACKAGE=xo
17 TARGET=xo
18 O_D=o/
19 SRC_LIB= \
20 ldisplay.cxx lwindow.cxx lfont.cxx \
21 wbutton.cxx wtext.cxx wdialog.cxx \
22 lhash.cxx larray.cxx \
23 res.cxx dither.cxx lpicture.cxx
24
25 #dmalloc.cxx
26
27 _SRC=$(SRC_LIB) \
28 loupe.cxx stats.cxx
29 # classes.cxx main.cxx
30
31 DEPS:=$(SRC)
32 DEPS:=$(DEPS:%.c=%.d)
33 DEPS:=$(DEPS:%.cc=%.d)
34 DEPS:=$(DEPS:%.cxx=%.d)
35
36 SRC= $(_SRC) res_l.cxx res_y.cxx
37
38 # lwindowclass.cxx
39 # options.cxx version.cxx
40 # system.cxx video.cxx timebase.cxx
41 # lfile.cxx lstream.cxx lring.cxx lthread.cxx thread.s
42 # report.cxx
43
44 ____OBJ=$(SRC:.c=.o)
45 ___OBJ=$(____OBJ:.cxx=.o)
46 __OBJ=$(___OBJ:.s=.o)
47 _OBJ=$(__OBJ:.l=.o)
48 OBJ=$(_OBJ:.y=.o)
49
50 ____OBJ_LIB=$(SRC_LIB:.c=.o)
51 ___OBJ_LIB=$(____OBJ_LIB:.cxx=.o)
52 __OBJ_LIB=$(___OBJ_LIB:.s=.o)
53 _OBJ_LIB=$(__OBJ_LIB:.l=.o)
54 OBJ_LIB=$(_OBJ_LIB:.y=.o)
55
56 VERSION_HEADER=version.h
57
58 CC=@CXX@
•59 CXXFLAGS=@CPPFLAGS@ @CXXFLAGS@
60 #CXXFLAGS=-${CXXFLAGS} -O
61 #CXXFLAGS=-${CXXFLAGS} -O2
62 #CXXFLAGS=-${CXXFLAGS} -fomit-frame-pointer
63 CXXFLAGS_=-g @CFLAGS_W@@X_CFLAGS@
64 LFLAGS=-g @LDFLAGS@@X_LIBS@@LIBS@ -lX11 -lXext @X_EXTRA_LIBS@
65 FLEX=@LEX@
66 YACC=@YACC@
67
68 #
69 # --- Autoconf generated symbols
70 #
71
72 #srcdir = @srcdir@
73 #VPATH = @srcdir@
74 prefix = @prefix@
75 exec_prefix = @exec_prefix@
76 bindir = @bindir@
77 infodir = @infodir@
78 mandir = @mandir@
•79 datarootdir = @datarootdir@
80
81 #
82 # --- Implicit rules
83 #
84
85 vpath %.o $(O_D)
86
•87 %.o: %.cxx | make_o
88 $(ECHO) $(CC) -c $(CXXFLAGS) -o $(O_D)$@ $<
89 @$(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -o $(O_D)$@ $<
90
•91 $(O_D)%.o: %.cxx | make_o
92 $(ECHO) $(CC) -c $(CXXFLAGS) -o $@ $<
93 @$(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -o $@ $<
94
•95 %.o: %.s | make_o
96 $(ECHO) $(AS) $(AFLAGS) -o $(O_D)$@ $<
97 @$(AS) $(AFLAGS) $(AFLAGS_) -o $(O_D)$@ $<
98
•99 $(O_D)%.o: %.s | make_o
100 $(ECHO) $(AS) $(AFLAGS) -o $@ $<
101 @$(AS) $(AFLAGS) $(AFLAGS_) -o $@ $<
102
103 %.cxx: %.l
104 $(FLEX) -o$@ $<
105
106 %.cxx: %.y
107 $(YACC) -d -o $@ $<
108
109 %.i: %.cxx
110 $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -E -o $(notdir $@) $<
111
112 %.s: %.cxx
113 $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -S -o $@ $<
114
115 %.s: %.c
116 $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -S -o $@ $<
117
118 #
119 # --- Primary targets
120 #
121
122 all: make_o _version.h res_y.cxx $(O_D)$(TARGET) libxo.a
123
124 .PHONY: make_o
125 make_o:
126 @if test ! -e $(O_D) ;\
127 then echo === Creating \'$(O_D)\' output directory ; mkdir $(O_D) ; fi
128
129 res_l.cxx: res_l.l
130 res_y.cxx: res_y.y
•131 res_y.hxx: res_y.cxx
132
•133 $(O_D)res.o: lres.h res_y.hxx
134
135 res: o/res_y.o o/res_l.o o/res.o
136 $(CC) $(LFLAGS) -o $@ $^
137
138 libxo.a: $(OBJ_LIB)
139 ar rc libxo.a $(addprefix $(O_D),$(OBJ_LIB))
140
141 $(O_D)$(TARGET): $(OBJ)
142 $(CC) -o $@ $(addprefix $(O_D),$(OBJ)) $(LFLAGS)
143
144 #install:
145 # cp $(TARGET).exe c:/usr/local
146
147 .PHONY: count
148 count:
149 wc $(_SRC) *.h
150
151 clean:
152 ifneq "$(O_D)" ""
153 -rm -rf $(O_D)
154 else
155 -rm $(OBJ)
156 endif
157 -rm *.i
158
159 .PHONY: dist_clean
160 distclean: clean
161 @-rm -f \#* *~ *.sed *.i *.cod
162 -chmod +w Makefile config.h
163 -rm Makefile config.h $(DEPEND)
164 -rm config.cache config.status config.log
165 -rm _version.h .version
•166 -rm res_y.hxx res_l.cxx res_y.cxx
167 -rm libxo.a
168
169 res_l.l: res.h
170 res_y.y: res.h
171
172 #
173 # Version and Build Engineering
174 #
175
176 .version: .version_major .version_minor .version_patch
177 @/bin/echo -n `cat .version_major`.`cat .version_minor`.`cat \
178 .version_patch` > .version
179
180 _version.h: .version
181 @/bin/echo -e \#define SZ_VERSION \"`cat .version`\" > _version.h
182
183 .PHONY: transmit
184 transmit: # distribution-archive
185
186 @/bin/sh -c "cd .. ;\
187 distftp.sh ${PACKAGE} ${PACKAGE}-`cat .version`.tar.gz"
188 @distftp.sh ${PACKAGE} ANNOUNCEMENT
189 @distftp.sh ${PACKAGE} README
190 @distftp.sh ${PACKAGE} ${PACKAGE}-`cat .version`.lsm
191
192 lsm.sed: _version.h
193 @echo Creating LSM edit script...
194 @/bin/echo s/\<\<version\>\>/`cat .version`/ > lsm.sed
195 @/bin/echo s/\<\<date\>\>/`date +"%d %B %Y"`/ >> lsm.sed
196 @/bin/echo s/\<\<tar-file\>\>/${PACKAGE}-`cat .version`.tar.gz/ \
197 >> lsm.sed
198 @/bin/echo s/\<\<lsm-file\>\>/${PACKAGE}-`cat .version`.lsm/ >> lsm.sed
199
200 .PHONY: ${PACKAGE}.lsm
201 ${PACKAGE}.lsm: lsm.sed LSM
202 @echo Creating LSM file...
203 @-rm *.lsm
204 @sed -f lsm.sed LSM > ${PACKAGE}-`cat .version`.lsm
205
206 .PHONY: distribution-archive da
207 distribution-archive da: ${PACKAGE}.lsm dist_clean
208 @echo Creating distribution archive...
209 @/bin/sh -c "if test -x ../${PACKAGE}-`cat .version`;\
210 then rm ../${PACKAGE}-`cat .version` ; fi"
211 @ln -s ${PACKAGE} ../${PACKAGE}-`cat .version`
212 @find . -path CVS -prune\
213 -o -path o -prune\
214 -o -regex .\*/${PACKAGE} -prune\
215 -o -regex .\*/configure -prune\
216 -o -regex .\*/config.status -prune\
217 -o -regex .\*\.o -prune\
218 -o -type f -exec chmod 644 \{\} \;
219 @/bin/sh -c 'cd .. ; V=`cat ${PACKAGE}/.version` ;\
220 tar zcf ${PACKAGE}-$$V.tar.gz\
221 `find ${PACKAGE}-$$V/\
222 -regex .\*/CVS -prune\
223 -o -regex .\*~ -prune\
224 -o -regex .\*/o -prune\
225 -o -regex .\*/res -prune\
226 -o -regex .\*\\\\.o -prune\
227 -o -regex .\*\\\\.a -prune\
228 -o -regex .\*\\\\.m -prune\
229 -o -regex .\*\\\\.bmp -prune\
230 -o -regex .\*/${PACKAGE} -prune\
231 -o -regex .\*/Makefile -prune\
232 -o -regex .\*/config.cache -prune\
233 -o -regex .\*/config.h -prune\
234 -o -regex .\*/config.log -prune\
235 -o -regex .\*/config.status -prune\
236 -o -regex .\*/configure.scan -prune\
237 -o -regex .\*/log -prune\
238 -o -regex .\*/gmon.out -prune\
239 -o -regex .\*/\.cvsignore -prune\
240 -o -regex .\*/\.gdbinit -prune\
241 -o -regex .\*/NOTES -prune\
242 -o -regex .\*/patches -prune\
243 -o -type f -print | sort`'
244 @-rm ../${PACKAGE}-`cat .version`
245
246 #
247 # --- Dependencies: depend.m
248 #
249
250 %.d: %.c
251 @set -e; rm -f $@; \
252 $(CC) -M $(CFLAGS) $< > $@.$$$$; \
253 sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
254 rm -f $@.$$$$
255
256 %.d: %.cc
257 @set -e; rm -f $@; \
258 $(CXX) -MM $(CFLAGS) $< > $@.$$$$; \
259 sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
260 rm -f $@.$$$$
261
262 -include $(DEPS)