Commit 49a56d87 authored by François Trigaux's avatar François Trigaux
Browse files

🔨 updated Makefile

parent fe067b84
OS=$(shell uname)
CC=gcc
CF=gfortran
LD=gcc
LIBS=-lgfortran -lreadinifile
LIBS=-lgfortran -lreadINIFile
CFLAGS=-g -fPIC
F90FLAGS=-g -fPIC -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
FFLAGS=-g -fPIC -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
ifeq ($(strip $(OS)), Linux)
FFLAGS=-g -fPIC -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
endif
ifeq ($(strip $(OS)),Darwin)
FFLAGS=-g -fPIC -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan -fallow-argument-mismatch
endif
# List of directories
DIRC=src/interface
DIRF90=src/fortran90
......@@ -12,6 +20,10 @@ DIRF=src/fortran
OBJDIR=obj
BINDIR=bin
LIBDIR=lib
THISDIR=$(shell pwd)
# Install directory
INSTALL_DIR=/usr/local
# List of objects
OBJC=gebt.o
......@@ -42,13 +54,12 @@ $(OBJF90): $(OBJDIR)/%.o: $(DIRF90)/%.f90
$(CF) $(F90FLAGS) -c $< -o $@ -J$(OBJDIR)
$(OBJF): $(OBJDIR)/%.o: $(DIRF)/%.f
$(CF) $(FFLAGS) -fallow-argument-mismatch -c -o $@ $< -J$(OBJDIR)
install:
ln -f lib/libgebt.so /usr/local/lib
ln -f include/gebt.h /usr/local/include
$(CF) $(FFLAGS) -c -o $@ $< -J$(OBJDIR)
install:
ln -sf $(THISDIR)/lib/libgebt.so $(INSTALL_DIR)/lib
ln -sf $(THISDIR)/include/gebt.h $(INSTALL_DIR)/include
clean:
rm -vf $(OBJDIR)/*.o
rm -vf $(OBJDIR)/*.mod
rm -vf $(BINDIR)/gebt
rm -vf $(BINDIR)/libgebt.so
rm -vf $(BINDIR)/libgebt.so
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment