File: Makefile.in

package info (click to toggle)
buici-clock 0.3.7
  • links: PTS
  • area: main
  • in suites: slink
  • size: 736 kB
  • ctags: 840
  • sloc: cpp: 4,551; makefile: 397; sh: 224; yacc: 175; lex: 127
file content (255 lines) | stat: -rw-r--r-- 5,695 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
#							-*- Makefile -*-
# Makefile.in
#   $Id: Makefile.in,v 1.13 1998/10/26 18:59:28 elf Exp $
#
#  written by Marc Singer
#  8 May 1996
#
#

.PHONY: install clean all version revision patch

#
# --- Project specification
#

PACKAGE=xo
TARGET=xo
O_D=o/
SRC_LIB= \
 ldisplay.cxx lwindow.cxx lfont.cxx \
 wbutton.cxx wtext.cxx wdialog.cxx \
 lhash.cxx larray.cxx \
 res.cxx dmalloc.cxx dither.cxx lpicture.cxx

_SRC=$(SRC_LIB) \
 loupe.cxx stats.cxx
# classes.cxx main.cxx


SRC= $(_SRC) res_l.cxx res_y.cxx

# lwindowclass.cxx
# options.cxx version.cxx 
# system.cxx video.cxx timebase.cxx 
# lfile.cxx lstream.cxx lring.cxx lthread.cxx thread.s 
# report.cxx

____OBJ=$(SRC:.c=.o)
___OBJ=$(____OBJ:.cxx=.o)
__OBJ=$(___OBJ:.s=.o)
_OBJ=$(__OBJ:.l=.o)
OBJ=$(_OBJ:.y=.o)

____OBJ_LIB=$(SRC_LIB:.c=.o)
___OBJ_LIB=$(____OBJ_LIB:.cxx=.o)
__OBJ_LIB=$(___OBJ_LIB:.s=.o)
_OBJ_LIB=$(__OBJ_LIB:.l=.o)
OBJ_LIB=$(_OBJ_LIB:.y=.o)

VERSION_HEADER=version.h

CC=@CXX@
CFLAGS=@CFLAGS@
#CFLAGS=-${CFLAGS} -O
#CFLAGS=-${CFLAGS} -O2
#CFLAGS=-${CFLAGS} -fomit-frame-pointer
CFLAGS_=-g @CFLAGS_W@@X_CFLAGS@
LFLAGS=-g @LDFLAGS@@X_LIBS@@X_PRE_LIBS@@LIBS@ -lX11 -lXext@X_EXTRA_LIBS@
DEPEND=depend.m
FLEX=@LEX@
YACC=@YACC@

#
# --- Autoconf generated symbols
#

#srcdir = @srcdir@
#VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
infodir = @infodir@
mandir = @mandir@

#
# --- Implicit rules
#

vpath %.o $(O_D)

%.o: %.cxx
	$(ECHO) $(CC) -c $(CFLAGS) -o $(O_D)$@ $<
	@$(CC) -c $(CFLAGS) $(CFLAGS_) -o $(O_D)$@ $<

$(O_D)%.o: %.cxx
	$(ECHO) $(CC) -c $(CFLAGS) -o $@ $<
	@$(CC) -c $(CFLAGS) $(CFLAGS_) -o $@ $<

%.o: %.s
	$(ECHO) $(AS) $(AFLAGS) -o $(O_D)$@ $<
	@$(AS) $(AFLAGS) $(AFLAGS_) -o $(O_D)$@ $<

$(O_D)%.o: %.s
	$(ECHO) $(AS) $(AFLAGS) -o $@ $<
	@$(AS) $(AFLAGS) $(AFLAGS_) -o $@ $<

%.cxx: %.l
	$(FLEX) -o$@ $<

%.cxx: %.y
	$(YACC) -d -o $@ $<
	mv $@.h $(basename $@).h

%.i: %.cxx
	$(CC) -c $(CFLAGS) $(CFLAGS_) -E -o $(notdir $@) $<

%.s: %.cxx
	$(CC) -c $(CFLAGS) $(CFLAGS_) -S -o $@ $<

%.s: %.c
	$(CC) -c $(CFLAGS) $(CFLAGS_) -S -o $@ $<

#
# --- Primary targets
#

all: check_depend make_o _version.h res_y.cxx $(O_D)$(TARGET) libxo.a

.PHONY: make_o
make_o:
	@if test ! -e $(O_D) ;\
	 then echo === Creating \'$(O_D)\' output directory ; mkdir $(O_D) ; fi

res_l.cxx: res_l.l
res_y.cxx: res_y.y

$(O_D)res.o: lres.h

res: o/res_y.o o/res_l.o o/res.o 
	$(CC) $(LFLAGS) -o $@ $^

libxo.a: $(OBJ_LIB)
	ar rc libxo.a $(addprefix $(O_D),$(OBJ_LIB))

