Merge remote-tracking branch 'origin/release-v4.6.1'
[WRF.git] / external / io_pio / Makefile
blobf8e505c660972b945b5c062243c028208b6e0873
1 #makefile to build a wrf_io with PIO
2 #$Id$
4 FCOPTIM = -O0 -g
5 FCNOOPT = -O0 -fno-inline -fno-ip -g
6 FCDEBUG = -g $(FCNOOPT) -traceback # -fpe0 -check all -ftrapuv -unroll0 -u
7 FORMAT_FIXED = -FI
8 FORMAT_FREE = -FR
9 FCSUFFIX =
10 BYTESWAPIO = -convert big_endian
11 FCBASEOPTS_NO_G = -ip -fp-model precise -w -ftz -align all -fno-alias $(FORMAT_FREE) $(BYTESWAPIO)
12 FCBASEOPTS = $(FCBASEOPTS_NO_G) $(FCDEBUG)
13 FCFLAGS = $(FCOPTIM) $(FCBASEOPTS)
15 TRADFLAG = -traditional
16 CPP = /lib/cpp -P
17 AR = ar
18 ARFLAGS = ru
19 M4 = m4
20 RANLIB = ranlib
21 DM_FC = mpiifort
22 FC = $(DM_FC)
24 OBJS = wrf_data_pio.o pio_routines.o wrf_io.o field_routines.o read_bdy_routines.o module_wrfsi_static.o
26 PIOPATH = /glade/p/work/huangwei/lib/intel
27 FFLAGS = $(FCFLAGS) -I. -I$(PIOPATH)/include -I../ioapi_share -I../../frame -I../esmf_time_f90
28 LIBS = -L$(PIOPATH)/lib -lpio
29 CPP1 = $(CPP) -P $(TRADFLAG) -DINTSPECIAL
30 M4 = m4 -Uinclude -Uindex -Ulen
31 AR = ar
33 .SUFFIXES: .F90 .f .o
35 all : libwrfio_pio.a
37 libwrfio_pio.a: $(OBJS) $(CODE)
38 /bin/rm -f libwrfio_pio.a
39 $(AR) cr libwrfio_pio.a $(OBJS)
40 $(RANLIB) libwrfio_pio.a
42 wrf_data_pio.o: wrf_data_pio.F90 $(CODE)
43 $(CPP1) -I. -I$(PIOPATH)/include -I../ioapi_share wrf_data_pio.F90 > wrf_data_pio.f
44 $(FC) $(FFLAGS) -c wrf_data_pio.f
46 pio_routines.o: pio_routines.F90 $(CODE) wrf_data_pio.o
47 $(CPP1) -I. -I$(PIOPATH)/include -I../ioapi_share pio_routines.F90 > pio_routines.f
48 $(FC) $(FFLAGS) -c pio_routines.f
50 wrf_io.o: wrf_io.F90 $(CODE) wrf_data_pio.o read_bdy_routines.o field_routines.o
51 $(CPP1) -I. -I$(PIOPATH)/include -I../ioapi_share wrf_io.F90 > wrf_io.f
52 $(FC) $(FFLAGS) -c wrf_io.f
54 module_wrfsi_static.o: module_wrfsi_static.F90
55 $(CPP1) -I. -I$(PIOPATH)/include -I../ioapi_share module_wrfsi_static.F90 > module_wrfsi_static.f
56 $(FC) $(FFLAGS) -c module_wrfsi_static.f
58 field_routines.o: field_routines.F90 wrf_data_pio.o pio_routines.o
59 $(CPP1) -I. -I$(PIOPATH)/include -I../ioapi_share field_routines.F90 > field_routines.f
60 $(FC) $(FFLAGS) -c field_routines.f
62 read_bdy_routines.o: read_bdy_routines.F90 wrf_data_pio.o pio_routines.o
63 $(CPP1) -I. -I$(PIOPATH)/include -I../ioapi_share read_bdy_routines.F90 > read_bdy_routines.f
64 $(FC) $(FFLAGS) -c read_bdy_routines.f
66 clean: superclean
68 superclean:
69 @/bin/rm -f *.f *.o \
70 *.mod libwrfio_pio.a