Skip to content
Snippets Groups Projects
Select Git revision
  • 55c097add24915d770f1113f472a8f9caea1931d
  • master default protected
  • gh-pages
3 results

README.md

Blame
  • To learn more about this project, read the wiki.
    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