# # Makefile # #--------------------------------------------------------------------- EXEC_BIN1 = create_coordinates.exe NCDF_PATH= /usr/local/include NETCDF_LIB = -L/usr/local/lib -lnetcdf F_C = gfortran F_P = F_O = -ffixed-line-length-132 -fdefault-real-8 -c -I$(NCDF_PATH) $(F_P) $(NETCDF_LIB) OBJSET = \ agrif_types.o \ io_netcdf.o \ agrif_readwrite.o \ tools_brice.o \ ### Target all: $(EXEC_BIN1) @echo compilation is OK ### dependancies $(EXEC_BIN1) : $(OBJSET) create_coordinates.o $(F_C) -o $(EXEC_BIN1) create_coordinates.o $(OBJSET) $(NETCDF_LIB) agrif_readwrite.o : io_netcdf.o agrif_types.o agrif_readwrite.f90 $(F_C) $(F_O) agrif_readwrite.f90 create_coordinates.o : agrif_readwrite.o create_coordinates.f90 $(F_C) $(F_O) create_coordinates.f90 agrif_types.o : agrif_types.f90 $(F_C) $(F_O) agrif_types.f90 io_netcdf.o : agrif_types.o io_netcdf.f90 $(F_C) $(F_O) io_netcdf.f90 tools_brice.o : agrif_types.o tools_brice.f90 $(F_C) $(F_O) tools_brice.f90 ### cleaning objects, libraries and executables clean: rm -f *.o *.mod $(EXEC_BIN1) @echo \(.o .mod and executables are removed\) ### execution exe: ./$(EXEC_BIN1) namelist make clean @echo \(OK execution\)