diff --git a/Makefile.inc b/Makefile.inc new file mode 100644 index 0000000000000000000000000000000000000000..0d7ffd36e27bae7c9d394095c9ec58e519d85ef5 --- /dev/null +++ b/Makefile.inc @@ -0,0 +1,43 @@ +# This file defines common Makefile variables and rules that are used +# to compile the FISHPACK libraries. Normally, this +# file does not have to be modified; see the file Makefile.conf. + +# The names of the fishpack libraries. + +FISHPACK_LIB = libfishpack.a +FISH90_LIB = libfish90.a + +# Commands to compile and link C and Fortran 90 code. + +Compile = $(CC) $(CFLAGS) $(DFLAGS) $(addprefix -I,$(INCDIRS)) \ + -o $@ -c $< + +LinkExe = $(CC) $(addprefix -L,$(LIBDIRS)) -o $@ $^ \ + $(F90FLAGS) $(addprefix -l,$(LIBS)) + +CompileF90 = $(F90) $(F90FLAGS) $(addprefix -I,$(INCDIRS)) \ + -o $@ -c $< + +LinkF90Exe = $(F90) $(addprefix -L,$(LIBDIRS)) -o $@ $^ \ + $(F90FLAGS) $(addprefix -l,$(LIBS)) + +CompileF = $(F90) $(F90FLAGS) $(addprefix -I,$(INCDIRS)) \ + -o $@ -c $< + +Compilef = $(F90) $(FFLAGS) $(addprefix -I,$(INCDIRS)) \ + -o $@ -c $< + +# Implicit rules for compiling C and Fortran source files. + +%.o: %.c + $(Compile) + +%.o: %.f90 + $(CompileF90) + +%.o: %.F + $(CompileF) + +%.o: %.f + $(Compilef) +