-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.in
371 lines (300 loc) · 11.6 KB
/
makefile.in
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
# src/aksl/makefile.pub.in 2018-3-4 Alan U. Kennington.
#-----------------------------------------------------------------------------
# Copyright (C) 1989-2018, Alan U. Kennington.
# You may distribute this software under the terms of Alan U. Kennington's
# modified Artistic Licence, as specified in the accompanying LICENCE file.
#-----------------------------------------------------------------------------
# Makefile (public) for the AKSL software, a C++ simulation library.
# Imported environment variables:
# SDIR # Rendezvous directory for AKSL software development.
VERSION = 0.9.5
# The default environment is linux.
all: clearerr libaksl.a
# SDIR = rendezvous directory for shared simulation libraries.
# Source and compiled stuff is exported to $S from this directory.
# $S is typically something like ~/pub.
# Subdirectories of ~/pub are expected to be created already.
S = $(SDIR)
LIBDIR = $S/lib
INCDIR = $S/include/aksl
SRCDIR = $S/src/aksl
INCLUDES = -I../include
CPLUSPLUS = @CXX@
CPLUSPLUS_E = @CXXCPP@
CC_OPTIONS = -O $(INCLUDES)
LN_S = @LN_S@
RANLIB = @RANLIB@
# Location of all the exported header files.
I = include/aksl
# These are the only .c and .h files which are saved.
CFILES = aksl.c aksldate.c aksldefs.c akslip.c aksltime.c args.c \
array.c bbcod.c bmem.c boolvec.c calendar.c capsule.c \
charbuf.c cod.c cpbuf.c datum.c dlist.c error.c \
form.c geom2.c hashfn.c heap.c intlist.c \
iso8859.c list.c nbytes.c newstat.c newstr.c \
num.c numb.c numprint.c objptr.c oral.c \
oralaksl.c rndm.c selector.c sfn.c ski.c \
str.c termdefs.c token.c value.c vplist.c
HFILES = $I/aksl.h $I/aksldate.h $I/aksldefs.h \
$I/akslip.h $I/aksltime.h $I/args.h $I/array.h \
$I/bbcod.h $I/bindef.h $I/bmem.h $I/boole.h $I/boolvec.h \
$I/calendar.h $I/capsule.h $I/charbuf.h $I/cod.h $I/cpbuf.h \
$I/datum.h $I/dlist.h $I/error.h $I/form.h \
$I/geom2.h $I/hashfn.h $I/heap.h \
$I/intlist.h $I/list.h \
$I/nbytes.h $I/newstat.h $I/newstr.h \
$I/num.h $I/numb.h $I/numprint.h $I/objptr.h $I/options.h \
$I/oral.h $I/oralaksl.h $I/phys.h $I/rndm.h \
$I/selector.h $I/sfn.h $I/ski.h \
$I/str.h $I/termdefs.h $I/token.h $I/value.h $I/vplist.h \
$I/config.h
LIBINSTALLS = libaksl.a aksl_h.dep aksl_c.dep
INCINSTALLS = $(HFILES)
SRCINSTALLS = \
LICENCE makefile INSTALL $(CFILES)
SRCINSTALLS_H = $(HFILES)
# Subdirectories for separate compilation for each OS:
WORKDIR = work
$(WORKDIR):
@if [ ! -d $@ ] ; then mkdir $@ ; fi
# Make links in per-OS compilation subdirectories to source files.
MAKE_PARENT_LINKS = \
for f in $? ; do if [ ! -h $$f ] ; then $(LN_S) ../$$f ; fi ; done
MAKE_INCLUDE_LINK = \
if [ ! -h incl ] ; then $(LN_S) ../include/aksl incl ; fi
MAKE_INCLUDE_LINK2 = \
if [ ! -h makefile ] ; then $(LN_S) ../../makefile ; fi
SOURCE_TO_LINK = $(CFILES) makefile
link_work: .link_work
.link_work: $(SOURCE_TO_LINK)
@cd $(WORKDIR); $(MAKE_PARENT_LINKS); $(MAKE_INCLUDE_LINK)
@cd include/aksl; $(MAKE_INCLUDE_LINK2)
@touch $@
# Make rendezvous directory subdirectories.
RV_DIRS = $S/bin $S/include $S/include/aksl $S/lib \
$S/src $S/src/aksl $S/src/aksl/include $S/src/aksl/include/aksl
MAKE_RV_DIRS = \
for f in $? ; do if [ ! -d $$f ] ; then mkdir $$f; fi; done
rvdirs: .make_rv_dirs
.make_rv_dirs: $(RV_DIRS)
@touch $@
$(RV_DIRS):
if [ ! -d $@ ] ; then mkdir $@ ; fi
install: libaksl.a rvdirs .libinstall .incinstall .srcinstall
.libinstall: $(LIBINSTALLS)
chmod go+rX $?
cp -p $? $(LIBDIR)
@touch $@
@echo --- lib install complete ---
@echo ""
.incinstall: $(INCINSTALLS)
chmod go+rX $?
cp -p $? $(INCDIR)
@touch $@
@echo --- inc install complete ---
@echo ""
.srcinstall_c: $(SRCINSTALLS)
chmod go+rX $?
cp -p $? $(SRCDIR)
@touch $@
@echo --- src install complete ---
@echo ""
.srcinstall_h: $(SRCINSTALLS_H)
chmod go+rX $?
cp -p $? $(SRCDIR)/include/aksl
@touch $@
@echo --- src install complete --- headers ---
@echo ""
.srcinstall: .srcinstall_c .srcinstall_h
.srcinstall_h_sub:
cd include/aksl; make -f makefile .srcinstall_h
.SUFFIXES: .E .F $(SUFFIXES)
# Suppress rule for making aksl out of aksl.c.
.c:
.c.o:
@echo -- Remaking \"$@\" because of:
@echo -- $?
$(CPLUSPLUS) -c $(CC_OPTIONS) $(EXTRA_OPTIONS) \
$*.c 2>> errorfile 1>&2
@echo
.c.E:
@echo -- Remaking \"$@\" because of:
@echo -- $?
$(CPLUSPLUS_E) $(CC_OPTIONS) \
$*.c 2>> errorfile
@echo
.c.F:
@echo -- Remaking \"$@\" because of:
@echo -- $?
$(CPLUSPLUS) -F $(CC_OPTIONS) \
$*.c 2>> errorfile
@echo
.c.s:
@echo -- Remaking \"$@\" because of:
@echo -- $?
$(CPLUSPLUS) -S $(CC_OPTIONS) \
$*.c 2>> errorfile
@echo
# File to help minimize remaking of software in other directories:
HDEPFILES = aksl_h.dep
CDEPFILES = aksl_c.dep
$(HDEPFILES): $(HFILES)
@touch $@
$(CDEPFILES): $(CFILES)
@touch $@
#-------------------------------------------------------------------------------
# The following set of macros is necessitated by the apparent fact that
# some compilers do not have the ANSI C __TIME__ and __DATE__ definitions.
# If you don't have "date" or "expr", just comment out the following 3 macros:
# Note that sunos4.1.3 "date" does not have %Y format.
# UTCDATE = `date -u '+UTC 19%y %h %d %a %T'`
UTCDATE = `date -u '+UTC %Y %h %d %a %T'`
LOCDATE = `date`
BOTHDATES = $(LOCDATE) ($(UTCDATE))
DATECALC = d="$(BOTHDATES)";
DATE = "-DDATESTRING=\"$$d\"" "-DMACHINESTRING=\"`hostname`\""
MAKEDATE = $(DATECALC) \
$(CPLUSPLUS) $(CC_OPTIONS) -c $(DATE) \
aksldate.c 2>> errorfile 1>&2
# Dependencies of c-files and h-files:
# Fiendishly clever dependency determination scheme (patent not yet pending):
# This column is a list of included header files.
# Macro basic other dependencies
CONFIG_H = $I/config.h
AKSLDATE_H = $I/aksldate.h
aksldate.o: aksldate.c $(AKSLDATE_H)
$(MAKEDATE)
OPTIONS_H = $I/options.h
BOOLE_H = $I/boole.h
BINDEF_H = $I/bindef.h
NUMB_H = $I/numb.h
numb.o: $(NUMB_H)
NUM_H = $I/num.h $(NUMB_H)
num.o: $(NUM_H)
NBYTES_H = $I/nbytes.h $(NUMB_H) $(BOOLE_H) $(CONFIG_H)
nbytes.o: $(NBYTES_H)
PHYS_H = $I/phys.h
AKSLDEFS_H = $I/aksldefs.h
aksldefs.o: $(AKSLDEFS_H)
NEWSTR_H = $I/newstr.h $(BOOLE_H) $(CONFIG_H)
newstr.o: $(NEWSTR_H) $(AKSLDEFS_H)
AKSLTIME_H = $I/aksltime.h
aksltime.o: $(AKSLTIME_H) $(AKSLDEFS_H) $(CONFIG_H)
SIGMON_H = $I/sigmon.h $(BOOLE_H) $(CONFIG_H)
sigmon.o: $(SIGMON_H)
NUMPRINT_H = $I/numprint.h $(NBYTES_H) $(AKSLDEFS_H)
numprint.o: $(NUMPRINT_H) $(NUMB_H)
BMEM_H = $I/bmem.h
bmem.o: $(BMEM_H) $(NUMPRINT_H) $(AKSLDEFS_H)
CALENDAR_H = $I/calendar.h
calendar.o: $(CALENDAR_H) $(NUMPRINT_H) $(NUMB_H) $(AKSLDEFS_H) \
$(CONFIG_H)
ARGS_H = $I/args.h $(BOOLE_H)
args.o: $(ARGS_H)
ARRAY_H = $I/array.h $(AKSLDEFS_H) $(NUMB_H) $(BOOLE_H)
array.o: $(ARRAY_H)
BOOLVEC_H = $I/boolvec.h $(AKSLDEFS_H) $(NUMB_H) $(BINDEF_H) $(BOOLE_H)
boolvec.o: $(BOOLVEC_H)
LIST_H = $I/list.h $(BOOLE_H)
list.o: $(LIST_H)
DLIST_H = $I/dlist.h $(BOOLE_H)
dlist.o: $(DLIST_H)
INTLIST_H = $I/intlist.h $(LIST_H)
intlist.o: $(INTLIST_H)
VPLIST_H = $I/vplist.h $(LIST_H) $(NEWSTR_H) $(BMEM_H)
vplist.o: $(VPLIST_H)
NEWSTAT_H = $I/newstat.h $(BOOLE_H)
newstat.o: $(NEWSTAT_H) $(VPLIST_H)
SFN_H = $I/sfn.h $(LIST_H) $(AKSLDEFS_H) $(NUMB_H)
sfn.o: $(SFN_H)
GEOM2_H = $I/geom2.h $(LIST_H) $(AKSLDEFS_H) $(NUMB_H)
geom2.o: $(GEOM2_H)
CHARBUF_H = $I/charbuf.h $(NBYTES_H) $(BOOLE_H)
charbuf.o: $(CHARBUF_H)
CPBUF_H = $I/cpbuf.h $(LIST_H) $(BMEM_H) $(AKSLDEFS_H) $(NUMB_H)
cpbuf.o: $(CPBUF_H) $(NUMPRINT_H)
FORM_H = $I/form.h $(CONFIG_H)
form.o: $(FORM_H) $(CHARBUF_H) $(NUMPRINT_H) $(AKSLDEFS_H)
COD_H = $I/cod.h $(NUMB_H)
cod.o: $(COD_H) $(NUMPRINT_H)
BBCOD_H = $I/bbcod.h $(NUMB_H)
bbcod.o: $(BBCOD_H) $(NUMPRINT_H)
CAPSULE_H = $I/capsule.h $(COD_H) $(LIST_H) $(NUMB_H)
capsule.o: $(CAPSULE_H) $(FORM_H) $(NUMPRINT_H) $(AKSLDEFS_H)
HEAP_H = $I/heap.h $(AKSLDEFS_H)
heap.o: $(HEAP_H)
HASHFN_H = $I/hashfn.h $(COD_H) $(VPLIST_H)
hashfn.o: $(HASHFN_H)
RNDM_H = $I/rndm.h $(AKSLDEFS_H)
rndm.o: $(RNDM_H)
STR_H = $I/str.h $(LIST_H) $(NEWSTR_H) $(BOOLE_H)
str.o: $(STR_H) $(AKSLDEFS_H)
SKI_H = $I/ski.h $(STR_H) $(LIST_H) $(BOOLE_H)
ski.o: $(SKI_H) $(AKSLDEFS_H) $(CONFIG_H)
ERROR_H = $I/error.h $(SKI_H)
error.o: $(ERROR_H)
AKSLIP_H = $I/akslip.h $(ERROR_H) $(NBYTES_H) $(HASHFN_H) $(NUMB_H) \
$(AKSLDEFS_H) $(BOOLE_H)
akslip.o: $(AKSLIP_H) $(NUMPRINT_H)
SELECTOR_H = $I/selector.h $(AKSLIP_H) $(HEAP_H) $(LIST_H) $(BMEM_H) \
$(NUMB_H) $(AKSLTIME_H) $(AKSLDEFS_H) $(CONFIG_H)
selector.o: $(SELECTOR_H) $(CHARBUF_H) $(NUMPRINT_H)
TERMDEFS_H = $I/termdefs.h $(LIST_H) $(AKSLDEFS_H)
termdefs.o: $(TERMDEFS_H) $(STR_H) $(NUMPRINT_H) $(CONFIG_H)
DATUM_H = $I/datum.h $(LIST_H) $(ERROR_H) $(AKSLDEFS_H)
datum.o: $(DATUM_H)
VALUE_H = $I/value.h $(DATUM_H) $(LIST_H) $(BMEM_H) $(AKSLDEFS_H)
value.o: $(VALUE_H) $(NUMPRINT_H)
AKSL_H = $I/aksl.h $(VALUE_H) $(DATUM_H) $(SKI_H) $(LIST_H) \
$(HEAP_H) $(BMEM_H) $(AKSLDEFS_H) $(BOOLE_H) \
$(OPTIONS_H)
aksl.o: $(AKSL_H) $(NUMPRINT_H)
OBJPTR_H = $I/objptr.h $(AKSL_H) $(STR_H) $(LIST_H) $(AKSLDEFS_H) \
$(BOOLE_H)
objptr.o: $(OBJPTR_H)
TOKEN_H = $I/token.h $(STR_H) $(CHARBUF_H)
token.o: $(TOKEN_H)
ORAL_H = $I/oral.h $(TOKEN_H) $(ERROR_H)
oral.o: $(ORAL_H)
ORALAKSL_H = $I/oralaksl.h $(AKSL_H)
oralaksl.o: $(ORALAKSL_H) $(ORAL_H)
AKSLOBJS = oralaksl.o oral.o token.o objptr.o aksl.o value.o datum.o \
termdefs.o selector.o akslip.o error.o ski.o str.o \
rndm.o hashfn.o heap.o capsule.o bbcod.o cod.o form.o cpbuf.o \
charbuf.o geom2.o sfn.o newstat.o \
vplist.o intlist.o dlist.o \
list.o boolvec.o array.o args.o calendar.o bmem.o numprint.o \
aksltime.o newstr.o \
aksldefs.o nbytes.o num.o numb.o aksldate.o
# For forcing the order of compilation:
AKSLDEPS = numb.o num.o nbytes.o aksldefs.o newstr.o aksltime.o \
numprint.o bmem.o calendar.o args.o \
array.o boolvec.o list.o dlist.o intlist.o \
vplist.o newstat.o sfn.o \
geom2.o charbuf.o cpbuf.o form.o \
cod.o bbcod.o capsule.o heap.o hashfn.o rndm.o \
str.o ski.o error.o akslip.o selector.o termdefs.o datum.o \
value.o aksl.o objptr.o token.o oral.o oralaksl.o
libaksl: $(AKSLDEPS) libaksl0.a
libaksl0.a: $(AKSLOBJS)
ar rv $@ $?
$(MAKEDATE)
ar rv $@ aksldate.o
$(RANLIB) $@
./$(WORKDIR)/libaksl0.a: $(WORKDIR) link_work
@echo Compilation of \"$@\": `date`. | cat >> $(WORKDIR)/errorfile
@echo >> $(WORKDIR)/errorfile
@rm -f errorfile
@$(LN_S) $(WORKDIR)/errorfile
cd ./$(WORKDIR); make -f makefile I=incl libaksl
libaksl.a: ./$(WORKDIR)/libaksl0.a
cp -p ./$(WORKDIR)/libaksl0.a $@
@chmod go+rX $@
#-------------------------------------------------------------------------------
# Re-initialise the error report file:
clearerr:
@touch errorfile
@echo Compilation of \"aksl\" library: `date`. | cat > errorfile
@echo >> errorfile
clean:
rm -fr $(AKSLOBJS) libaksl0.a libaksl.a work .link_work errorfile