Makefile
author Forrest Hoffman <forrest@climatemodeling.org>
Sun, 21 Sep 2008 21:59:01 -0400
changeset 0 c8ca04c3a9d6
permissions -rw-r--r--
Initial commit of code to rewrite C-LAMP output from CLM3 for the Earth System Grid (ESG)
forrest@0
     1
# On thing1, do the following first:
forrest@0
     2
# $ module load pgi
forrest@0
     3
# $ module load netcdf
forrest@0
     4
# $ module load cmor
forrest@0
     5
#
forrest@0
     6
FC=pgf90
forrest@0
     7
#CMOR=~hof/src/cmor/CMOR_V1.2
forrest@0
     8
#NETCDF=/apps/netcdf/3.6.2/jaguar
forrest@0
     9
#NETCDF=/apps/netcdf/3.6.1/hawk_x86_64
forrest@0
    10
#NETCDF=/apps/netcdf/3.6.1/ewok_x86_64_pgi625
forrest@0
    11
#NETCDF=$(HOME)/robin1/netcdf-3.6.2
forrest@0
    12
# jaguar
forrest@0
    13
#NETCDF=$(NETCDF_DIR)
forrest@0
    14
#UDUNITS=/apps/udunits/1.12.4/robin1/udunits-1.12.4
forrest@0
    15
FFLAGS=-I$(INC_CMOR) -I$(INC_NETCDF)
forrest@0
    16
LIBS=-L$(LIB_CMOR) -L$(LIB_NETCDF) -lcmor -ludunits -lnetcdf
forrest@0
    17
#
forrest@0
    18
OBJS=c-lamp_rewrite.o kind_mod.o clm_mod.o
forrest@0
    19
MODS=kind_mod.mod clm_mod.mod
forrest@0
    20
forrest@0
    21
.SUFFIXES: .f90 .o
forrest@0
    22
forrest@0
    23
.f90.o:
forrest@0
    24
	$(FC) $(FFLAGS) -c $<
forrest@0
    25
forrest@0
    26
all: c-lamp_rewrite
forrest@0
    27
forrest@0
    28
c-lamp_rewrite: c-lamp_rewrite.o kind_mod.o clm_mod.o
forrest@0
    29
	$(FC) $(FFLAGS) -o $@  c-lamp_rewrite.o kind_mod.o clm_mod.o $(LIBS)
forrest@0
    30
forrest@0
    31
clean:
forrest@0
    32
	$(RM) -f c-lamp_rewrite $(OBJS) $(MODS)
forrest@0
    33
forrest@0
    34
install: all
forrest@0
    35
	cp -p c-lamp_rewrite $(HOME)/bin/
forrest@0
    36
forrest@0
    37
#
forrest@0
    38
c-lamp_rewrite.o: clm_mod.o kind_mod.o c-lamp_rewrite.f90
forrest@0
    39
clm_mod.o: kind_mod.o clm_mod.f90
forrest@0
    40
kind_mod.o: kind_mod.f90