/[MITgcm]/MITgcm/pkg/mnc/Makefile
ViewVC logotype

Annotation of /MITgcm/pkg/mnc/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.20 - (hide annotations) (download)
Sun Jul 20 13:57:49 2008 UTC (15 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint62, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y, HEAD
Changes since 1.19: +2 -2 lines
make clean also removes old (lower case) version file: mnc_id_header.h

1 edhill 1.5 #
2 jmc 1.20 # $Header: /u/gcmpack/MITgcm/pkg/mnc/Makefile,v 1.19 2008/05/22 12:21:19 mlosch Exp $
3 jmc 1.18 # $Name: $
4 edhill 1.5 #
5     # A Makefile for MNC templates and testing
6     #
7 edhill 1.1
8     FC = f77
9 edhill 1.9 CPP = cpp
10 edhill 1.1
11     .SUFFIXES:
12 edhill 1.9 .SUFFIXES: .T .t .F .f .h .o
13 edhill 1.1
14     .t.h:
15     cat $< > $@
16     .T.F:
17     cat $< > $@
18 edhill 1.9 .F.f:
19     $(CPP) $(DEFINES) > $@
20     .f.o:
21     $(FC) -DMNC_TEST -c $<
22 edhill 1.1
23    
24     TEST_LINKS = EEPARAMS.h utils.F
25 edhill 1.8 TEST_HEADERS = PACKAGES_CONFIG.h CPP_OPTIONS.h SIZE.h
26 edhill 1.1 TEST_FILES = mnc_test_utils.F
27 edhill 1.9 TEST_DEFINES = -DMNC_DEBUG
28 edhill 1.1
29     FILES = \
30 edhill 1.2 mnc_dim.F \
31 edhill 1.1 mnc_file.F \
32     mnc_grid.F \
33     mnc_init.F \
34     mnc_utils.F \
35 edhill 1.7 mnc_var.F \
36     mnc_cwrapper.F
37 edhill 1.1
38     TEST_OBJECTS = $(TEST_FILES:.F=.o)
39     OBJECTS = $(FILES:.F=.o)
40    
41 edhill 1.3 ALL_TEST = $(TEST_LINKS) $(TEST_HEADERS) $(TEST_FILES) $(TEST_OBJECTS)
42    
43 edhill 1.5 all: templates
44    
45 edhill 1.1 noexe: $(TEST_LINKS) $(TEST_HEADERS) $(TEST_FILES) $(FILES) $(OBJECTS)
46     echo "compiled"
47    
48     EEPARAMS.h:
49     ln -s ../../eesupp/inc/EEPARAMS.h .
50     utils.F:
51     ln -s ../../eesupp/src/utils.F .
52    
53 edhill 1.4 TEMPLATE_FILES = \
54 edhill 1.12 MNC_CW_READWRITE_RS.F \
55     MNC_CW_READWRITE_RL.F \
56     MNC_CW_READWRITE_I.F
57 edhill 1.9 TEMPLATE_OBJECTS = $(TEMPLATE_FILES:.F=.o)
58    
59 edhill 1.13 mnc_netcdf_stubs.c: mnc_netcdf_stubs.h
60 edhill 1.14 -./build_netcdf_stubs > tmp_mnc_netcdf_stubs.c
61     -cpp -P < tmp_mnc_netcdf_stubs.c > mnc_netcdf_stubs.c
62     -rm -f tmp_mnc_netcdf_stubs.c
63 edhill 1.13
64     mnc_netcdf_stubs.o: mnc_netcdf_stubs.c
65     -gcc -c mnc_netcdf_stubs.c
66 edhill 1.4
67 mlosch 1.19 templates: $(TEMPLATE_FILES) MNC_ID_HEADER.h
68 edhill 1.4
69 edhill 1.12 MNC_CW_READWRITE_RS.F: mnc_cw_readwrite.template
70 edhill 1.17 cat mnc_cw_readwrite.template | sed -e 's/RX/RS/g' | sed -e 's/MNC2I/NINT/g' | sed -e 's/MNCI2//g' | sed -e 's/__V/_RS/g' > MNC_CW_READWRITE_RS.F
71 edhill 1.12 MNC_CW_READWRITE_RL.F: mnc_cw_readwrite.template
72 edhill 1.17 cat mnc_cw_readwrite.template | sed -e 's/RX/RL/g' | sed -e 's/MNC2I/NINT/g' | sed -e 's/MNCI2//g' | sed -e 's/__V/_RL/g' > MNC_CW_READWRITE_RL.F
73 edhill 1.12 MNC_CW_READWRITE_I.F: mnc_cw_readwrite.template
74 edhill 1.17 cat mnc_cw_readwrite.template | sed -e 's/RX/I/g' | sed -e 's/MNC2I//g' | sed -e 's/MNCI2/NINT/g' | sed -e 's/__V/INTEGER/g' > MNC_CW_READWRITE_I.F
75 edhill 1.4
76 edhill 1.5 tag = ../../doc/tag-index
77    
78 mlosch 1.19 MNC_ID_HEADER.h:
79 edhill 1.5 -./parse_local_info > $@
80    
81 edhill 1.9 test: all mnc_test_001 mnc_test_002
82 edhill 1.1 echo "running mnc_test_001 ..."
83 edhill 1.7 ./mnc_test_001 > t_out_001 && ncdump test_001.nc | head -20
84 edhill 1.8 ./mnc_test_002 > t_out_002 && tail -15 t_out_002
85 edhill 1.1
86 edhill 1.3 mnc_test_001: $(ALL_TEST) $(FILES) $(OBJECTS) mnc_test_001.o
87 edhill 1.1 $(FC) -o mnc_test_001 mnc_test_001.o $(OBJECTS) $(TEST_OBJECTS) -lnetcdf
88    
89 edhill 1.7 mnc_test_002: $(ALL_TEST) $(FILES) $(OBJECTS) mnc_test_002.o
90     $(FC) -o mnc_test_002 mnc_test_002.o $(OBJECTS) $(TEST_OBJECTS) -lnetcdf
91    
92 edhill 1.5 CLEAN:
93     @make clean
94 edhill 1.13 -rm -f mnc_netcdf_stubs.c
95 edhill 1.15
96 edhill 1.5 Clean:
97     @make clean
98 edhill 1.15
99     testclean:
100 edhill 1.1 -rm -f *.o $(TEST_LINKS) $(TEST_HEADERS) $(TEST_FILES) $(TEST_OBJECTS)
101 edhill 1.7 -rm -f mnc_test_???.F mnc_test_??? test_???.nc t_out_???
102 edhill 1.15
103     clean: testclean
104 jmc 1.20 -rm -f $(TEMPLATE_FILES) MNC_ID_HEADER.h mnc_id_header.h
105 edhill 1.13 -rm -f mnc_netcdf_stubs.o
106    

  ViewVC Help
Powered by ViewVC 1.1.22