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

Contents of /MITgcm/pkg/mnc/Makefile

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


Revision 1.7 - (show annotations) (download)
Tue Jan 27 05:47:32 2004 UTC (20 years, 4 months ago) by edhill
Branch: MAIN
Changes since 1.6: +10 -6 lines
 o first steps towards a "convenience wrapper" for pre-defined grid types
 o small clean-ups

1 #
2 # $Header: /u/u3/gcmpack/MITgcm/pkg/mnc/Makefile,v 1.6 2004/01/25 00:22:57 edhill Exp $
3 #
4 # A Makefile for MNC templates and testing
5 #
6
7 FC = f77
8
9 .SUFFIXES:
10 .SUFFIXES: .T .t .F .h .o
11
12 .t.h:
13 cat $< > $@
14 .T.F:
15 cat $< > $@
16 .F.o:
17 $(FC) -c $<
18
19
20 TEST_LINKS = EEPARAMS.h utils.F
21 TEST_HEADERS = PACKAGES_CONFIG.h CPP_OPTIONS.h
22 TEST_FILES = mnc_test_utils.F
23
24 FILES = \
25 mnc_dim.F \
26 mnc_file.F \
27 mnc_grid.F \
28 mnc_init.F \
29 mnc_utils.F \
30 mnc_var.F \
31 mnc_cwrapper.F
32
33 TEST_OBJECTS = $(TEST_FILES:.F=.o)
34 OBJECTS = $(FILES:.F=.o)
35
36 ALL_TEST = $(TEST_LINKS) $(TEST_HEADERS) $(TEST_FILES) $(TEST_OBJECTS)
37
38 all: templates
39
40 noexe: $(TEST_LINKS) $(TEST_HEADERS) $(TEST_FILES) $(FILES) $(OBJECTS)
41 echo "compiled"
42
43 EEPARAMS.h:
44 ln -s ../../eesupp/inc/EEPARAMS.h .
45 utils.F:
46 ln -s ../../eesupp/src/utils.F .
47
48 TEMPLATE_FILES = \
49 MNC_RESHAPE_RS_D.F MNC_RESHAPE_RL_D.F \
50 MNC_RESHAPE_RS_R.F MNC_RESHAPE_RL_R.F
51
52 templates: $(TEMPLATE_FILES) mnc_id_header.h
53
54 MNC_RESHAPE_RS_D.F: mnc_reshape.template
55 cat mnc_reshape.template | sed -e 's/RX/RS/g' | sed -e 's/YY/D/g' > $@
56 MNC_RESHAPE_RL_D.F: mnc_reshape.template
57 cat mnc_reshape.template | sed -e 's/RX/RL/g' | sed -e 's/YY/D/g' > $@
58 MNC_RESHAPE_RS_R.F: mnc_reshape.template
59 cat mnc_reshape.template | sed -e 's/RX/RS/g' | sed -e 's/YY/R/g' > $@
60 MNC_RESHAPE_RL_R.F: mnc_reshape.template
61 cat mnc_reshape.template | sed -e 's/RX/RL/g' | sed -e 's/YY/R/g' > $@
62
63 tag = ../../doc/tag-index
64
65 mnc_id_header.h:
66 -./parse_local_info > $@
67
68 test: all mnc_test_001 mnc_test_002
69 echo "running mnc_test_001 ..."
70 ./mnc_test_001 > t_out_001 && ncdump test_001.nc | head -20
71 ./mnc_test_002
72
73 mnc_test_001: $(ALL_TEST) $(FILES) $(OBJECTS) mnc_test_001.o
74 $(FC) -o mnc_test_001 mnc_test_001.o $(OBJECTS) $(TEST_OBJECTS) -lnetcdf
75
76 mnc_test_002: $(ALL_TEST) $(FILES) $(OBJECTS) mnc_test_002.o
77 $(FC) -o mnc_test_002 mnc_test_002.o $(OBJECTS) $(TEST_OBJECTS) -lnetcdf
78
79 CLEAN:
80 @make clean
81 Clean:
82 @make clean
83 clean:
84 -rm -f *.o $(TEST_LINKS) $(TEST_HEADERS) $(TEST_FILES) $(TEST_OBJECTS)
85 -rm -f mnc_test_???.F mnc_test_??? test_???.nc t_out_???
86 -rm -f MNC_RESHAPE_R?_?.F mnc_id_header.h

  ViewVC Help
Powered by ViewVC 1.1.22