-
Notifications
You must be signed in to change notification settings - Fork 400
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (58 loc) · 2.46 KB
/
Makefile
File metadata and controls
73 lines (58 loc) · 2.46 KB
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
.SUFFIXES: .F .o
OBJS = mpas_test_core.o \
mpas_test_core_interface.o \
mpas_test_core_halo_exch.o \
mpas_test_core_streams.o \
mpas_test_core_field_tests.o \
mpas_test_core_timekeeping_tests.o \
mpas_test_core_sorting.o \
mpas_halo_testing.o \
mpas_test_core_string_utils.o \
mpas_test_core_dmpar.o \
mpas_test_core_stream_inquiry.o \
mpas_test_openacc.o \
mpas_test_core_stream_list.o \
mpas_test_core_io.o
all: core_test
core_test: $(OBJS)
ar -ru libdycore.a $(OBJS)
core_reg:
$(CPP) $(CPPFLAGS) $(CPPINCLUDES) Registry.xml > Registry_processed.xml
core_input_gen:
if [ ! -e default_inputs ]; then mkdir default_inputs; fi
(cd default_inputs; $(NL_GEN) ../Registry_processed.xml namelist.test )
(cd default_inputs; $(ST_GEN) ../Registry_processed.xml streams.test stream_list.test. listed )
gen_includes:
$(CPP) $(CPPFLAGS) $(CPPINCLUDES) Registry.xml > Registry_processed.xml
(if [ ! -d inc ]; then mkdir -p inc; fi) # To generate *.inc files
(cd inc; $(REG_PARSE) ../Registry_processed.xml $(CPPFLAGS) )
post_build:
if [ ! -e $(ROOT_DIR)/default_inputs ]; then mkdir $(ROOT_DIR)/default_inputs; fi
cp default_inputs/* $(ROOT_DIR)/default_inputs/.
( cd $(ROOT_DIR)/default_inputs; for FILE in `ls -1`; do if [ ! -e ../$$FILE ]; then cp $$FILE ../.; fi; done )
mpas_test_core_interface.o: mpas_test_core.o
mpas_test_core.o: mpas_test_core_halo_exch.o mpas_test_core_streams.o \
mpas_test_core_field_tests.o mpas_test_core_timekeeping_tests.o \
mpas_test_core_sorting.o mpas_halo_testing.o \
mpas_test_core_string_utils.o mpas_test_core_dmpar.o \
mpas_test_core_stream_inquiry.o mpas_test_openacc.o \
mpas_test_core_stream_list.o mpas_test_core_io.o
mpas_test_core_halo_exch.o:
mpas_test_core_field_tests.o:
mpas_test_core_streams.o:
mpas_test_core_sorting.o:
clean:
$(RM) *.o *.mod *.f90 libdycore.a
$(RM) Registry_processed.xml
@# Certain systems with intel compilers generate *.i files
@# This removes them during the clean process
$(RM) *.i
$(RM) -r default_inputs
.F.o:
$(RM) $@ $*.mod
ifeq "$(GEN_F90)" "true"
$(CPP) $(CPPFLAGS) $(CPPINCLUDES) $< > $*.f90
$(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../operators -I../external/esmf_time_f90
else
$(FC) $(CPPFLAGS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I../framework -I../operators -I../external/esmf_time_f90
endif