Skip to content
Snippets Groups Projects
Select Git revision
  • 72599f386e1fe61e766583e6b5381239340cf3c4
  • master default protected
2 results

grtimer_longcount.c

Blame
  • 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