tomwalters@0: ########################################################################### tomwalters@0: # tomwalters@0: # ROOT MAKEFILE FOR AIM M. Allerhand, (MRC-APU) 7/7/93 tomwalters@0: # C. Giguere, 24/3/94 tomwalters@0: # A. J. Datta, (MRC-APU)31/8/95 tomwalters@0: # R. Patterson (MRC-APU)09/4/97 tomwalters@0: # tomwalters@0: ########################################################################### tomwalters@0: ########################################################################### tomwalters@0: # tomwalters@0: # INTRODUCTION AND TABLE OF CONTENTS tomwalters@0: # tomwalters@0: # This is the Root makefile for the AIM software package which tomwalters@0: # consists of the AIM program itself, signal processing tools, tomwalters@0: # documentation, demonstrations and a Matlab interface. Part I tomwalters@0: # describes the file system, Part II the makefile itself and tomwalters@0: # Part III the make help option. tomwalters@0: # tomwalters@0: # tomwalters@0: # PART I: THE AIM FILE SYSTEM tomwalters@0: # tomwalters@0: # The file system for AIM itself is organised into five directories, tomwalters@0: # $(DIRS): filter, glib, model, stitch, and wdf. The root makefile tomwalters@0: # calls a nested makefile in each of the five directories to build tomwalters@0: # libraries, $(LIBS). These are then linked to form main programs, tomwalters@0: # $(MAIN). The signal processing tools are divided into basetools (in tomwalters@0: # directory tools) and auxtools (in directories xaim and saitools). tomwalters@0: # There are two directories for documentation (man and docs), one for tomwalters@0: # demonstrations scripts (scripts) and one for digitised sounds tomwalters@0: # (waves). tomwalters@0: # tomwalters@0: # I.A. Directories and Directory Links tomwalters@0: # tomwalters@0: # I.B. AIM_FILES: For AIM Executables, Basetools and Auxtools. tomwalters@0: # I.B.1. Makefiles tomwalters@0: # I.B.2. AIM Sources: SRC_AIM tomwalters@0: # I.B.3. Basic Tools: basetools tomwalters@0: # I.B.4. Auxillary Tools: auxtools tomwalters@0: # I.B.5. Libraries: tomwalters@0: # I.B.6. Executables: tomwalters@0: # I.B.7. Links to Executables: tomwalters@0: # tomwalters@0: # I.C. DOC_FILES: For Documentation, Man, Demonstrations and Matlab. tomwalters@0: # I.C.1. Manual Entries: man/man1 tomwalters@0: # I.C.2. Demonstration Scripts: scripts tomwalters@0: # I.C.3. Documentation docs tomwalters@0: # I.C.4. Waves waves tomwalters@0: # I.C.5. Matlab Interface matlab tomwalters@0: # tomwalters@0: # tomwalters@0: # PART II: THE ROOT MAKEFILE ITSELF tomwalters@0: # tomwalters@0: # II.A. Arguements and Flags tomwalters@0: # tomwalters@0: # II.B. Targets tomwalters@0: # II.B.1. General Targets tomwalters@0: # II.B.2. Link and Build Libraries and Targets tomwalters@0: # II.B.3. Create Directories and Pull Sources tomwalters@0: # II.B.4. Create AIM Links (genXXX) tomwalters@0: # II.B.5. Make tar files tomwalters@0: # II.B.6. Maintenance Targets tomwalters@0: # tomwalters@0: # II.C. Machines tomwalters@0: # tomwalters@0: # tomwalters@0: # PART III: MAKE HELP tomwalters@0: # tomwalters@0: # III.A. ARGS tomwalters@0: # III.B. TARGETS tomwalters@0: # III.C. MACHINES tomwalters@0: # tomwalters@0: tomwalters@0: ########################################################################### tomwalters@0: ########################################################################### tomwalters@0: # tomwalters@0: # PART I: THE AIM FILE SYSTEM tomwalters@0: # tomwalters@0: # The signal processing tools are divided into basetools (in tomwalters@0: # directory tools) and auxtools (in directories xaim and saitools). tomwalters@0: # There are two directories for documentation (man and docs), one for tomwalters@0: # demonstrations scripts (scripts) and one for digitised sounds tomwalters@0: # (waves). tomwalters@0: # tomwalters@0: ########################################################################### tomwalters@0: # tomwalters@0: # I.A. Directories and SCCS Links tomwalters@0: # tomwalters@0: tomwalters@0: DIRS = model glib stitch filter \ tomwalters@0: wdf tools xaim bin \ tomwalters@0: waves man man/man1 scripts \ tomwalters@0: docs saitools matlab tomwalters@0: tomwalters@0: SCCSLINKS = model/SCCS glib/SCCS stitch/SCCS filter/SCCS \ tomwalters@0: wdf/SCCS tools/SCCS xaim/SCCS \ tomwalters@0: man/SCCS scripts/SCCS docs/SCCS saitools/SCCS \ tomwalters@0: matlab/SCCS tomwalters@0: tomwalters@0: tomwalters@0: ########################################################################### tomwalters@0: # tomwalters@0: # I.B. AIM_FILES: For AIM Executables, Basetools and Auxtools. tomwalters@0: # tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # I.B.1. Makefiles tomwalters@0: # tomwalters@0: # The root makefile calls a nested makefile in each of the five AIM tomwalters@0: # directories to build libraries, $(LIBS). These are then linked to tomwalters@0: # form main programs, $(MAIN). tomwalters@0: tomwalters@0: MAKEFILES = model/makefile glib/makefile stitch/makefile filter/makefile \ tomwalters@0: wdf/makefile tools/makefile xaim/makefile saitools/makefile tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # I.B.2. AIM Sources: SRC_AIM tomwalters@0: # tomwalters@0: # The file system for AIM itself is organised into five directories, tomwalters@0: # $(DIRS): filter, glib, model, stitch, and wdf. tomwalters@0: tomwalters@0: SRC_AIM = glib/null.c glib/ps.c glib/grey.c glib/options.c \ tomwalters@0: glib/windows.h glib/axes.h glib/grey.h glib/options.h \ tomwalters@0: glib/X.c \ tomwalters@0: model/model.c model/bank.c model/corti.c model/image.c \ tomwalters@0: model/model.h model/bank.h model/corti.h model/image.h \ tomwalters@0: model/units.c model/defaults.c model/integrate.c model/spiral.c \ tomwalters@0: model/units.h model/defaults.h model/integrate.h model/spiral.h \ tomwalters@0: model/calc.h model/atan.c model/interp.c model/faster.c \ tomwalters@0: model/new.c model/table.c model/gen.c model/review.c \ tomwalters@0: model/version.c \ tomwalters@0: filter/formulae.c filter/phase.c filter/gamma_tone.c \ tomwalters@0: filter/formulae.h filter/phase.h filter/gamma_tone.h \ tomwalters@0: filter/scales.c filter/all.c filter/generic.c filter/imb.c \ tomwalters@0: filter/scales.h filter/recurse.c filter/recurse.h \ tomwalters@0: wdf/upsample.c wdf/fir.c wdf/ear.c wdf/wdf_ear.c \ tomwalters@0: wdf/upsample.h wdf/fir.h wdf/ear.h wdf/wdf_ear.h \ tomwalters@0: wdf/formulae_tl.c wdf/scales_tl.c wdf/bank_tl.c wdf/wdf_tl.c \ tomwalters@0: wdf/formulae_tl.h wdf/scales_tl.h wdf/bank_tl.h wdf/wdf_tl.h \ tomwalters@0: wdf/meddis.c wdf/calc_tl.h wdf/meddis.h \ tomwalters@0: stitch/buffer.c stitch/io.c stitch/draw.c stitch/funcs.c \ tomwalters@0: stitch/buffer.h stitch/io.h stitch/draw.h stitch/funcs.h \ tomwalters@0: stitch/pullable.c stitch/stitch.c stitch/fill.c stitch/srcio.c \ tomwalters@0: stitch/pullable.h stitch/stitch.h stitch/fill.h stitch/srcio.h \ tomwalters@0: stitch/fillable.c stitch/source.c stitch/wrap.c stitch/stypes.c \ tomwalters@0: stitch/fillable.h stitch/source.h stitch/wrap.h stitch/stypes.h \ tomwalters@0: stitch/ops.c stitch/ops.h tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # I.B.3. Basic Tools: basetools tomwalters@0: # tomwalters@0: tomwalters@0: SRC_TOOLS = tools/options.h tools/units.h tools/strmatch.h tools/header.h \ tomwalters@0: tools/sigproc.h tools/x11coord.h \ tomwalters@0: tools/acf.c tools/acgram.c tools/header.c tools/atob.c \ tomwalters@0: tools/audim.c tools/btoa.c tools/bufwave.c tools/bufframe.c \ tomwalters@0: tools/chi.c tools/conv.c tools/convert.c tools/cosine.c \ tomwalters@0: tools/edframe.c \ tomwalters@0: tools/edwave.c tools/fbank.c tools/fft.c tools/filt1.c \ tomwalters@0: tools/freqs.c tools/ftgram.c tools/ftoa.c tools/ftos.c \ tomwalters@0: tools/gate.c tools/gauss.c tools/hdr.c tools/integframe.c \ tomwalters@0: tools/loudness.c tools/merge.c tools/naptosai.c tools/noise.c \ tomwalters@0: tools/op.c tools/options.c tools/pitch_strength.c tools/ptrain.c \ tomwalters@0: tools/racf.c tools/ramp.c tools/saitonap.c tools/scale.c \ tomwalters@0: tools/sigproc.c tools/smooth.c tools/sp_weights.c tools/stats.c \ tomwalters@0: tools/step.c tools/stof.c tools/strmatch.c tools/swab.c \ tomwalters@0: tools/tone.c tools/units.c tools/x11coord.c tools/x11fonts.c \ tomwalters@0: tools/x11gram.c tools/x11play.c tools/x11plot.c tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # I.B.4. Auxillary Tools: auxtools tomwalters@0: # tomwalters@0: tomwalters@0: SRC_XAIM = xaim/synthirn.c xaim/synthdramp.c xaim/buttons.c \ tomwalters@0: xaim/cartoon.c xaim/graphics.c xaim/initialise.c \ tomwalters@0: xaim/stipple_a xaim/switch_axes.c xaim/switch_buttons.c \ tomwalters@0: xaim/switch_control.c xaim/xreview.bitmap xaim/xreview.c \ tomwalters@0: xaim/xreview.h xaim/disclaimer.text xaim/releasenotes.text tomwalters@0: tomwalters@0: SRC_SAITOOLS = saitools/changeheader.c saitools/findintervals_nap.c \ tomwalters@0: saitools/findpeaks.c saitools/header.c saitools/inout.c \ tomwalters@0: saitools/napgraph.c saitools/napheader.c saitools/removepeaks.c \ tomwalters@0: saitools/saicut.c saitools/saigraph.c saitools/saiinfo.c \ tomwalters@0: saitools/sairotate.c saitools/saisummary.c saitools/tip.h \ tomwalters@0: saitools/trigger.c saitools/findintervals_sai.c \ tomwalters@0: saitools/matrix.c tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # I.B.5. Libraries: tomwalters@0: # tomwalters@0: tomwalters@0: MLIB = model/libmodel.a tomwalters@0: GLIB = glib/libglib.a tomwalters@0: SLIB = stitch/libstitch.a tomwalters@0: FLIB = filter/libfilter.a tomwalters@0: WLIB = wdf/libwdf.a tomwalters@0: OLIB = glib/libopts.a tomwalters@0: LIBS = $(MLIB) $(GLIB) $(SLIB) $(FLIB) $(WLIB) $(OLIB) tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # I.B.6. Executables: tomwalters@0: # tomwalters@0: tomwalters@0: MAIN = model/gen model/review tomwalters@0: XAIM = bin/synthirn bin/synthdramp bin/xreview tomwalters@0: SAITOOLS = bin/saisummary bin/sairotate bin/saiinfo bin/saigraph \ tomwalters@0: bin/saicut bin/napgraph tomwalters@0: tomwalters@0: WTOOLS = bin/hdr bin/atob bin/btoa bin/bufwave \ tomwalters@0: bin/bufframe \ tomwalters@0: bin/chi bin/convert bin/edframe bin/edwave \ tomwalters@0: bin/fbank bin/filt1 bin/ftoa bin/ftos \ tomwalters@0: bin/gate \ tomwalters@0: bin/integframe bin/loudness bin/merge bin/naptosai \ tomwalters@0: bin/noise bin/op bin/pitch_strength bin/ptrain \ tomwalters@0: bin/ramp bin/saitonap bin/scale bin/sp_weights \ tomwalters@0: bin/stats bin/step bin/stof bin/swab \ tomwalters@0: bin/tone tomwalters@0: tomwalters@0: SPTOOLS = bin/acf bin/acgram bin/audim bin/conv \ tomwalters@0: bin/cosine bin/fft bin/ftgram bin/gauss \ tomwalters@0: bin/racf bin/smooth tomwalters@0: tomwalters@0: XTOOLS = bin/x11fonts bin/x11gram bin/x11play bin/x11plot tomwalters@0: tomwalters@0: TOOLS = $(WTOOLS) $(SPTOOLS) $(XTOOLS) tomwalters@0: tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # I.B.7. Links to Executables: tomwalters@0: # tomwalters@0: tomwalters@0: LINK_GEN1 = bin/genwav bin/genstp \ tomwalters@0: bin/genbmm bin/gennap bin/gensgm \ tomwalters@0: bin/genasa bin/genepn bin/gensep bin/gensai \ tomwalters@0: bin/gencgm bin/genspl bin/gensas bin/gen tomwalters@0: tomwalters@0: LINK_GEN2 = bin/gentst bin/genfcr bin/genfcp bin/genfbm \ tomwalters@0: bin/genfbc bin/genfbu bin/genfbs bin/genfbl \ tomwalters@0: bin/genfba bin/genfbh bin/genfbi bin/genfbd \ tomwalters@0: bin/genfeu bin/genfes bin/genfel bin/genfet \ tomwalters@0: bin/genfeh bin/genfei bin/genfed bin/gensie \ tomwalters@0: bin/genfbr bin/genfbt bin/genfec bin/genfea \ tomwalters@0: bin/gensse tomwalters@0: tomwalters@0: LINK_SCRIPTS = bin/manaim bin/aimdemo_gtf_all bin/aimdemo_gtf_2dat \ tomwalters@0: bin/aimdemo_gtf_spectra bin/aimdemo_gtf_sai bin/aimdemo_tlf_all \ tomwalters@0: bin/aimdemo_tlf_lowhigh bin/aimdemo_tlf_med bin/aimdemo_tlf_std \ tomwalters@0: bin/aimdemo_tlf_spectra bin/aimdemo_hat bin/aimdemo_hat_br \ tomwalters@0: bin/scale_wav bin/equate_energies bin/StrobeCriterionDisplay \ tomwalters@0: bin/aimStrobeCriterion bin/dp_ms bin/dp_pc bin/aimR8demo tomwalters@0: tomwalters@0: LINK_AIM1 = $(LINK_GEN1) $(LINK_SCRIPTS) bin/review tomwalters@0: LINK_AIM2 = $(LINK_GEN1) $(LINK_GEN2) bin/review tomwalters@0: tomwalters@0: tomwalters@0: # tomwalters@0: ####################################################################### tomwalters@0: # tomwalters@0: # I.C. DOC_FILES: For Documentation, Man, Demonstrations and Matlab. tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # I.C.1. Manual Entries: man/man1 tomwalters@0: # tomwalters@0: tomwalters@0: MANWHATIS = man/whatis tomwalters@0: MANPAGES = man/man1/manaim.1 \ tomwalters@0: man/man1/genbmm.1 man/man1/gennap.1 man/man1/gensai.1 \ tomwalters@0: man/man1/genwav.1 man/man1/gensgm.1 man/man1/genepn.1 \ tomwalters@0: man/man1/genasa.1 man/man1/xreview.1 man/man1/genspl.1 \ tomwalters@0: man/man1/acf.1 man/man1/acgram.1 man/man1/atob.1 man/man1/gencgm.1 \ tomwalters@0: man/man1/audim.1 man/man1/btoa.1 man/man1/bufwave.1 \ tomwalters@0: man/man1/chi.1 man/man1/conv.1 man/man1/convert.1 \ tomwalters@0: man/man1/edframe.1 man/man1/bufframe.1 man/man1/cosine.1 \ tomwalters@0: man/man1/edwave.1 man/man1/fbank.1 man/man1/fft.1 man/man1/filt1.1 \ tomwalters@0: man/man1/ftgram.1 man/man1/ftoa.1 man/man1/ftos.1 man/man1/op.1 \ tomwalters@0: man/man1/gate.1 man/man1/gauss.1 man/man1/hdr.1 man/man1/racf.1 \ tomwalters@0: man/man1/integframe.1 man/man1/loudness.1 \ tomwalters@0: man/man1/merge.1 man/man1/naptosai.1 man/man1/noise.1 \ tomwalters@0: man/man1/options.1 man/man1/pitch_strength.1 man/man1/ptrain.1 \ tomwalters@0: man/man1/ramp.1 man/man1/saitonap.1 man/man1/scale.1 \ tomwalters@0: man/man1/smooth.1 man/man1/sp_weights.1 man/man1/stats.1 \ tomwalters@0: man/man1/step.1 man/man1/stof.1 man/man1/swab.1 \ tomwalters@0: man/man1/tone.1 man/man1/x11fonts.1 \ tomwalters@0: man/man1/x11gram.1 man/man1/x11play.1 man/man1/x11plot.1 tomwalters@0: MAN = $(MANPAGES) $(MANWHATIS) tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # I.C.2. Demonstration Scripts: scripts tomwalters@0: tomwalters@0: SCRIPTS = scripts/manaim scripts/unpack \ tomwalters@0: scripts/aimdemo_gtf_all scripts/aimdemo_gtf_2dat \ tomwalters@0: scripts/aimdemo_gtf_spectra scripts/aimdemo_gtf_sai \ tomwalters@0: scripts/aimdemo_tlf_all scripts/aimdemo_tlf_std \ tomwalters@0: scripts/aimdemo_tlf_lowhigh scripts/aimdemo_tlf_med \ tomwalters@0: scripts/aimdemo_tlf_spectra scripts/aimdemo_hat \ tomwalters@0: scripts/aimdemo_hat_br scripts/StrobeCriterionDisplay \ tomwalters@0: scripts/scale_wav scripts/equate_energies \ tomwalters@0: scripts/aimStrobeCriterion scripts/make-demo-waves \ tomwalters@0: scripts/dp_ms scripts/dp_pc scripts/aimR8demo tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # I.C.3. Documentation files: docs tomwalters@0: tomwalters@0: DOCS = docs/ReadMe.First docs/ReadMe docs/aimBibliography \ tomwalters@0: docs/aimDocList docs/aimDocumentation docs/aimFileFormats \ tomwalters@0: docs/aimInstructions docs/aimMailList docs/aimPaths \ tomwalters@0: docs/aimSilentOptions docs/ftp.doc docs/PAG95.doc \ tomwalters@0: docs/aimStrobeCriterion docs/makefile docs/aimDemonstrations \ tomwalters@0: docs/aimMeddisHewitt tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # I.C.4. Demonstration Waves waves tomwalters@0: tomwalters@0: WAVES = waves/leo waves/cegc waves/hat bin/hat \ tomwalters@0: waves/leo_br waves/cegc_br waves/hat_br bin/hat_br \ tomwalters@0: waves/dr_f8_t16_d waves/dr_f8_t4_d waves/dr_f8_t1_d \ tomwalters@0: waves/dr_f8_t16_r waves/dr_f8_t4_r waves/dr_f8_t1_r \ tomwalters@0: waves/irns_16_1_1 waves/irns_16_1_4 waves/irns_16_1_16 tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # I.C.5. Matlab Interface matlab tomwalters@0: tomwalters@0: MATLAB = matlab/mktstr.m matlab/dB.m matlab/showSummarySAI.m matlab/amd_sumsai.m \ tomwalters@0: matlab/amd_sai.m matlab/amd_bmm_nap.m matlab/amd_waves.m matlab/envelope.m \ tomwalters@0: matlab/squaretone.m matlab/damp_env.m matlab/damp_sin.m matlab/taper.m matlab/showBMM.m \ tomwalters@0: matlab/ssave.m matlab/sload.m matlab/showNAP.m matlab/showSAI.m matlab/repeat_cycle.m \ tomwalters@0: matlab/redrawAIM.m matlab/set_input_wave_GUI.m matlab/setFrameChooser.m \ tomwalters@0: matlab/searchAimHeaderInfo.m matlab/save_genrc.m matlab/save_as_genrc.m matlab/sappend.m \ tomwalters@0: matlab/revert_genrc.m matlab/readAIMHeader.m matlab/showAverageSAI.m matlab/puretone.m \ tomwalters@0: matlab/hilitChan.m matlab/getAimHeaderInfo.m matlab/outputChanData.m matlab/erb.m \ tomwalters@0: matlab/getAimResInfo.m matlab/openOptionGUI.m matlab/get_erb_param.m matlab/illuminate.m \ tomwalters@0: matlab/popupShowFig.m matlab/openOptionGUI_page.m matlab/fchan_info.m \ tomwalters@0: matlab/exec_save_genrc.m matlab/XTickShowSAINAP.m matlab/add_sound.m \ tomwalters@0: matlab/FofErbScale.m matlab/ErbScale.m tomwalters@0: tomwalters@0: # tomwalters@0: # all files for archiving tomwalters@0: tomwalters@0: FILES_IN_SCCS = $(MAKEFILES) $(SRC_AIM) $(SRC_TOOLS) $(SRC_XAIM) $(SRC_SAITOOLS) tomwalters@0: FILES_NOT_IN_SCCS = makefile tomwalters@0: tomwalters@0: AIM_FILES = $(FILES_IN_SCCS) $(FILES_NOT_IN_SCCS) tomwalters@0: DOC_FILES = $(DOCS) $(MAN) $(SCRIPTS) $(MATLAB) $(WAVES) tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: ########################################################################### tomwalters@0: ########################################################################### tomwalters@0: # tomwalters@0: # PART II: THE ROOT MAKEFILE ITSELF tomwalters@0: # tomwalters@0: # tomwalters@0: tomwalters@0: ########################################################################### tomwalters@0: # tomwalters@0: # II.A. Arguments and Flags tomwalters@0: # tomwalters@0: # The form of c compiler is passed by the flag CC. tomwalters@0: # Locations of X11 libraries and includes on various machines are tomwalters@0: # passed via the CFLAGS and LDFLAGS. tomwalters@0: # tomwalters@0: tomwalters@0: CC = cc tomwalters@0: CFLAGS = -O -DX11 -I/usr/openwin/include tomwalters@0: LDFLAGS = -L/usr/openwin/lib -lXmu -lX11 -lm tomwalters@0: tomwalters@0: TARFILE1 = aimR8.tar.Z tomwalters@0: TARFILE2 = aimR8docs.tar.Z tomwalters@0: tomwalters@0: # Defaults for APU system. tomwalters@0: MOUNT = /net/sound1 tomwalters@0: MASTER = $(MOUNT)/aim/master tomwalters@0: RELEASE = $(MASTER)/release tomwalters@0: MAIL_SCRIPT = scripts/unpack tomwalters@0: tomwalters@0: tomwalters@0: ################################################################################# tomwalters@0: # tomwalters@0: # II.B. Targets tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # II.B.1. General Targets. tomwalters@0: # tomwalters@0: tomwalters@0: MAKE = make CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ tomwalters@0: LIBS="$(LIBS)" MAIN="$(MAIN)" LINK_AIM1="$(LINK_AIM1)" \ tomwalters@0: TARGET="$(TARGET)" tomwalters@0: tomwalters@0: install : tomwalters@0: $(MAKE) $(MAIN) $(LINK_AIM1) basetools tomwalters@0: tomwalters@0: main : FORCE tomwalters@0: @ $(MAKE) $(MAIN) tomwalters@0: tomwalters@0: basetools : tools bin tools/makefile tomwalters@0: @ $(MAKE) $(TOOLS) tomwalters@0: tomwalters@0: # release operates from sccs so it won't work elsewhere. tomwalters@0: tomwalters@0: release : install $(WAVES) $(MAN) $(SCRIPTS) $(LINK_SCRIPTS) $(DOCS) $(MATLAB) tomwalters@0: tomwalters@0: auxtools : saitools bin saitools/makefile xaim xaim/makefile waves tomwalters@0: @ $(MAKE) $(SAITOOLS) $(XAIM) NWAVES tomwalters@0: tomwalters@0: sources : $(DIRS) $(MAKEFILES) $(SRC_AIM) $(SRC_TOOLS) $(WAVES) $(MAN) $(SCRIPTS) $(DOCS) $(MATLAB) tomwalters@0: tomwalters@0: demo : $(WAVES) tomwalters@0: tomwalters@0: links : $(LINK_AIM1) tomwalters@0: alllinks : $(LINK_AIM2) tomwalters@0: tomwalters@0: FORCE: tomwalters@0: tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # II.B.2. Link and Build Libraries and Targets tomwalters@0: # tomwalters@0: # Link libraries into main programs. tomwalters@0: tomwalters@0: INCLUDES = -Istitch -Iglib -Ifilter -Imodel -Iwdf tomwalters@0: tomwalters@0: $(MAIN) : $(LIBS) $$@.c tomwalters@0: $(CC) $(CFLAGS) $(INCLUDES) -o $@ $@.c $(LIBS) $(LDFLAGS) tomwalters@0: tomwalters@0: tomwalters@0: # tomwalters@0: # Build libraries. tomwalters@0: tomwalters@0: $(LIBS) : $(DIRS) $(MAKEFILES) $(SRC_AIM) FORCE tomwalters@0: @ cd $(@D) ; $(MAKE) $(@F) tomwalters@0: tomwalters@0: # tomwalters@0: # Build basetools. tomwalters@0: tomwalters@0: W_UTILS = tools/strmatch.o tools/options.o tools/units.o tools/header.o tomwalters@0: SP_UTILS = tools/sigproc.o tomwalters@0: X_UTILS = tools/x11coord.o tomwalters@0: tomwalters@0: $(WTOOLS) : $(SRC_TOOLS) tools/$$(@F).c tomwalters@0: @ cd tools ; $(MAKE) $(@F) tomwalters@0: $(CC) $(CFLAGS) -o $@ $(W_UTILS) tools/$(@F).o $(LDFLAGS) tomwalters@0: tomwalters@0: $(SPTOOLS) : $(SRC_TOOLS) tomwalters@0: @ cd tools ; $(MAKE) $(@F) tomwalters@0: $(CC) $(CFLAGS) -o $@ $(W_UTILS) $(SP_UTILS) tools/$(@F).o $(LDFLAGS) tomwalters@0: tomwalters@0: $(XTOOLS) : tomwalters@0: @ cd tools ; $(MAKE) $(@F) tomwalters@0: $(CC) $(CFLAGS) -o $@ $(X_UTILS) tools/$(@F).o $(LDFLAGS) tomwalters@0: tomwalters@0: tomwalters@0: # tomwalters@0: # Build auxillary tools. tomwalters@0: # tomwalters@0: # Build xaim. tomwalters@0: tomwalters@0: $(XAIM) : $(SRC_XAIM) tomwalters@0: @ cd xaim ; make $(@F) ; mv $(@F) ../bin tomwalters@0: tomwalters@0: tomwalters@0: # Build saisummary. tomwalters@0: tomwalters@0: $(SAITOOLS) : $(SRC_SAITOOLS) tomwalters@0: @ cd saitools ; make $(@F) ; mv $(@F) ../bin tomwalters@0: tomwalters@0: tomwalters@0: # Build waves tomwalters@0: tomwalters@0: NWAVES : tomwalters@0: @ cd scripts ; make-demo-waves ; mv irns* ../waves ; mv dr_f8_* ../waves tomwalters@0: tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # II.B.3. Create Directories and Pull Sources tomwalters@0: # tomwalters@0: # Create directories tomwalters@0: tomwalters@0: $(DIRS) : tomwalters@0: @ mkdir $@ tomwalters@0: tomwalters@0: # Pull files from sccs: makefiles, sources, docs, etc.. tomwalters@0: tomwalters@0: $(MAKEFILES) $(SRC_AIM) $(SRC_TOOLS) $(SRC_XAIM) $(SRC_SAITOOLS) $(DOCS) $(MATLAB) $(MANWHATIS) : tomwalters@0: @ echo "$@" tomwalters@0: @ cd $(@D) ; sccs -p$(RELEASE)/$(@D) get -c$(DATE) $(@F); chmod u+rw $(@F) tomwalters@0: tomwalters@0: # Scripts are a special case to be chmod'd. tomwalters@0: tomwalters@0: $(SCRIPTS) : tomwalters@0: @ echo "$@" tomwalters@0: @ cd $(@D) ; sccs -p$(RELEASE)/scripts get -c$(DATE) $(@F) ; chmod 755 $(@F) tomwalters@0: tomwalters@0: # Man pages are a special case needing a name change (for location in man1) tomwalters@0: tomwalters@0: $(MANPAGES) : tomwalters@0: @ cd $(@D) ; sccs -p$(RELEASE)/man get -p -c$(DATE) `echo $(@F) | sed -e 's/\.1/.amp/g'` > $(@F) tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # II.B.4. Create AIM Links (genXXX) tomwalters@0: # tomwalters@0: # Create symbolic links to model entry points (eg. genXXX). tomwalters@0: tomwalters@0: $(LINK_GEN1) $(LINK_GEN2) : tomwalters@0: ln -s ../model/gen $@ tomwalters@0: bin/review : tomwalters@0: ln -s ../model/review $@ tomwalters@0: tomwalters@0: $(LINK_SCRIPTS) : tomwalters@0: ln -s ../scripts/$(@F) $@ tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # II.B.5. Make tar files for AIM_FILES and/or DOC_FILES tomwalters@0: # tomwalters@0: tomwalters@0: tar : tomwalters@0: @ make $(TARFILE1) tomwalters@0: $(TARFILE1) : $(AIM_FILES) tomwalters@0: @ tar cvf - $(AIM_FILES) | compress > $(TARFILE1) tomwalters@0: tomwalters@0: doc : tomwalters@0: @ make $(TARFILE2) tomwalters@0: $(TARFILE2) : $(DOC_FILES) tomwalters@0: @ tar cvf - $(DOC_FILES) | compress > $(TARFILE2) tomwalters@0: tomwalters@0: # tomwalters@0: ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomwalters@0: # II.B.6. Maintenance Targets tomwalters@0: # tomwalters@0: tomwalters@0: # Remove object files, libraries, main programs, and links, leaving the source code. tomwalters@0: tomwalters@0: clean : tomwalters@0: rm -f */*.o */*.a $(MAIN) $(TOOLS) bin/gen* bin/review tomwalters@0: tomwalters@0: tomwalters@0: # Create symbolic links in each sub-directory to SCCS directories in $(RELEASE). tomwalters@0: tomwalters@0: sccslinks : $(DIRS) $(SCCSLINKS) tomwalters@0: $(SCCSLINKS): tomwalters@0: @ cd $(@D) ; ln -s $(RELEASE)/$(@D) SCCS tomwalters@0: cleansccs: tomwalters@0: rm -f $(SCCSLINKS) tomwalters@0: tomwalters@0: tomwalters@0: # Copy demonstration stimuli. tomwalters@0: tomwalters@0: $(WAVES) : tomwalters@0: @ cp $(RELEASE)/$@ $(@D) tomwalters@0: tomwalters@0: tomwalters@0: # Mail model to given address. tomwalters@0: tomwalters@0: mail : $(TARFILE1) tomwalters@0: @ uuencode $(TARFILE1) $(TARFILE1) | split -700 - AIM. tomwalters@0: @ echo ; echo "mail $(ADDRESS)" tomwalters@0: @ cat $(MAIL_README) | mail -s "AIM software: ReadMe" $(ADDRESS) ; echo " $(MAIL_README)" tomwalters@0: @ cat $(MAIL_SCRIPT) | mail -s "AIM software: UnPack" $(ADDRESS) ; echo " $(MAIL_SCRIPT)" tomwalters@0: @ for i in AIM.* ; do \ tomwalters@0: echo "start----" > tmp ; cat $$i >> tmp ; echo "----end" >> tmp ; \ tomwalters@0: mail -s "AIM software: $$i" $(ADDRESS) < tmp ; echo " $$i" ; \ tomwalters@0: done tomwalters@0: @ rm tmp AIM.* tomwalters@0: tomwalters@0: # tomwalters@0: ########################################################################### tomwalters@0: # tomwalters@0: # II.C. Machines tomwalters@0: # tomwalters@0: # These targets are machine-specific defaults that set CFLAGS and tomwalters@0: # LDFLAGS appropriately for various machines. The default machine is tomwalters@0: # sun (see CFLAGS and LDFLAGS at top of makefile). The include tomwalters@0: # directory (-I in CFLAGS) must contain X11/X.h and X11/Xlib.h. The tomwalters@0: # lib directory (-L in LDFLAGS) must contain libX11.a. tomwalters@0: # tomwalters@0: # Eg: tomwalters@0: # make sun makes the default target `install' with flags for sun. tomwalters@0: # make TARGET=install sgi makes the target 'install' for an SGI machine. tomwalters@0: tomwalters@0: TARGET = install tomwalters@0: tomwalters@0: sun : tomwalters@0: @ make CC=cc CFLAGS="-O -DX11 -I/usr/openwin/include" LDFLAGS="-L/usr/openwin/lib -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET) tomwalters@0: tomwalters@0: sungcc : tomwalters@0: @ make CC=gcc CFLAGS="-O2 -fwritable-strings -DX11 -I/usr/openwin/include" LDFLAGS="-L/usr/openwin/lib -lXmu -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET) tomwalters@0: tomwalters@0: sgi : tomwalters@0: @ make CC=cc CFLAGS="-O -DX11 -I/usr/include" LDFLAGS="-L/usr/lib -lX11 $(STUB) -lm" RANLIB=echo $(TARGET) tomwalters@0: tomwalters@0: dec vax : tomwalters@0: @ make CC=cc CFLAGS="-O -DX11 -I/usr/include" LDFLAGS="-L/usr/lib -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET) tomwalters@0: tomwalters@0: hp : tomwalters@0: @ make CC=cc CFLAGS="-O -DX11 -I/usr/include/X11R4" LDFLAGS="-L/usr/lib/X11R4 -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET) tomwalters@0: tomwalters@0: linux : tomwalters@0: @ make CC=gcc CFLAGS="-O -fwritable-strings -ansi -DLINUX -DX11 -I/usr/include" LDFLAGS="-L/usr/lib -lXmu -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET) tomwalters@0: tomwalters@0: tomwalters@0: apucc : tomwalters@0: @ make CC=cc CFLAGS="-O -DX11 -I/usr/local2/include" LDFLAGS="-L/usr/local2/lib -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET) tomwalters@0: tomwalters@0: apugcc : tomwalters@0: @ make CC=gcc CFLAGS="-O2 -fwritable-strings -DX11 -I/usr/local2/include" LDFLAGS="-L/usr/local2/lib -lXmu -lX11 $(STUB) -lm" RANLIB=ranlib $(TARGET) tomwalters@0: tomwalters@0: make : tomwalters@0: @ 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) tomwalters@0: tomwalters@0: tomwalters@0: # AIM without X11 displays. tomwalters@0: # A noplot version for compilation on a machine without X11 windows. tomwalters@0: # The defaults: CC=cc CFLAGS=-O LDFLAGS=-lm exclude Xlibs and -DX11, tomwalters@0: # i.e. X11 is undefined so that ifdef's in gen.c omit the X11 code. tomwalters@0: # The LIBS list excludes libglib.a, the MAIN list excludes model/review, tomwalters@0: # the LINKS list excludes the link /bin/review, and the TOOLS list excludes tomwalters@0: # the XTOOLS. tomwalters@0: # Eg: tomwalters@0: # make noplot gets default target `install'. tomwalters@0: # make TARGET=basetools noplot gets target `basetools'. tomwalters@0: tomwalters@0: noplot : tomwalters@0: @ make CC=cc CFLAGS=-O LDFLAGS=-lm LIBS="$(MLIB) $(SLIB) $(FLIB) $(WLIB) $(OLIB)" MAIN=model/gen LINK_AIM1="$(LINK_GEN1)" TOOLS="$(WTOOLS) $(SPTOOLS)" $(TARGET) tomwalters@0: tomwalters@0: tomwalters@0: ########################################################################### tomwalters@0: ########################################################################### tomwalters@0: # tomwalters@0: # PART III: MAKE HELP tomwalters@0: # tomwalters@0: # Help target tomwalters@0: tomwalters@0: help : FORCE tomwalters@0: @ echo "Root makefile for AIM." tomwalters@0: @ echo "Usage: 1. make [Args] [Targets] " tomwalters@0: @ echo " 2. make [Args] [TARGET=Targets] [Machine] " tomwalters@0: @ echo " 3. make [Args] [TARGET=Targets] noplot" tomwalters@0: @ echo tomwalters@0: @ echo "ARGS: Current value:" tomwalters@0: @ echo "CC $(CC) C compiler." tomwalters@0: @ echo "CFLAGS $(CFLAGS) Compiler flags." tomwalters@0: @ echo "LDFLAGS $(LDFLAGS) Loader flags." tomwalters@0: @ echo "STUB $(STUB) Additional libs to resolve names." tomwalters@0: @ echo "MOUNT $(MOUNT) Mount for AIM sccs." tomwalters@0: @ echo "RELEASE $(RELEASE) Source dir for AIM sources in sccs." tomwalters@0: @ echo "DATE $(DATE) Sccs get by date [year/month/day]." tomwalters@0: @ echo "TARFILE $(TARFILE1) $(TARFILE2) Filenames for tar files." tomwalters@0: @ echo "ADDRESS $(ADDRESS) Address(es) for email." tomwalters@0: @ echo "TARGET $(TARGET) tomwalters@0: @ echo tomwalters@0: @ echo "TARGETS: GENERAL (Default target is \`install'). " tomwalters@0: @ echo "main Make main AIM executable, gen." tomwalters@0: @ echo "install Make 'main' plus common links and basetools." tomwalters@0: @ echo "basetools Make the basetool executables and put them in bin." tomwalters@0: @ echo "auxtools Make the auxillary tools executables and put them in bin." tomwalters@0: @ echo "links Install the most useful model links." tomwalters@0: @ echo "alllinks Install all model links." tomwalters@0: @ echo "tar Create compressed tar file of AIM file system." tomwalters@0: @ echo "doc Create compressed tar file of AIM documentation. " tomwalters@0: @ echo "noplot Install in X11-free environment: no graphics." tomwalters@0: @ echo tomwalters@0: @ echo "TARGETS: APU (For system maintenance at APU)" tomwalters@0: @ echo "release Make 'install' with docs and demos from scratch (sccs)." tomwalters@0: @ echo "sources Get sources from local sccs." tomwalters@0: @ echo "clean Remove all objects, libraries, main programs, and links." tomwalters@0: @ echo "sccslinks Create SCCS symbolic links to local sccs directories." tomwalters@0: @ echo "cleansccs Remove SCCS symbolic links." tomwalters@0: @ echo "demo Install demo stimuli files." tomwalters@0: # @ echo "mail Email AIM file system to given address(es)." tomwalters@0: @ echo tomwalters@0: @ echo "MACHINE (Default machine is \`sun'). " tomwalters@0: @ echo "sun SparcStation with cc and X11 in -I/usr/openwin/include" tomwalters@0: @ echo "sungcc SparcStation with optimised gcc and X11 in -I/usr/openwin/include" tomwalters@0: @ echo "sgi sgi Indy with cc and X11 in -I/usr/include/" tomwalters@0: @ echo "hp hp with cc and X11 in -I/usr/include/X11R4" tomwalters@0: @ echo "dec vax Dec/Vax Station with cc and X11 in -I/usr/include/" tomwalters@0: @ echo "apucc SparcStation at APU with cc and X11 in -I/usr/local2/include/" tomwalters@0: @ echo "apugcc SparcStation at APU with optimised gcc and X11 in -I/usr/local2/include/" tomwalters@0: @ echo "linux PC with gcc and X11 in -I/usr/include/" tomwalters@0: @ echo tomwalters@0: ########################################################################### tomwalters@0: