forked from idies/turblib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
153 lines (109 loc) · 4.49 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# $Id: Makefile,v 1.9 2009-12-01 19:23:49 eric Exp $
# Copyright 2011 Johns Hopkins University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
OSARCH := $(shell uname -sp)
ifeq ($(OSARCH),Darwin i386)
# Compile both 32- and 64-bit code under MacOS X for Intel
# ARCH_FLAGS = -arch i386 -arch x86_64
else
ARCH_FLAGS =
endif
RM = rm -f
CFLAGS = -Wall
LDLIBS = -lm
CP = cp
MKDIR = mkdir -p
CC = gcc -g $(ARCH_FLAGS)
FC = gfortran $(ARCH_FLAGS)
OBJ = soapC.o \
soapClient.o \
stdsoap2.o \
turblib.o
all: DEMO_turbc DEMO_turbf DEMO_mhdc DEMO_mhdf DEMO_channelc DEMO_channelf DEMO_mixingc DEMO_mixingf DEMO_getCutoutc DEMO_getCutoutf
DEMO_getCutoutc : $(OBJ) DEMO_getCutoutc.o
$(CC) -o $@ $(OBJ) DEMO_getCutoutc.o $(LDLIBS)
DEMO_getCutoutc.o : compiler_flags
DEMO_getCutoutf : $(OBJ) DEMO_getCutoutf.o
$(FC) -o $@ $(OBJ) DEMO_getCutoutf.o $(LDLIBS)
DEMO_getCutoutf.o : DEMO_getCutoutf.f90
$(FC) -c DEMO_getCutoutf.f90
DEMO_mhdc : $(OBJ) DEMO_mhdc.o
$(CC) -o $@ $(OBJ) DEMO_mhdc.o $(LDLIBS)
DEMO_mhdc.o: compiler_flags
DEMO_turbc : $(OBJ) DEMO_turbc.o
$(CC) -o $@ $(OBJ) DEMO_turbc.o $(LDLIBS)
DEMO_turbc.o: compiler_flags
DEMO_turbf : $(OBJ) DEMO_turbf.o
$(FC) -o $@ $(OBJ) DEMO_turbf.o $(LDLIBS)
DEMO_turbf.o : DEMO_turbf.f90
$(FC) -c DEMO_turbf.f90
DEMO_mhdf : $(OBJ) DEMO_mhdf.o
$(FC) -o $@ $(OBJ) DEMO_mhdf.o $(LDLIBS)
DEMO_mhdf.o : DEMO_mhdf.f90
$(FC) -c DEMO_mhdf.f90
DEMO_channelc : $(OBJ) DEMO_channelc.o
$(CC) -o $@ $(OBJ) DEMO_channelc.o $(LDLIBS)
DEMO_channelc.o: compiler_flags
DEMO_channelf : $(OBJ) DEMO_channelf.o
$(FC) -o $@ $(OBJ) DEMO_channelf.o $(LDLIBS)
DEMO_channelf.o : DEMO_channelf.f90
$(FC) -c DEMO_channelf.f90
DEMO_mixingc : $(OBJ) DEMO_mixingc.o
$(CC) -o $@ $(OBJ) DEMO_mixingc.o $(LDLIBS)
DEMO_mixingc.o: compiler_flags
DEMO_mixingf : $(OBJ) DEMO_mixingf.o
$(FC) -o $@ $(OBJ) DEMO_mixingf.o $(LDLIBS)
DEMO_mixingf.o : DEMO_mixingf.f90
$(FC) -c DEMO_mixingf.f90
stdsoap2.o: stdsoap2.c
$(CC) $(CFLAGS) -c $<
static_lib: $(OBJ)
ar rcs libJHTDB.a $(OBJ)
install: static_lib
$(MKDIR) $(JHTDB_PREFIX)/include
$(MKDIR) $(JHTDB_PREFIX)/lib
$(CP) *.h $(JHTDB_PREFIX)/include/
$(CP) libJHTDB.a $(JHTDB_PREFIX)/lib/
# Regenerate the gSOAP interfaces if required
TurbulenceService.h : wsdl
# Update the WSDL and gSOAP interfaces
wsdl:
wsdl2h -o TurbulenceService.h -n turb -c "http://turbulence.pha.jhu.edu/service/turbulence.asmx?WSDL" -s
soapcpp2 -CLcx -2 -I.:$(SOAP_INCLUDE_DIR) TurbulenceService.h
testwsdl:
wsdl2h -o TurbulenceService.h -n turb -c "http://test.turbulence.pha.jhu.edu/service/turbulence.asmx?WSDL" -s
soapcpp2 -CLcx -2 -I.:$(SOAP_INCLUDE_DIR) TurbulenceService.h
mhdtestwsdl:
wsdl2h -o TurbulenceService.h -n turb -c "http://mhdtest.turbulence.pha.jhu.edu/service/turbulence.asmx?WSDL" -s
soapcpp2 -CLcx -2 -I.:$(SOAP_INCLUDE_DIR) TurbulenceService.h
devwsdl:
wsdl2h -o TurbulenceService.h -n turb -c "http://dev.turbulence.pha.jhu.edu/service/turbulence.asmx?WSDL" -s
soapcpp2 -CLcx -2 -I.:$(SOAP_INCLUDE_DIR) TurbulenceService.h
mhddevwsdl:
wsdl2h -o TurbulenceService.h -n turb -c "http://mhddev.turbulence.pha.jhu.edu/service/turbulence.asmx?WSDL" -s
soapcpp2 -CLcx -2 -I.:$(SOAP_INCLUDE_DIR) TurbulenceService.h
prodtestwsdl:
wsdl2h -o TurbulenceService.h -n turb -c "http://prodtest.turbulence.pha.jhu.edu/service/turbulence.asmx?WSDL" -s
soapcpp2 -CLcx -2 -I.:$(SOAP_INCLUDE_DIR) TurbulenceService.h
clean:
$(RM) *.o *.exe DEMO_turbf DEMO_turbc DEMO_mhdc DEMO_mhdf DEMO_channelc DEMO_channelf DEMO_mixingc DEMO_mixingf compiler_flags DEMO_getCutoutc DEMO_getCutoutf
spotless: clean
$(RM) soapClient.c TurbulenceServiceSoap.nsmap soapH.h TurbulenceServiceSoap12.nsmap soapStub.h soapC.c TurbulenceService.h
.SUFFIXES: .o .c .x
.c.o:
$(CC) $(CFLAGS) -c $<
.PHONY: force
compiler_flags: force
echo '$(CFLAGS)' | cmp -s - $@ || echo '$(CFLAGS)' > $@
$(OBJ): compiler_flags