$(O_D)$(TARGET): $(OBJ)
	$(CC) $(LFLAGS) -o $@ $(addprefix $(O_D),$(OBJ))

#install:
#	cp $(TARGET).exe c:/usr/local

.PHONY: count
count:
	wc $(_SRC) *.h

clean:
ifneq "$(O_D)" ""
	-rm -rf $(O_D)
else
	-rm $(OBJ)
endif
	-rm *.i

.PHONY: dist_clean
dist_clean:
	@-rm -f \#* *~ *.sed *.i *.cod

res_l.l: res.h
res_y.y: res.h

#
# Version and Build Engineering
#

.version: .version_major .version_minor .version_patch
	@/bin/echo -n `cat .version_major`.`cat .version_minor`.`cat \
		.version_patch`  > .version

_version.h: .version
	@/bin/echo -e \#define SZ_VERSION \"`cat .version`\"  > _version.h
 
.PHONY: transmit
transmit: # distribution-archive

	@/bin/sh -c "cd .. ;\
	 distftp.sh ${PACKAGE} ${PACKAGE}-`cat .version`.tar.gz"
	@distftp.sh ${PACKAGE} ANNOUNCEMENT
	@distftp.sh ${PACKAGE} README
	@distftp.sh ${PACKAGE} ${PACKAGE}-`cat .version`.lsm

lsm.sed: _version.h
	@echo Creating LSM edit script...
	@/bin/echo s/\<\<version\>\>/`cat .version`/ > lsm.sed
	@/bin/echo s/\<\<date\>\>/`date +"%d %B %Y"`/ >> lsm.sed
	@/bin/echo s/\<\<tar-file\>\>/${PACKAGE}-`cat .version`.tar.gz/ \
	 >> lsm.sed
	@/bin/echo s/\<\<lsm-file\>\>/${PACKAGE}-`cat .version`.lsm/ >> lsm.sed

.PHONY: ${PACKAGE}.lsm
${PACKAGE}.lsm: lsm.sed LSM
	@echo Creating LSM file...
	@-rm *.lsm
	@sed -f lsm.sed LSM > ${PACKAGE}-`cat .version`.lsm

.PHONY: distribution-archive da
distribution-archive da: ${PACKAGE}.lsm dist_clean
	@echo Creating distribution archive...
	@/bin/sh -c "if test -x ../${PACKAGE}-`cat .version`;\
		then rm ../${PACKAGE}-`cat .version` ; fi"
	@ln -s ${PACKAGE} ../${PACKAGE}-`cat .version`
	@find . -path CVS -prune\
		-o -path o -prune\
		-o -regex .\*/${PACKAGE} -prune\
		-o -regex .\*/configure -prune\
		-o -regex .\*/config.status -prune\
		-o -regex .\*\.o -prune\
		-o -type f -exec chmod 644 \{\} \;
	@/bin/sh -c 'cd .. ; V=`cat ${PACKAGE}/.version` ;\
		tar zcf ${PACKAGE}-$$V.tar.gz\
		`find ${PACKAGE}-$$V/\
		 -regex .\*/CVS -prune\
		 -o -regex .\*~ -prune\
		 -o -regex .\*/o -prune\
		 -o -regex .\*/res -prune\
		 -o -regex .\*\\\\.o -prune\
		 -o -regex .\*\\\\.a -prune\
		 -o -regex .\*\\\\.m -prune\
		 -o -regex .\*\\\\.bmp -prune\
		 -o -regex .\*/${PACKAGE} -prune\
		 -o -regex .\*/Makefile -prune\
		 -o -regex .\*/config.cache -prune\
		 -o -regex .\*/config.h -prune\
		 -o -regex .\*/config.log -prune\
		 -o -regex .\*/config.status -prune\
		 -o -regex .\*/configure.scan -prune\
		 -o -regex .\*/log -prune\
		 -o -regex .\*/gmon.out -prune\
		 -o -regex .\*/\.cvsignore -prune\
		 -o -regex .\*/\.gdbinit -prune\
		 -o -regex .\*/NOTES -prune\
		 -o -regex .\*/patches -prune\
		 -o -type f -print | sort`'
	@-rm ../${PACKAGE}-`cat .version`

#
# --- Dependencies: depend.m
#

.PHONY: depend check_depend

# *** removed _version.h from dependency list.  Leaving it in causes
# fresh build to generate dependencies and fail because of missing files.
depend: $(DEPEND)
$(DEPEND) depend: # $(SRC)
	$(CC) $(CFLAGS_I) -M $(SRC) > $(DEPEND)

check_depend:
	@if test ! -s ${DEPEND} ; then \
	 echo "-- Use 'make depend' to create dependencies file." \
              "  Continuing without it." ; fi	

#
# --- Include dependencies always.  Configure creates an empty file
#
include ${DEPEND}