/[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.17 - (hide annotations) (download)
Mon Feb 28 17:53:29 2005 UTC (19 years, 3 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint58u_post, checkpoint58w_post, checkpoint57m_post, checkpoint57s_post, checkpoint57k_post, checkpoint57g_post, checkpoint58r_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint58n_post, checkpoint58x_post, checkpoint57g_pre, checkpoint58t_post, checkpoint58h_post, checkpoint57y_pre, checkpoint57f_pre, checkpoint58q_post, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59h, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57h_done, checkpoint58f_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post
Changes since 1.16: +4 -4 lines
 o fix obscure MNC bug involving conversion between reals and integers
   - it caused no problems with certain (eg. gcc, ifc) compilers but the
     new version is now more standards-compliant

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

  ViewVC Help
Powered by ViewVC 1.1.22