.SUFFIXES : .F .f .c .o .a .f90 .f95 ######################################################################## # # The Makefile for building the COSP library is created by CAM's configure # using this template and prepending the following macros: # COSP_PATH, ISCCP_PATH, RS_PATH, CS_PATH, LLNL_PATH, MISR_PATH, MODIS_PATH. # # The macro CAM_BLD is also prepended. It is the build directory of the CAM # code and it contains the abortutils.mod file. The abortutils module is # referenced by COSP code in order to perform an abort which is appropriate # for the CESM system. # # The main customization required for the library to link with CAM is to # use autopromotion of the default real type to real*8. This is required # in most, though not all, of the COSP files. Also, some compilers require # special flags to specify fixed or free format source (rather than depend # on filename extensions). Thus, the explicit rules at the end of this # template for compiling COSP files have been modified to allow different # sets of flags for 1) files that cannot be compiled with autopromotion, # and 2) files that use fixed format source. # # The generated Makefile will be used by a sub-Make issued from CAM's Make. # The sub-Make will inherit the macros: # # FC name of Fortran90 compiler # FC_FLAGS Fortran compiler flags # FC_AUTO_R8 Fortran compiler flags to autopromote type real to real*8 # FREEFLAGS Fortran compiler flags for free format source # FIXEDFLAGS Fortran compiler flags for fixed format source # ######################################################################## F90 := $(FC) F90FLAGS := $(FREEFLAGS) $(FC_FLAGS) $(FC_AUTO_R8) F90FLAGS_noauto := $(FREEFLAGS) $(FC_FLAGS) F90FLAGS_fixed := $(FIXEDFLAGS) $(FC_FLAGS) $(FC_AUTO_R8) VPATH := $(COSP_PATH) OBJS = cosp_radar.o cosp_types.o cosp_constants.o cosp_simulator.o \ cosp_utils.o scops.o prec_scops.o cosp.o cosp_stats.o \ pf_to_mr.o \ cosp_lidar.o radar_simulator_types.o zeff.o \ array_lib.o atmos_lib.o dsd.o format_input.o \ gases.o load_hydrometeor_classes.o \ math_lib.o mrgrnk.o optics_lib.o radar_simulator.o \ lidar_simulator.o llnl_stats.o lmd_ipsl_stats.o \ cosp_isccp_simulator.o icarus.o \ cosp_misr_simulator.o MISR_simulator.o \ cosp_modis_simulator.o modis_simulator.o libcosp.a: $(OBJS) ar cr libcosp.a $(OBJS) %.o: %.f90 $(F90) -I$(CAM_BLD) $(F90FLAGS) -c $< %.o: %.F90 $(F90) -I$(CAM_BLD) $(F90FLAGS) -c $< cosp.o : cosp_simulator.o cosp_types.o cosp_modis_simulator.o cosp_lidar.o : cosp_constants.o cosp_types.o cosp_radar.o : cosp_constants.o cosp_types.o radar_simulator_types.o \ array_lib.o atmos_lib.o format_input.o math_lib.o optics_lib.o cosp_simulator.o: cosp_types.o cosp_radar.o cosp_lidar.o \ cosp_isccp_simulator.o cosp_misr_simulator.o \ cosp_modis_simulator.o cosp_stats.o cosp_stats.o : cosp_constants.o cosp_types.o llnl_stats.o lmd_ipsl_stats.o cosp_types.o : cosp_constants.o cosp_utils.o radar_simulator_types.o cosp_utils.o : cosp_constants.o lmd_ipsl_stats.o : llnl_stats.o llnl_stats.o : cosp_constants.o array_lib.o : mrgrnk.o dsd.o : array_lib.o math_lib.o format_input.o : array_lib.o load_hydrometeor_classes.o: radar_simulator_types.o math_lib.o : array_lib.o mrgrnk.o radar_simulator.o : array_lib.o math_lib.o mrgrnk.o optics_lib.o \ radar_simulator_types.o zeff.o : math_lib.o optics_lib.o cosp_isccp_simulator.o : cosp_constants.o cosp_types.o cosp_misr_simulator.o : cosp_constants.o cosp_types.o cosp_modis_simulator.o : cosp_constants.o cosp_types.o modis_simulator.o modis_simulator.o : cosp_types.o clean_objs: rm -f $(OBJS) *.mod *.o clean: rm -f $(PROG) $(OBJS) *.mod *.o fort.* scops.o : $(ISCCP_PATH)/scops.f90 $(F90) $(F90FLAGS_fixed) -c -I$(ISCCP_PATH) $< icarus.o : $(ISCCP_PATH)/icarus.f90 $(F90) $(F90FLAGS_fixed) -c $< prec_scops.o : $(LLNL_PATH)/prec_scops.f90 $(F90) $(F90FLAGS_fixed) -c $< pf_to_mr.o : $(LLNL_PATH)/pf_to_mr.f90 $(F90) $(F90FLAGS_fixed) -c $< radar_simulator_types.o : $(RS_PATH)/radar_simulator_types.f90 $(F90) $(F90FLAGS) -c $< atmos_lib.o : $(RS_PATH)/atmos_lib.f90 $(F90) $(F90FLAGS) -c $< zeff.o : $(RS_PATH)/zeff.f90 $(F90) $(F90FLAGS) -c $< array_lib.o : $(RS_PATH)/array_lib.f90 $(F90) $(F90FLAGS) -c $< dsd.o : $(RS_PATH)/dsd.f90 $(F90) $(F90FLAGS) -c $< format_input.o : $(RS_PATH)/format_input.f90 $(F90) $(F90FLAGS) -c $< gases.o : $(RS_PATH)/gases.f90 $(F90) $(F90FLAGS) -c $< load_hydrometeor_classes.o : $(RS_PATH)/load_hydrometeor_classes.f90 $(F90) $(F90FLAGS) -c $< math_lib.o : $(RS_PATH)/math_lib.f90 $(F90) $(F90FLAGS) -c $< mrgrnk.o : $(RS_PATH)/mrgrnk.f90 $(F90) $(F90FLAGS_noauto) -c $< optics_lib.o : $(RS_PATH)/optics_lib.f90 $(F90) $(F90FLAGS) -c $< radar_simulator.o : $(RS_PATH)/radar_simulator.f90 $(F90) $(F90FLAGS) -c $< lidar_simulator.o : $(CS_PATH)/lidar_simulator.F90 $(F90) $(F90FLAGS) -c $< lmd_ipsl_stats.o : $(CS_PATH)/lmd_ipsl_stats.F90 $(F90) $(F90FLAGS) -c $< llnl_stats.o : $(LLNL_PATH)/llnl_stats.F90 $(F90) $(F90FLAGS) -c $< cosp_radar.o : $(LLNL_PATH)/cosp_radar.F90 $(F90) $(F90FLAGS) -c $< MISR_simulator.o : $(MISR_PATH)/MISR_simulator.f90 $(F90) $(F90FLAGS_fixed) -c $< modis_simulator.o : $(MODIS_PATH)/modis_simulator.F90 $(F90) -I$(CAM_BLD) $(F90FLAGS) -c $<