1 | SHELL = /bin/sh |
---|
2 | INCLUDE = -Iinclude |
---|
3 | FF = gfortran |
---|
4 | TRANSPORT_OBJECTS = bin/transport.o \ |
---|
5 | bin/trm.o \ |
---|
6 | bin/trin.o \ |
---|
7 | bin/trsec.o \ |
---|
8 | bin/ranport.o |
---|
9 | |
---|
10 | BSHEET_OBJECTS = bin/bshcall.o \ |
---|
11 | bin/bshm.o |
---|
12 | |
---|
13 | TRANSLIB = lib/libtransport.a |
---|
14 | |
---|
15 | SOURCES = $(TRANSPORT_OBJECTS:.o=.f) bshcall.f bshm.f |
---|
16 | |
---|
17 | #all: FlavorStuff bin/trns.exe bin/bsheet.exe |
---|
18 | all: FlavorStuff bin/trns.exe |
---|
19 | |
---|
20 | FlavorStuff: |
---|
21 | if [ "x$(RestarT)" = "x" ]; then \ |
---|
22 | if [ x$(FLAVOR) != x ]; then \ |
---|
23 | if [ ! -d bin ]; then mkdir bin; fi; \ |
---|
24 | if [ ! -d lib ]; then mkdir lib; fi; \ |
---|
25 | fi; \ |
---|
26 | case x$(FLAVOR) in x) \ |
---|
27 | make -f Makefile FLAVOR=`$(UPS_DIR)/bin/ups flavor -2`; \ |
---|
28 | exit 1; \ |
---|
29 | ;; \ |
---|
30 | xSunOS*) \ |
---|
31 | make -f Makefile FLAVOR=$(FLAVOR) FFLAGS=" " LFLAGS="-z muldefs" RestarT=x; \ |
---|
32 | ;; \ |
---|
33 | xAIX*) \ |
---|
34 | make -f Makefile FLAVOR=$(FLAVOR) FFLAGS="-g -qextname" RestarT=x; \ |
---|
35 | ;; \ |
---|
36 | xIRIX*) \ |
---|
37 | make -f Makefile FLAVOR=$(FLAVOR) FFLAGS="-g -r8" RestarT=x; \ |
---|
38 | ;; \ |
---|
39 | xLinux*) \ |
---|
40 | make -f Makefile FLAVOR=$(FLAVOR) FFLAGS="-g -fno-globals" RestarT=x; \ |
---|
41 | ;; \ |
---|
42 | xMacos*) \ |
---|
43 | make -f Makefile FLAVOR=$(FLAVOR) FFLAGS="-g " RestarT=x; \ |
---|
44 | ;; \ |
---|
45 | *) \ |
---|
46 | make -f Makefile FLAVOR=$(FLAVOR) RestarT=x; \ |
---|
47 | ;; \ |
---|
48 | esac \ |
---|
49 | fi |
---|
50 | |
---|
51 | bin/trns.exe : bin/trcall.o $(TRANSPORT_OBJECTS) |
---|
52 | $(FF) -o $@ bin/trcall.o $(TRANSPORT_OBJECTS) |
---|
53 | |
---|
54 | bin/trcall.o: src/trcall.f |
---|
55 | $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/trcall.f |
---|
56 | |
---|
57 | bin/transport.o: src/transport.f |
---|
58 | $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/transport.f |
---|
59 | |
---|
60 | bin/trm.o: src/trm.f |
---|
61 | $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/trm.f |
---|
62 | |
---|
63 | bin/trin.o: src/trin.f |
---|
64 | $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/trin.f |
---|
65 | |
---|
66 | bin/trsec.o: src/trsec.f |
---|
67 | $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/trsec.f |
---|
68 | |
---|
69 | bin/ranport.o: src/ranport.f |
---|
70 | $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/ranport.f |
---|
71 | |
---|
72 | bin/ranibm.o: src/ranibm.f |
---|
73 | $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/ranibm.f |
---|
74 | |
---|
75 | bin/bsheet.exe: $(TRANSLIB) $(BSHEET_OBJECTS) |
---|
76 | $(FF) $(LFLAGS) -o $@ $(BSHEET_OBJECTS) -Llib -ltransport |
---|
77 | |
---|
78 | bin/bshcall.o: src/bshcall.f |
---|
79 | $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/bshcall.f |
---|
80 | |
---|
81 | bin/bshm.o: src/bshm.f |
---|
82 | $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/bshm.f |
---|
83 | |
---|
84 | bin/trplot.o: src/trplot.f |
---|
85 | $(FF) -o $@ $(FFLAGS) -c -C src/trplot.f |
---|
86 | |
---|
87 | bin/trplot.exe: bin/trplot.o |
---|
88 | $(FF) -o $@ bin/trplot.o |
---|
89 | |
---|
90 | $(TRANSLIB) : $(TRANSPORT_OBJECTS) |
---|
91 | ar rs $(TRANSLIB) $(TRANSPORT_OBJECTS) |
---|
92 | |
---|
93 | clean: |
---|
94 | rm -f $(TRANSLIB) |
---|
95 | rm -f bin/*.o |
---|
96 | rm -f bin/*~* |
---|
97 | rm -f bin/trns.exe |
---|
98 | rm -f bin/bsheet.exe |
---|
99 | |
---|