-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
70 lines (52 loc) · 2.54 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
# Makefile for the QA package
# Cx executables of stand-alone C program
# CPPx executables of stand-alone C++ program
Cx = diskUsage.x fModTime.x unixTime.x
CPPx = check_CORDEX_standard-table.x convert_CF-standard-names.x \
getNC_att.x getStatus.x syncFiles.x testValidNC.x
UTIL_SOURCE = hdhC.cpp ReadLine.cpp Split.cpp Statistics.cpp GetOpt_hdh.cpp
UTIL_HEADER = hdhC.h matrix_array.h readline.h split.h statistics.h getopt_hdh.h
BASE_SOURCE = Annotation.cpp Base.cpp BraceOP.cpp Date.cpp \
InFile.cpp NcAPI.cpp TimeControl.cpp Variable.cpp
BASE_HEADER = annotation.h base.h brace_op.h data_statistics.h date.h \
geo_meta.h in_file.h iobj.h matrix_array.h nc_api.h \
time_control.h variable.h
QA_SOURCE = CF.cpp CellStatistics.cpp FD_interface.cpp Oper.cpp OutFile.cpp Parse.cpp \
QA.cpp QA_data.cpp QA_time.cpp QA_PT.cpp QA_main.cpp
QA_HEADER = cell_statistics.h cf.h fd_interface.h oper.h out_file.h parse.h \
qa.h qa_data.h qa_PT.h qa_main.h qa_time.h
#vpath %.c $(QA_PATH)/src
#vpath %.cpp $(QA_PATH)/src
#vpath %.h $(QA_PATH)/include
VPATH = $(QA_PATH)/src $(QA_PATH)/include
all: c-prog cpp-prog $(PRJ_NAME)
c-prog: $(Cx)
diskUsage.x: diskUsage.c
fModTime.x: fModTime.c
unixTime.x: unixTime.c
%.x: %.c
$(CC) $(CFLAGS) -o $@ $<
cpp-prog: $(CPPx)
getNC_att.x: $(UTIL_SOURCE) $(UTIL_HEADER) brace_op.h BraceOP.cpp nc_api.h \
annotation.h Annotation.cpp NcAPI.cpp getNC_att.cpp
getStatus.x: $(UTIL_SOURCE) $(UTIL_HEADER) getStatus.cpp
syncFiles.x: $(UTIL_SOURCE) $(UTIL_HEADER) date.h Date.cpp \
nc_api.h NcAPI.cpp syncFiles.cpp
testValidNC.x: $(UTIL_SOURCE) $(UTIL_HEADER) nc_api.h NcAPI.cpp testValidNC.cpp
%.x: %.cpp
$(CXX) $(CXXFLAGS) -o $@ $< \
-I $(QA_PATH)/include $(INCLUDE) \
$(LIB) $(LIBDL) -ludunits2 -lnetcdf -lhdf5_hl -lhdf5 -lz -luuid
${PRJ_NAME}: ${PRJ_NAME}.x
${PRJ_NAME}.x: ${BASE_SOURCE} ${BASE_HEADER} $(QA_PRJ_HEADER) $(QA_PRJ_SRC) \
$(QA_SOURCE) $(QA_HEADER) $(UTIL_SOURCE) $(UTIL_HEADER)
$(CXX) $(CXXFLAGS) -o ${PRJ_NAME}.x $(QA_PATH)/src/QA_main.cpp \
-I $(QA_PATH)/include $(INCLUDE) \
$(LIB) $(LIBDL) -ludunits2 -lnetcdf -lhdf5_hl -lhdf5 -lz
# -DREVISION=$(REVISION) \
CF-checker: dkrz-cf-checker.x
dkrz-cf-checker.x: CF_main.cpp CF.cpp $(BASE_SOURCE) ${BASE_SOURCE} \
$(QA_PRJ_HEADER) $(QA_HEADER) $(UTIL_SOURCE) $(UTIL_HEADER)
$(CXX) $(CXXFLAGS) -o dkrz-cf-checker.x $(QA_PATH)/src/CF_main.cpp \
-I $(QA_PATH)/include $(INCLUDE) \
$(LIB) $(LIBDL) -ludunits2 -lnetcdf -lhdf5_hl -lhdf5 -lz