-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathmakefile
More file actions
31 lines (25 loc) · 915 Bytes
/
Copy pathmakefile
File metadata and controls
31 lines (25 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Makefile to compile HYDRUS-1D on Mac and Linux
SOURCE_DIR = source
# Find the fortran compiler
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CC = /usr/local/bin/gfortran
endif
ifeq ($(UNAME_S),Linux)
CC = /usr/bin/gfortran
endif
# Set the files and objects
objects = HYDRUS.o INPUT.o HYSTER.o MATERIAL.o OUTPUT.o SINK.o SOLUTE.o TEMPER.o TIME.o WATFLOW.o
files = $(SOURCE_DIR)/HYDRUS.FOR $(SOURCE_DIR)/INPUT.FOR $(SOURCE_DIR)/HYSTER.FOR $(SOURCE_DIR)/MATERIAL.FOR $(SOURCE_DIR)/OUTPUT.FOR $(SOURCE_DIR)/SINK.FOR $(SOURCE_DIR)/SOLUTE.FOR $(SOURCE_DIR)/TEMPER.FOR $(SOURCE_DIR)/TIME.FOR $(SOURCE_DIR)/WATFLOW.FOR
FFLAGS = -g -ffpe-summary=none
# Compile to a unix executable
hydrus:
$(CC) $(FFLAGS) -c $(files)
$(CC) -o hydrus $(objects)
rm $(objects)
# Compile to a shared-object file to import in python (WIP)
f2py:
f2py -c $(files) -m hydrus
# Clean the directory after
clean:
rm $(objects)