source: PSPA/transportPSPA/trunk/Makefile @ 430

Last change on this file since 430 was 15, checked in by lemeur, 12 years ago

transport pspa initial

File size: 2.3 KB
Line 
1SHELL = /bin/sh
2INCLUDE = -Iinclude
3FF = gfortran
4TRANSPORT_OBJECTS = bin/transport.o \
5        bin/trm.o \
6        bin/trin.o \
7        bin/trsec.o \
8        bin/ranport.o
9
10BSHEET_OBJECTS = bin/bshcall.o \
11        bin/bshm.o
12
13TRANSLIB = lib/libtransport.a
14
15SOURCES = $(TRANSPORT_OBJECTS:.o=.f) bshcall.f bshm.f
16
17#all: FlavorStuff bin/trns.exe bin/bsheet.exe
18all: FlavorStuff bin/trns.exe
19
20FlavorStuff:
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
51bin/trns.exe : bin/trcall.o $(TRANSPORT_OBJECTS)
52        $(FF) -o $@ bin/trcall.o $(TRANSPORT_OBJECTS)
53
54bin/trcall.o: src/trcall.f
55        $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/trcall.f
56
57bin/transport.o: src/transport.f
58        $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/transport.f
59
60bin/trm.o: src/trm.f
61        $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/trm.f
62
63bin/trin.o: src/trin.f
64        $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/trin.f
65
66bin/trsec.o: src/trsec.f
67        $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/trsec.f
68
69bin/ranport.o: src/ranport.f
70        $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/ranport.f
71
72bin/ranibm.o: src/ranibm.f
73        $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/ranibm.f
74
75bin/bsheet.exe: $(TRANSLIB) $(BSHEET_OBJECTS)
76        $(FF) $(LFLAGS) -o $@ $(BSHEET_OBJECTS) -Llib -ltransport
77
78bin/bshcall.o: src/bshcall.f
79        $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/bshcall.f
80
81bin/bshm.o: src/bshm.f
82        $(FF) -o $@ $(FFLAGS) $(INCLUDE) -c src/bshm.f
83
84bin/trplot.o: src/trplot.f
85        $(FF) -o $@ $(FFLAGS) -c -C src/trplot.f
86
87bin/trplot.exe: bin/trplot.o
88        $(FF) -o $@ bin/trplot.o
89
90$(TRANSLIB) : $(TRANSPORT_OBJECTS)
91        ar rs $(TRANSLIB) $(TRANSPORT_OBJECTS)
92
93clean: 
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
Note: See TracBrowser for help on using the repository browser.