Revision 1322

trunk/examples/GNUmakefile (revision 1322)
1
DEBUG_OPTION=
2
ifdef DEBUG
3
DEBUG_OPTION=-g
1
ADMB_HOME=$(shell cd .. && pwd)/
2

  
3
ifdef OPTIONS
4
OPTIONS:= $(OPTIONS)
4 5
endif
5

  
6
ifdef DEBUG_OPTION
7
OPTIONS:= $(OPTIONS) -g
8
endif
6 9
ifdef FAST_OPTION
7
FAST_OPTION=-f
10
OPTIONS:= $(OPTIONS) -f
8 11
endif
9

  
10 12
ifdef PROG_VALGRIND
11 13
PROG=valgrind -v --leak-check=full --show-reachable=no --track-origins=yes
12 14
else
13 15
PROG=time
14 16
endif
15 17

  
16

  
17 18
default: simple
18 19

  
19 20
ifdef PROG_VALGRIND
......
22 23
all: admb admb-re
23 24
endif
24 25

  
25
admb: \
26
buscycle\
27
catage \
28
chem-eng \
29
forest \
30
finance \
31
pella-t \
32
robreg \
33
truncreg \
34
simple \
35
vol
26
admb:\
27
 buscycle\
28
 catage\
29
 chem-eng\
30
 forest\
31
 finance\
32
 pella-t\
33
 robreg\
34
 truncreg\
35
 simple\
36
 vol
36 37

  
37 38
buscycle: ham4 ham5
38 39
ham4:
39
	cd admb/buscycle;rm -f @.par @.std;admb $(FAST_OPTION) $(DEBUG_OPTION) $@;$(PROG) ./$@ -version;$(PROG) ./$@
40
	pushd admb/buscycle && $(ADMB_HOME)admb$(OPTIONS) $@ && $(PROG) ./$@ -version && $(PROG) ./$@
40 41

  
41 42
ham5:
42
	cd admb/buscycle;rm -f @.par @.std;admb $(FAST_OPTION) $(DEBUG_OPTION) $@;$(PROG) ./$@
43
	pushd admb/buscycle && $(ADMB_HOME)admb$(OPTIONS) $@ && $(PROG) ./$@
43 44

  
44 45
catage:
45
	cd admb/$@;rm -f @.par @.std;admb $(FAST_OPTION) $(DEBUG_OPTION) $@;$(PROG) ./$@
46
	pushd admb/$@ && $(ADMB_HOME)admb$(OPTIONS) $@ && $(PROG) ./$@
46 47

  
47 48
chem-eng:
48
	cd admb/$@;rm -f @.par @.std;admb $(FAST_OPTION) $(DEBUG_OPTION) $@;$(PROG) ./$@
49
	pushd admb/$@ && $(ADMB_HOME)admb$(OPTIONS) $@ && $(PROG) ./$@
49 50

  
50 51
finance:
51
	cd admb/$@;rm -f @.par @.std;admb $(FAST_OPTION) $(DEBUG_OPTION) $@;$(PROG) ./$@
52
	pushd admb/$@ && $(ADMB_HOME)admb$(OPTIONS) $@ && $(PROG) ./$@
52 53

  
53 54
forest:
54
	-cd admb/$@;rm -f @.par @.std;admb $(FAST_OPTION) $(DEBUG_OPTION) $@;$(PROG) ./$@
55
	-pushd admb/$@ && $(ADMB_HOME)admb$(OPTIONS) $@ && $(PROG) ./$@
55 56

  
56 57
pella-t:
57
	cd admb/$@;rm -f @.par @.std;admb $(FAST_OPTION) $(DEBUG_OPTION) $@;$(PROG) ./$@
58
	pushd admb/$@ && $(ADMB_HOME)admb$(OPTIONS) $@ && $(PROG) ./$@
58 59

  
59 60
robreg: vonb vonbr
60 61
vonb:
61
	cd admb/robreg;rm -f @.par @.std;admb $(FAST_OPTION) $(DEBUG_OPTION) $@;$(PROG) ./$@
62
	pushd admb/robreg && $(ADMB_HOME)admb$(OPTIONS) $@ && $(PROG) ./$@
62 63

  
63 64
vonbr:
64
	cd admb/robreg;rm -f @.par @.std;admb $(FAST_OPTION) $(DEBUG_OPTION) $@;$(PROG) ./$@
65
	pushd admb/robreg && $(ADMB_HOME)admb$(OPTIONS) $@ && $(PROG) ./$@
65 66

  
66 67
simple:
67
	cd admb/$@;rm -f @.par @.std;admb $(FAST_OPTION) $(DEBUG_OPTION) $@;$(PROG) ./$@
68
	pushd admb/$@ && $(ADMB_HOME)admb$(OPTIONS) $@ && $(PROG) ./$@
68 69

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff