gray/Makefile

70 lines
1.9 KiB
Makefile
Raw Normal View History

2012-06-21 14:38:29 +02:00
# Executable name
EXE=gray
# Objects list
MAINOBJ=gray.o
2015-06-12 14:08:45 +02:00
OTHOBJ=conical.o const_and_precisions.o dierckx.o dispersion.o eierf.o \
graydata_anequil.o graydata_flags.o graydata_par.o green_func_p.o \
interp_eqprof.o magsurf_data.o math.o minpack.o numint.o quadpack.o \
reflections.o simplespline.o utils.o
2012-06-21 14:38:29 +02:00
# Alternative search paths
vpath %.f90 src
vpath %.f src
# Fortran compiler name and flags
FC=gfortran
FFLAGS=-O3 #-Wall -g -fcheck=all
2012-06-21 14:38:29 +02:00
DIRECTIVES = -DREVISION="'$(shell svnversion src)'"
2012-06-29 15:53:20 +02:00
2012-06-21 14:38:29 +02:00
all: $(EXE)
# Build executable from object files
$(EXE): $(MAINOBJ) $(OTHOBJ)
2012-06-21 14:38:29 +02:00
$(FC) $(FFLAGS) -o $@ $^
# Dependencies on modules
2015-06-12 14:08:45 +02:00
gray.o: const_and_precisions.o conical.o dierckx.o dispersion.o \
graydata_anequil.o graydata_flags.o graydata_par.o green_func_p.o \
interp_eqprof.o magsurf_data.o math.o minpack.o numint.o quadpack.o \
reflections.o simplespline.o utils.o
conical.o: const_and_precisions.o
2015-06-12 14:08:45 +02:00
dierckx.o: const_and_precisions.o
dispersion.o: const_and_precisions.o eierf.o math.o quadpack.o
2015-06-12 14:08:45 +02:00
graydata_anequil.o: const_and_precisions.o
graydata_flags.o: const_and_precisions.o
graydata_par.o: const_and_precisions.o
2015-06-12 14:08:45 +02:00
green_func_p.o: const_and_precisions.o numint.o
interp_eqprof.o: const_and_precisions.o
2015-06-12 14:08:45 +02:00
magsurf_data.o: const_and_precisions.o
math.o: const_and_precisions.o
minpack.o: const_and_precisions.o
numint.o: const_and_precisions.o
quadpack.o: const_and_precisions.o
reflections.o: const_and_precisions.o utils.o
simplespline.o: const_and_precisions.o
utils.o: const_and_precisions.o
2012-06-21 14:38:29 +02:00
# General object compilation command
%.o: %.f90
$(FC) $(FFLAGS) -c $<
2012-06-21 14:38:29 +02:00
%.o: %.f
$(FC) $(FFLAGS) -c $<
2012-06-21 14:38:29 +02:00
gray.o:gray.f
$(FC) -cpp $(DIRECTIVES) $(FFLAGS) -c $<
2012-06-21 14:38:29 +02:00
.PHONY: clean install
# Remove output files
clean:
rm -rf *.o *.mod $(EXE)
install:
@if [ -f $(EXE) ]; then \
cp $(EXE) ~/bin/; \
else \
echo File $(EXE) does not exist. Run \'make\' first; \
fi