######################################################################## # Generic Makefile for RNPL 'f77' application. # # Note the modifications # # INCS = calc_al.inc init_al.inc # sf.f: sf_rnpl $(INCS) # $(RNPL) -l f77 $(RNPL_RNPL_FLAGS) sf_rnpl # # updates.f: sf_rnpl $(INCS) # initializers.f: sf_rnpl $(INCS) # # to ensure proper rebuilding of source after modification of # either the update or initialization include files. # # Requires following environment variables to be set to appropriate # values: # # RNPL_RNPL # RNPL_RNPL_FLAGS # RNPL_F77 # RNPL_F77LOAD # RNPL_F77PP # RNPL_FLIBS ######################################################################## .IGNORE: ######################################################################## # NOTE: This Makefile uses the Bourne shell, 'sh' ######################################################################## SHELL = /bin/sh ######################################################################## # Set 'APP' to application name stem (prefix) then execute # 'make fix' to convert Makefile to use explicit targets ######################################################################## APP = emkg ######################################################################## # If your application uses headers and/or libraries from # non-system locations, define the following macros appropriately ... # (set to white-space separated path names, don't use 'csh' ~ notation # for home directories) ######################################################################## USER_INC_PATHS = USER_LIB_PATHS = ######################################################################## # If you want to set non-default flags for the 'f77' compiler, do so # here ######################################################################## RNPL = $(RNPL_RNPL) F77 = $(RNPL_F77) F77_LOAD = $(RNPL_F77LOAD) F77PP = $(RNPL_F77PP) FLIBS = $(RNPL_FLIBS) # Working directories WORK = w1 .f.o: $(F77PP) $*.f $(F77) -c $*.f all: emkg emkg_init fix: Makefile sed "s@emkg@emkg@g" < Makefile > .Makefile mv .Makefile Makefile INCS = calc_al.inc init_al.inc emkg.f: emkg_rnpl $(INCS) $(RNPL) -l f77 $(RNPL_RNPL_FLAGS) emkg_rnpl updates.f: emkg_rnpl $(INCS) initializers.f: emkg_rnpl $(INCS) emkg_init.f: emkg_rnpl emkg_init: emkg_init.o updates.o initializers.o $(F77_LOAD) emkg_init.o updates.o initializers.o $(FLIBS) -o emkg_init emkg: emkg.o updates.o $(F77_LOAD) emkg.o updates.o $(FLIBS) -o emkg clean: rm *.hdf *.sdf .rn* emkg emkg_init > /dev/null 2>&1 rm *.o > /dev/null 2>&1 rm initfrag.f updates.f initializers.f emkg.f emkg_init.f rm gfuni0.inc globals.inc other_glbs.inc sys_param.inc for f in $(WORK); do\ (cd $$f; make clean) \ done