makefile

来自「CCSM Research Tools: Community Atmospher」· 代码 · 共 76 行

TXT
76
字号
#-----------------------------------------------------------------------# This Makefile is for building any of the executables in this directory.# USAGE: eg. gmake EXENAME=convert_lanwat#------------------------------------------------------------------------# Determine platform UNAMES := $(shell uname -s)UNAMEM := $(findstring CRAY,$(shell uname -m))# Architecture-specific flags and rules##------------------------------------------------------------------------# Cray #------------------------------------------------------------------------# The -Otask0 flag disables autotasking.  This is important due to the# brain-damaged nature of local memory allocation on Cray PVP machines.ifeq ($(UNAMEM),CRAY)LIB_NETCDF := /usr/local/libINC_NETCDF := /usr/local/includeFPPFLAGS := -DCRAY -N -P $(cpp_path)FFLAGS   := -DCRAY -c -G1 -Otask0 LDFLAGS  := -L $(LIB_NETCDF) -lnetcdfendif#------------------------------------------------------------------------# SGI#------------------------------------------------------------------------ifeq ($(UNAMES),IRIX64)LIB_NETCDF := /usr/local/lib64/r4i4INC_NETCDF := /usr/local/includeFFLAGS     := -DSGI -64 -r8 -i4 -O2 -c -I$(INC_NETCDF)LDFLAGS    := -64 -L$(LIB_NETCDF) -lnetcdf endif#------------------------------------------------------------------------# SUN#------------------------------------------------------------------------ifeq ($(UNAMES),SunOS)LIB_NETCDF := /contrib/libINC_NETCDF := /contrib/includeFFLAGS     := -DSUN -c -O2 -stackvar -I$(INC_NETCDF)LDFLAGS    := -L $(LIB_NETCDF) -lnetcdf -lcendif#------------------------------------------------------------------------# Default rules#------------------------------------------------------------------------FC := f90.SUFFIXES:.SUFFIXES: .F90 .o .F90.o:	$(FC) $(FFLAGS) $<$(EXENAME): $(EXENAME).o	$(FC) -o $@ $(EXENAME).o $(LDFLAGS)clean:	$(RM) -f *.o $(EXENAME)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?