Select Git revision
Makefile 423 B
# use the environmental variable $INCLUDE
# split the paths separated by :
INC = $(subst :, ,$(INCLUDE))
# add a -I/path/to/include
INC := $(INC:%=-I%)
# use the environmental variable $LIBRARY_PATH
LIBS = $(subst :, ,$(LIBRARY_PATH))
LIBS := $(LIBS:%=-L%)
#
all: clean main
main: main.o
${FC} $< $(INC) $(LIBS) -lnetcdff -o $@
%.o %.mod %.smod: %.f90
${FC} ${INC} -c -o $*.o $<
.PHONY: clean
clean:
rm -rf main *.o