source: dynamico_lmdz/simple_physics/phyparam/Makefile @ 4235

Last change on this file since 4235 was 4235, checked in by dubos, 5 years ago

simple_physics : DYNAMICO driver

File size: 1.2 KB
Line 
1# known to compile with gfortran version 7, ifort version 17, pgfortran version 18
2# Examples
3# F90=ifort FFLAGS=-fast make clean all
4# F90=gfortran F90FLAGS=-ffree-line-length-none make clean all
5# F90=pgfortran F90FLAGS="-fast -Minfo=loop" make clean all
6
7# if XCodeML F_Front is installed, set FFRONT=F_Front to parse code into XML
8FFRONT ?= true
9
10F90 ?= gfortran
11F90FLAGS ?= -ffree-line-length-none
12
13NAMES = $(basename $(notdir $(wildcard physics/*.F90)))
14OBJECTS = $(addprefix obj/, $(addsuffix .o, $(NAMES)))
15
16all : obj $(OBJECTS) lib/libphyparam.so
17
18obj :
19        @rm -rf obj include lib xml tmp *~ */*~
20        @mkdir obj include lib xml tmp
21
22clean :
23        @rm -rf obj include lib xml tmp *~ */*~
24        @mkdir obj include lib xml tmp
25        @../bash/concatenate_all_code.sh $(NAMES) > tmp/all_code
26        @../bash/makedeps.sh tmp/all_code >  Makefile.inc
27
28nice:
29        ../bash/beautify.sh physics/*.F90
30
31%.so : $(OBJECTS)
32        $(F90) -shared $^ -o $@ 
33
34SRC = $(basename $(notdir $@))
35obj/%.o: physics/%.F90
36        $(F90) -I include -fPIC $(F90FLAGS) -c $<
37        @mv $(SRC).mod include
38        @mv $(SRC).o obj
39        @cpp -DXCODEML $< > tmp/$(SRC).f90
40        @$(FFRONT) -M tmp tmp/$(SRC).f90 > xml/$(SRC).xml
41
42# dependencies between modules
43
44$(OBJECTS) : obj/logging.o
45-include Makefile.inc
Note: See TracBrowser for help on using the repository browser.