comparison makefile @ 0:5242703e91d3 tip

Initial checkin for AIM92 aimR8.2 (last updated May 1997).
author tomwalters
date Fri, 20 May 2011 15:19:45 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:5242703e91d3
1 ###########################################################################
2 #
3 # ROOT MAKEFILE FOR AIM M. Allerhand, (MRC-APU) 7/7/93
4 # C. Giguere, 24/3/94
5 # A. J. Datta, (MRC-APU)31/8/95
6 # R. Patterson (MRC-APU)09/4/97
7 #
8 ###########################################################################
9 ###########################################################################
10 #
11 # INTRODUCTION AND TABLE OF CONTENTS
12 #
13 # This is the Root makefile for the AIM software package which
14 # consists of the AIM program itself, signal processing tools,
15 # documentation, demonstrations and a Matlab interface. Part I
16 # describes the file system, Part II the makefile itself and
17 # Part III the make help option.
18 #
19 #
20 # PART I: THE AIM FILE SYSTEM
21 #
22 # The file system for AIM itself is organised into five directories,
23 # $(DIRS): filter, glib, model, stitch, and wdf. The root makefile
24 # calls a nested makefile in each of the five directories to build
25 # libraries, $(LIBS). These are then linked to form main programs,
26 # $(MAIN). The signal processing tools are divided into basetools (in
27 # directory tools) and auxtools (in directories xaim and saitools).
28 # There are two directories for documentation (man and docs), one for
29 # demonstrations scripts (scripts) and one for digitised sounds
30 # (waves).
31 #
32 # I.A. Directories and Directory Links
33 #
34 # I.B. AIM_FILES: For AIM Executables, Basetools and Auxtools.
35 # I.B.1. Makefiles
36 # I.B.2. AIM Sources: SRC_AIM
37 # I.B.3. Basic Tools: basetools
38 # I.B.4. Auxillary Tools: auxtools
39 # I.B.5. Libraries:
40 # I.B.6. Executables:
41 # I.B.7. Links to Executables:
42 #
43 # I.C. DOC_FILES: For Documentation, Man, Demonstrations and Matlab.
44 # I.C.1. Manual Entries: man/man1
45 # I.C.2. Demonstration Scripts: scripts
46 # I.C.3. Documentation docs
47 # I.C.4. Waves waves
48 # I.C.5. Matlab Interface matlab
49 #
50 #
51 # PART II: THE ROOT MAKEFILE ITSELF
52 #
53 # II.A. Arguements and Flags
54 #
55 # II.B. Targets
56 # II.B.1. General Targets
57 # II.B.2. Link and Build Libraries and Targets
58 # II.B.3. Create Directories and Pull Sources
59 # II.B.4. Create AIM Links (genXXX)
60 # II.B.5. Make tar files
61 # II.B.6. Maintenance Targets
62 #
63 # II.C. Machines
64 #
65 #
66 # PART III: MAKE HELP
67 #
68 # III.A. ARGS
69 # III.B. TARGETS
70 # III.C. MACHINES
71 #
72
73 ###########################################################################
74 ###########################################################################
75 #
76 # PART I: THE AIM FILE SYSTEM
77 #
78 # The signal processing tools are divided into basetools (in
79 # directory tools) and auxtools (in directories xaim and saitools).
80 # There are two directories for documentation (man and docs), one for
81 # demonstrations scripts (scripts) and one for digitised sounds
82 # (waves).
83 #
84 ###########################################################################
85 #
86 # I.A. Directories and SCCS Links
87 #
88
89 DIRS = model glib stitch filter \
90 wdf tools xaim bin \
91 waves man man/man1 scripts \
92 docs saitools matlab
93
94 SCCSLINKS = model/SCCS glib/SCCS stitch/SCCS filter/SCCS \
95 wdf/SCCS tools/SCCS xaim/SCCS \
96 man/SCCS scripts/SCCS docs/SCCS saitools/SCCS \
97 matlab/SCCS
98
99
100 ###########################################################################
101 #
102 # I.B. AIM_FILES: For AIM Executables, Basetools and Auxtools.
103 #
104 #
105 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
106 # I.B.1. Makefiles
107 #
108 # The root makefile calls a nested makefile in each of the five AIM
109 # directories to build libraries, $(LIBS). These are then linked to
110 # form main programs, $(MAIN).
111
112 MAKEFILES = model/makefile glib/makefile stitch/makefile filter/makefile \
113 wdf/makefile tools/makefile xaim/makefile saitools/makefile
114
115 #
116 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
117 # I.B.2. AIM Sources: SRC_AIM
118 #
119 # The file system for AIM itself is organised into five directories,
120 # $(DIRS): filter, glib, model, stitch, and wdf.
121
122 SRC_AIM = glib/null.c glib/ps.c glib/grey.c glib/options.c \
123 glib/windows.h glib/axes.h glib/grey.h glib/options.h \
124 glib/X.c \
125 model/model.c model/bank.c model/corti.c model/image.c \
126 model/model.h model/bank.h model/corti.h model/image.h \
127 model/units.c model/defaults.c model/integrate.c model/spiral.c \
128 model/units.h model/defaults.h model/integrate.h model/spiral.h \
129 model/calc.h model/atan.c model/interp.c model/faster.c \
130 model/new.c model/table.c model/gen.c model/review.c \
131 model/version.c \
132 filter/formulae.c filter/phase.c filter/gamma_tone.c \
133 filter/formulae.h filter/phase.h filter/gamma_tone.h \
134 filter/scales.c filter/all.c filter/generic.c filter/imb.c \
135 filter/scales.h filter/recurse.c filter/recurse.h \
136 wdf/upsample.c wdf/fir.c wdf/ear.c wdf/wdf_ear.c \
137 wdf/upsample.h wdf/fir.h wdf/ear.h wdf/wdf_ear.h \
138 wdf/formulae_tl.c wdf/scales_tl.c wdf/bank_tl.c wdf/wdf_tl.c \
139 wdf/formulae_tl.h wdf/scales_tl.h wdf/bank_tl.h wdf/wdf_tl.h \
140 wdf/meddis.c wdf/calc_tl.h wdf/meddis.h \
141 stitch/buffer.c stitch/io.c stitch/draw.c stitch/funcs.c \
142 stitch/buffer.h stitch/io.h stitch/draw.h stitch/funcs.h \
143 stitch/pullable.c stitch/stitch.c stitch/fill.c stitch/srcio.c \
144 stitch/pullable.h stitch/stitch.h stitch/fill.h stitch/srcio.h \
145 stitch/fillable.c stitch/source.c stitch/wrap.c stitch/stypes.c \
146 stitch/fillable.h stitch/source.h stitch/wrap.h stitch/stypes.h \
147 stitch/ops.c stitch/ops.h
148
149 #
150 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
151 # I.B.3. Basic Tools: basetools
152 #
153
154 SRC_TOOLS = tools/options.h tools/units.h tools/strmatch.h tools/header.h \
155 tools/sigproc.h tools/x11coord.h \
156 tools/acf.c tools/acgram.c tools/header.c tools/atob.c \
157 tools/audim.c tools/btoa.c tools/bufwave.c tools/bufframe.c \
158 tools/chi.c tools/conv.c tools/convert.c tools/cosine.c \
159 tools/edframe.c \
160 tools/edwave.c tools/fbank.c tools/fft.c tools/filt1.c \
161 tools/freqs.c tools/ftgram.c tools/ftoa.c tools/ftos.c \
162 tools/gate.c tools/gauss.c tools/hdr.c tools/integframe.c \
163 tools/loudness.c tools/merge.c tools/naptosai.c tools/noise.c \
164 tools/op.c tools/options.c tools/pitch_strength.c tools/ptrain.c \
165 tools/racf.c tools/ramp.c tools/saitonap.c tools/scale.c \
166 tools/sigproc.c tools/smooth.c tools/sp_weights.c tools/stats.c \
167 tools/step.c tools/stof.c tools/strmatch.c tools/swab.c \
168 tools/tone.c tools/units.c tools/x11coord.c tools/x11fonts.c \
169 tools/x11gram.c tools/x11play.c tools/x11plot.c
170
171 #
172 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
173 # I.B.4. Auxillary Tools: auxtools
174 #
175
176 SRC_XAIM = xaim/synthirn.c xaim/synthdramp.c xaim/buttons.c \
177 xaim/cartoon.c xaim/graphics.c xaim/initialise.c \
178 xaim/stipple_a xaim/switch_axes.c xaim/switch_buttons.c \
179 xaim/switch_control.c xaim/xreview.bitmap xaim/xreview.c \
180 xaim/xreview.h xaim/disclaimer.text xaim/releasenotes.text
181
182 SRC_SAITOOLS = saitools/changeheader.c saitools/findintervals_nap.c \
183 saitools/findpeaks.c saitools/header.c saitools/inout.c \
184 saitools/napgraph.c saitools/napheader.c saitools/removepeaks.c \
185 saitools/saicut.c saitools/saigraph.c saitools/saiinfo.c \
186 saitools/sairotate.c saitools/saisummary.c saitools/tip.h \
187 saitools/trigger.c saitools/findintervals_sai.c \
188 saitools/matrix.c
189
190 #
191 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
192 # I.B.5. Libraries:
193 #
194
195 MLIB = model/libmodel.a
196 GLIB = glib/libglib.a
197 SLIB = stitch/libstitch.a
198 FLIB = filter/libfilter.a
199 WLIB = wdf/libwdf.a
200 OLIB = glib/libopts.a
201 LIBS = $(MLIB) $(GLIB) $(SLIB) $(FLIB) $(WLIB) $(OLIB)
202
203 #
204 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
205 # I.B.6. Executables:
206 #
207
208 MAIN = model/gen model/review
209 XAIM = bin/synthirn bin/synthdramp bin/xreview
210 SAITOOLS = bin/saisummary bin/sairotate bin/saiinfo bin/saigraph \
211 bin/saicut bin/napgraph
212
213 WTOOLS = bin/hdr bin/atob bin/btoa bin/bufwave \
214 bin/bufframe \
215 bin/chi bin/convert bin/edframe bin/edwave \
216 bin/fbank bin/filt1 bin/ftoa bin/ftos \
217 bin/gate \
218 bin/integframe bin/loudness bin/merge bin/naptosai \
219 bin/noise bin/op bin/pitch_strength bin/ptrain \
220 bin/ramp bin/saitonap bin/scale bin/sp_weights \
221 bin/stats bin/step bin/stof bin/swab \
222 bin/tone
223
224 SPTOOLS = bin/acf bin/acgram bin/audim bin/conv \
225 bin/cosine bin/fft bin/ftgram bin/gauss \
226 bin/racf bin/smooth
227
228 XTOOLS = bin/x11fonts bin/x11gram bin/x11play bin/x11plot
229
230 TOOLS = $(WTOOLS) $(SPTOOLS) $(XTOOLS)
231
232
233 #
234 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
235 # I.B.7. Links to Executables:
236 #
237
238 LINK_GEN1 = bin/genwav bin/genstp \
239 bin/genbmm bin/gennap bin/gensgm \
240 bin/genasa bin/genepn bin/gensep bin/gensai \
241 bin/gencgm bin/genspl bin/gensas bin/gen
242
243 LINK_GEN2 = bin/gentst bin/genfcr bin/genfcp bin/genfbm \
244 bin/genfbc bin/genfbu bin/genfbs bin/genfbl \
245 bin/genfba bin/genfbh bin/genfbi bin/genfbd \
246 bin/genfeu bin/genfes bin/genfel bin/genfet \
247 bin/genfeh bin/genfei bin/genfed bin/gensie \
248 bin/genfbr bin/genfbt bin/genfec bin/genfea \
249 bin/gensse
250
251 LINK_SCRIPTS = bin/manaim bin/aimdemo_gtf_all bin/aimdemo_gtf_2dat \
252 bin/aimdemo_gtf_spectra bin/aimdemo_gtf_sai bin/aimdemo_tlf_all \
253 bin/aimdemo_tlf_lowhigh bin/aimdemo_tlf_med bin/aimdemo_tlf_std \
254 bin/aimdemo_tlf_spectra bin/aimdemo_hat bin/aimdemo_hat_br \
255 bin/scale_wav bin/equate_energies bin/StrobeCriterionDisplay \
256 bin/aimStrobeCriterion bin/dp_ms bin/dp_pc bin/aimR8demo
257
258 LINK_AIM1 = $(LINK_GEN1) $(LINK_SCRIPTS) bin/review
259 LINK_AIM2 = $(LINK_GEN1) $(LINK_GEN2) bin/review
260
261
262 #
263 #######################################################################
264 #
265 # I.C. DOC_FILES: For Documentation, Man, Demonstrations and Matlab.
266 #
267 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
268 # I.C.1. Manual Entries: man/man1
269 #
270
271 MANWHATIS = man/whatis
272 MANPAGES = man/man1/manaim.1 \
273 man/man1/genbmm.1 man/man1/gennap.1 man/man1/gensai.1 \
274 man/man1/genwav.1 man/man1/gensgm.1 man/man1/genepn.1 \
275 man/man1/genasa.1 man/man1/xreview.1 man/man1/genspl.1 \
276 man/man1/acf.1 man/man1/acgram.1 man/man1/atob.1 man/man1/gencgm.1 \
277 man/man1/audim.1 man/man1/btoa.1 man/man1/bufwave.1 \
278 man/man1/chi.1 man/man1/conv.1 man/man1/convert.1 \
279 man/man1/edframe.1 man/man1/bufframe.1 man/man1/cosine.1 \
280 man/man1/edwave.1 man/man1/fbank.1 man/man1/fft.1 man/man1/filt1.1 \
281 man/man1/ftgram.1 man/man1/ftoa.1 man/man1/ftos.1 man/man1/op.1 \
282 man/man1/gate.1 man/man1/gauss.1 man/man1/hdr.1 man/man1/racf.1 \
283 man/man1/integframe.1 man/man1/loudness.1 \
284 man/man1/merge.1 man/man1/naptosai.1 man/man1/noise.1 \
285 man/man1/options.1 man/man1/pitch_strength.1 man/man1/ptrain.1 \
286 man/man1/ramp.1 man/man1/saitonap.1 man/man1/scale.1 \
287 man/man1/smooth.1 man/man1/sp_weights.1 man/man1/stats.1 \
288 man/man1/step.1 man/man1/stof.1 man/man1/swab.1 \
289 man/man1/tone.1 man/man1/x11fonts.1 \
290 man/man1/x11gram.1 man/man1/x11play.1 man/man1/x11plot.1
291 MAN = $(MANPAGES) $(MANWHATIS)
292
293 #
294 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
295 # I.C.2. Demonstration Scripts: scripts
296
297 SCRIPTS = scripts/manaim scripts/unpack \
298 scripts/aimdemo_gtf_all scripts/aimdemo_gtf_2dat \
299 scripts/aimdemo_gtf_spectra scripts/aimdemo_gtf_sai \
300 scripts/aimdemo_tlf_all scripts/aimdemo_tlf_std \
301 scripts/aimdemo_tlf_lowhigh scripts/aimdemo_tlf_med \
302 scripts/aimdemo_tlf_spectra scripts/aimdemo_hat \
303 scripts/aimdemo_hat_br scripts/StrobeCriterionDisplay \
304 scripts/scale_wav scripts/equate_energies \
305 scripts/aimStrobeCriterion scripts/make-demo-waves \
306 scripts/dp_ms scripts/dp_pc scripts/aimR8demo
307
308 #
309 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
310 # I.C.3. Documentation files: docs
311
312 DOCS = docs/ReadMe.First docs/ReadMe docs/aimBibliography \
313 docs/aimDocList docs/aimDocumentation docs/aimFileFormats \
314 docs/aimInstructions docs/aimMailList docs/aimPaths \
315 docs/aimSilentOptions docs/ftp.doc docs/PAG95.doc \
316 docs/aimStrobeCriterion docs/makefile docs/aimDemonstrations \
317 docs/aimMeddisHewitt
318
319 #
320 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
321 # I.C.4. Demonstration Waves waves
322
323 WAVES = waves/leo waves/cegc waves/hat bin/hat \
324 waves/leo_br waves/cegc_br waves/hat_br bin/hat_br \
325 waves/dr_f8_t16_d waves/dr_f8_t4_d waves/dr_f8_t1_d \
326 waves/dr_f8_t16_r waves/dr_f8_t4_r waves/dr_f8_t1_r \
327 waves/irns_16_1_1 waves/irns_16_1_4 waves/irns_16_1_16
328
329 #
330 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
331 # I.C.5. Matlab Interface matlab
332
333 MATLAB = matlab/mktstr.m matlab/dB.m matlab/showSummarySAI.m matlab/amd_sumsai.m \
334 matlab/amd_sai.m matlab/amd_bmm_nap.m matlab/amd_waves.m matlab/envelope.m \
335 matlab/squaretone.m matlab/damp_env.m matlab/damp_sin.m matlab/taper.m matlab/showBMM.m \
336 matlab/ssave.m matlab/sload.m matlab/showNAP.m matlab/showSAI.m matlab/repeat_cycle.m \
337 matlab/redrawAIM.m matlab/set_input_wave_GUI.m matlab/setFrameChooser.m \
338 matlab/searchAimHeaderInfo.m matlab/save_genrc.m matlab/save_as_genrc.m matlab/sappend.m \
339 matlab/revert_genrc.m matlab/readAIMHeader.m matlab/showAverageSAI.m matlab/puretone.m \
340 matlab/hilitChan.m matlab/getAimHeaderInfo.m matlab/outputChanData.m matlab/erb.m \
341 matlab/getAimResInfo.m matlab/openOptionGUI.m matlab/get_erb_param.m matlab/illuminate.m \
342 matlab/popupShowFig.m matlab/openOptionGUI_page.m matlab/fchan_info.m \
343 matlab/exec_save_genrc.m matlab/XTickShowSAINAP.m matlab/add_sound.m \
344 matlab/FofErbScale.m matlab/ErbScale.m
345
346 #
347 # all files for archiving
348
349 FILES_IN_SCCS = $(MAKEFILES) $(SRC_AIM) $(SRC_TOOLS) $(SRC_XAIM) $(SRC_SAITOOLS)
350 FILES_NOT_IN_SCCS = makefile
351
352 AIM_FILES = $(FILES_IN_SCCS) $(FILES_NOT_IN_SCCS)
353 DOC_FILES = $(DOCS) $(MAN) $(SCRIPTS) $(MATLAB) $(WAVES)
354
355
356
357 ###########################################################################
358 ###########################################################################
359 #
360 # PART II: THE ROOT MAKEFILE ITSELF
361 #
362 #
363
364 ###########################################################################
365 #
366 # II.A. Arguments and Flags
367 #
368 # The form of c compiler is passed by the flag CC.
369 # Locations of X11 libraries and includes on various machines are
370 # passed via the CFLAGS and LDFLAGS.
371 #
372
373 CC = cc
374 CFLAGS = -O -DX11 -I/usr/openwin/include
375 LDFLAGS = -L/usr/openwin/lib -lXmu -lX11 -lm
376
377 TARFILE1 = aimR8.tar.Z
378 TARFILE2 = aimR8docs.tar.Z
379
380 # Defaults for APU system.
381 MOUNT = /net/sound1
382 MASTER = $(MOUNT)/aim/master
383 RELEASE = $(MASTER)/release
384 MAIL_SCRIPT = scripts/unpack
385
386
387 #################################################################################
388 #
389 # II.B. Targets
390 #
391 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
392 # II.B.1. General Targets.
393 #
394
395 MAKE = make CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
396 LIBS="$(LIBS)" MAIN="$(MAIN)" LINK_AIM1="$(LINK_AIM1)" \
397 TARGET="$(TARGET)"
398
399 install :
400 $(MAKE) $(MAIN) $(LINK_AIM1) basetools
401
402 main : FORCE
403 @ $(MAKE) $(MAIN)
404
405 basetools : tools bin tools/makefile
406 @ $(MAKE) $(TOOLS)
407
408 # release operates from sccs so it won't work elsewhere.
409
410 release : install $(WAVES) $(MAN) $(SCRIPTS) $(LINK_SCRIPTS) $(DOCS) $(MATLAB)
411
412 auxtools : saitools bin saitools/makefile xaim xaim/makefile waves
413 @ $(MAKE) $(SAITOOLS) $(XAIM) NWAVES
414
415 sources : $(DIRS) $(MAKEFILES) $(SRC_AIM) $(SRC_TOOLS) $(WAVES) $(MAN) $(SCRIPTS) $(DOCS) $(MATLAB)
416
417 demo : $(WAVES)
418
419 links : $(LINK_AIM1)
420 alllinks : $(LINK_AIM2)
421
422 FORCE:
423
424
425 #
426 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
427 # II.B.2. Link and Build Libraries and Targets
428 #
429 # Link libraries into main programs.
430
431 INCLUDES = -Istitch -Iglib -Ifilter -Imodel -Iwdf
432
433 $(MAIN) : $(LIBS) $$@.c
434 $(CC) $(CFLAGS) $(INCLUDES) -o $@ $@.c $(LIBS) $(LDFLAGS)
435
436
437 #
438 # Build libraries.
439
440 $(LIBS) : $(DIRS) $(MAKEFILES) $(SRC_AIM) FORCE
441 @ cd $(@D) ; $(MAKE) $(@F)
442
443 #
444 # Build basetools.
445
446 W_UTILS = tools/strmatch.o tools/options.o tools/units.o tools/header.o
447 SP_UTILS = tools/sigproc.o
448 X_UTILS = tools/x11coord.o
449
450 $(WTOOLS) : $(SRC_TOOLS) tools/$$(@F).c
451 @ cd tools ; $(MAKE) $(@F)
452 $(CC) $(CFLAGS) -o $@ $(W_UTILS) tools/$(@F).o $(LDFLAGS)
453
454 $(SPTOOLS) : $(SRC_TOOLS)
455 @ cd tools ; $(MAKE) $(@F)
456 $(CC) $(CFLAGS) -o $@ $(W_UTILS) $(SP_UTILS) tools/$(@F).o $(LDFLAGS)
457
458 $(XTOOLS) :
459 @ cd tools ; $(MAKE) $(@F)
460 $(CC) $(CFLAGS) -o $@ $(X_UTILS) tools/$(@F).o $(LDFLAGS)
461
462
463 #
464 # Build auxillary tools.
465 #
466 # Build xaim.
467
468 $(XAIM) : $(SRC_XAIM)
469 @ cd xaim ; make $(@F) ; mv $(@F) ../bin
470
471
472 # Build saisummary.
473
474 $(SAITOOLS) : $(SRC_SAITOOLS)
475 @ cd saitools ; make $(@F) ; mv $(@F) ../bin
476
477
478 # Build waves
479
480 NWAVES :
481 @ cd scripts ; make-demo-waves ; mv irns* ../waves ; mv dr_f8_* ../waves
482
483
484 #
485 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
486 # II.B.3. Create Directories and Pull Sources
487 #
488 # Create directories
489
490 $(DIRS) :
491 @ mkdir $@
492
493 # Pull files from sccs: makefiles, sources, docs, etc..
494
495 $(MAKEFILES) $(SRC_AIM) $(SRC_TOOLS) $(SRC_XAIM) $(SRC_SAITOOLS) $(DOCS) $(MATLAB) $(MANWHATIS) :
496 @ echo "$@"
497 @ cd $(@D) ; sccs -p$(RELEASE)/$(@D) get -c$(DATE) $(@F); chmod u+rw $(@F)
498
499 # Scripts are a special case to be chmod'd.
500
501 $(SCRIPTS) :
502 @ echo "$@"
503 @ cd $(@D) ; sccs -p$(RELEASE)/scripts get -c$(DATE) $(@F) ; chmod 755 $(@F)
504
505 # Man pages are a special case needing a name change (for location in man1)
506
507 $(MANPAGES) :
508 @ cd $(@D) ; sccs -p$(RELEASE)/man get -p -c$(DATE) `echo $(@F) | sed -e 's/\.1/.amp/g'` > $(@F)
509
510 #
511 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
512 # II.B.4. Create AIM Links (genXXX)
513 #
514 # Create symbolic links to model entry points (eg. genXXX).
515
516 $(LINK_GEN1) $(LINK_GEN2) :
517 ln -s ../model/gen $@
518 bin/review :
519 ln -s ../model/review $@
520
521 $(LINK_SCRIPTS) :
522 ln -s ../scripts/$(@F) $@
523
524 #
525 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
526 # II.B.5. Make tar files for AIM_FILES and/or DOC_FILES
527 #
528
529 tar :
530 @ make $(TARFILE1)
531 $(TARFILE1) : $(AIM_FILES)
532 @ tar cvf - $(AIM_FILES) | compress > $(TARFILE1)
533
534 doc :
535 @ make $(TARFILE2)
536 $(TARFILE2) : $(DOC_FILES)
537 @ tar cvf - $(DOC_FILES) | compress > $(TARFILE2)
538
539 #
540 ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
541 # II.B.6. Maintenance Targets
542 #
543
544 # Remove object files, libraries, main programs, and links, leaving the source code.
545
546 clean :
547 rm -f */*.o */*.a $(MAIN) $(TOOLS) bin/gen* bin/review
548
549
550 # Create symbolic links in each sub-directory to SCCS directories in $(RELEASE).
551
552 sccslinks : $(DIRS) $(SCCSLINKS)
553 $(SCCSLINKS):
554 @ cd $(@D) ; ln -s $(RELEASE)/$(@D) SCCS
555 cleansccs:
556 rm -f $(SCCSLINKS)
557
558
559 # Copy demonstration stimuli.
560
561 $(WAVES) :
562 @ cp $(RELEASE)/$@ $(@D)
563
564
565 # Mail model to given address.
566
567 mail : $(TARFILE1)
568 @ uuencode $(TARFILE1) $(TARFILE1) | split -700 - AIM.
569 @ echo ; echo "mail $(ADDRESS)"
570 @ cat $(MAIL_README) | mail -s "AIM software: ReadMe" $(ADDRESS) ; echo " $(MAIL_README)"
571 @ cat $(MAIL_SCRIPT) | mail -s "AIM software: UnPack" $(ADDRESS) ; echo " $(MAIL_SCRIPT)"
572 @ for i in AIM.* ; do \
573 echo "start----" > tmp ; cat $$i >> tmp ; echo "----end" >> tmp ; \
574 mail -s "AIM software: $$i" $(ADDRESS) < tmp ; echo " $$i" ; \
575 done
576 @ rm tmp AIM.*
577
578 #
579 ###########################################################################
580 #
581 # II.C. Machines
582 #
583 # These targets are machine-specific defaults that set CFLAGS and
584 # LDFLAGS appropriately for various machines. The default machine is
585 # sun (see CFLAGS and LDFLAGS at top of makefile). The include
586 # directory (-I in CFLAGS) must contain X11/X.h and X11/Xlib.h. The
587 # lib directory (-L in LDFLAGS) must contain libX11.a.
588 #
589 # Eg:
590 # make sun makes the default target `install' with flags for sun.
591 # make TARGET=install sgi makes the target 'install' for an SGI machine.
592
593 TARGET = install
594
595 sun :
596 @ make CC=cc CFLAGS="-O -DX11 -I/usr/openwin/include" LDFLAGS="-L/usr/openwin/lib -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET)
597
598 sungcc :
599 @ make CC=gcc CFLAGS="-O2 -fwritable-strings -DX11 -I/usr/openwin/include" LDFLAGS="-L/usr/openwin/lib -lXmu -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET)
600
601 sgi :
602 @ make CC=cc CFLAGS="-O -DX11 -I/usr/include" LDFLAGS="-L/usr/lib -lX11 $(STUB) -lm" RANLIB=echo $(TARGET)
603
604 dec vax :
605 @ make CC=cc CFLAGS="-O -DX11 -I/usr/include" LDFLAGS="-L/usr/lib -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET)
606
607 hp :
608 @ make CC=cc CFLAGS="-O -DX11 -I/usr/include/X11R4" LDFLAGS="-L/usr/lib/X11R4 -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET)
609
610 linux :
611 @ make CC=gcc CFLAGS="-O -fwritable-strings -ansi -DLINUX -DX11 -I/usr/include" LDFLAGS="-L/usr/lib -lXmu -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET)
612
613
614 apucc :
615 @ make CC=cc CFLAGS="-O -DX11 -I/usr/local2/include" LDFLAGS="-L/usr/local2/lib -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET)
616
617 apugcc :
618 @ make CC=gcc CFLAGS="-O2 -fwritable-strings -DX11 -I/usr/local2/include" LDFLAGS="-L/usr/local2/lib -lXmu -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET)
619
620 make :
621 @ apugdb CC=gcc CFLAGS="-fwritable-strings -g -DX11 -I/usr/local2/include" LDFLAGS="-L/usr/local2/lib -lXmu -lX11 $(STUB) -lm -lg" RANLIB=ranlib $(TARGET)
622
623
624 # AIM without X11 displays.
625 # A noplot version for compilation on a machine without X11 windows.
626 # The defaults: CC=cc CFLAGS=-O LDFLAGS=-lm exclude Xlibs and -DX11,
627 # i.e. X11 is undefined so that ifdef's in gen.c omit the X11 code.
628 # The LIBS list excludes libglib.a, the MAIN list excludes model/review,
629 # the LINKS list excludes the link /bin/review, and the TOOLS list excludes
630 # the XTOOLS.
631 # Eg:
632 # make noplot gets default target `install'.
633 # make TARGET=basetools noplot gets target `basetools'.
634
635 noplot :
636 @ make CC=cc CFLAGS=-O LDFLAGS=-lm LIBS="$(MLIB) $(SLIB) $(FLIB) $(WLIB) $(OLIB)" MAIN=model/gen LINK_AIM1="$(LINK_GEN1)" TOOLS="$(WTOOLS) $(SPTOOLS)" $(TARGET)
637
638
639 ###########################################################################
640 ###########################################################################
641 #
642 # PART III: MAKE HELP
643 #
644 # Help target
645
646 help : FORCE
647 @ echo "Root makefile for AIM."
648 @ echo "Usage: 1. make [Args] [Targets] "
649 @ echo " 2. make [Args] [TARGET=Targets] [Machine] "
650 @ echo " 3. make [Args] [TARGET=Targets] noplot"
651 @ echo
652 @ echo "ARGS: Current value:"
653 @ echo "CC $(CC) C compiler."
654 @ echo "CFLAGS $(CFLAGS) Compiler flags."
655 @ echo "LDFLAGS $(LDFLAGS) Loader flags."
656 @ echo "STUB $(STUB) Additional libs to resolve names."
657 @ echo "MOUNT $(MOUNT) Mount for AIM sccs."
658 @ echo "RELEASE $(RELEASE) Source dir for AIM sources in sccs."
659 @ echo "DATE $(DATE) Sccs get by date [year/month/day]."
660 @ echo "TARFILE $(TARFILE1) $(TARFILE2) Filenames for tar files."
661 @ echo "ADDRESS $(ADDRESS) Address(es) for email."
662 @ echo "TARGET $(TARGET)
663 @ echo
664 @ echo "TARGETS: GENERAL (Default target is \`install'). "
665 @ echo "main Make main AIM executable, gen."
666 @ echo "install Make 'main' plus common links and basetools."
667 @ echo "basetools Make the basetool executables and put them in bin."
668 @ echo "auxtools Make the auxillary tools executables and put them in bin."
669 @ echo "links Install the most useful model links."
670 @ echo "alllinks Install all model links."
671 @ echo "tar Create compressed tar file of AIM file system."
672 @ echo "doc Create compressed tar file of AIM documentation. "
673 @ echo "noplot Install in X11-free environment: no graphics."
674 @ echo
675 @ echo "TARGETS: APU (For system maintenance at APU)"
676 @ echo "release Make 'install' with docs and demos from scratch (sccs)."
677 @ echo "sources Get sources from local sccs."
678 @ echo "clean Remove all objects, libraries, main programs, and links."
679 @ echo "sccslinks Create SCCS symbolic links to local sccs directories."
680 @ echo "cleansccs Remove SCCS symbolic links."
681 @ echo "demo Install demo stimuli files."
682 # @ echo "mail Email AIM file system to given address(es)."
683 @ echo
684 @ echo "MACHINE (Default machine is \`sun'). "
685 @ echo "sun SparcStation with cc and X11 in -I/usr/openwin/include"
686 @ echo "sungcc SparcStation with optimised gcc and X11 in -I/usr/openwin/include"
687 @ echo "sgi sgi Indy with cc and X11 in -I/usr/include/"
688 @ echo "hp hp with cc and X11 in -I/usr/include/X11R4"
689 @ echo "dec vax Dec/Vax Station with cc and X11 in -I/usr/include/"
690 @ echo "apucc SparcStation at APU with cc and X11 in -I/usr/local2/include/"
691 @ echo "apugcc SparcStation at APU with optimised gcc and X11 in -I/usr/local2/include/"
692 @ echo "linux PC with gcc and X11 in -I/usr/include/"
693 @ echo
694 ###########################################################################
695