generated from NEFSC/NEFSC-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
644b300
commit 459f227
Showing
15 changed files
with
88 additions
and
88 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,89 @@ | ||
#*********************************************************************** | ||
# Usage | ||
# First time, this will create directories for intermediate output | ||
# > make setup | ||
# | ||
# Create exec | ||
# > make | ||
# | ||
# To cleanup for a fresh compilation | ||
# > make clean | ||
#*********************************************************************** | ||
# | ||
# define executable and sourcecode macros | ||
# | ||
OBJ_DIR = ./obj | ||
MOD_DIR = ./mod | ||
FC = gfortran | ||
#-fno-autom | ||
#atic -fcheck=all -fcheck-array-temporaries -Wall | ||
#-fno-automatic | ||
# -fcheck=all -fcheck-array-temporaries-fno-automatic -fmax-stack-var-size=100000 | ||
#FFLAGS = -O3 -mcmodel=medium -funroll-all-loops -ffast-math -msse -msse2 -m3dnow -m64 | ||
FFLAGS = -g -Wall -std=f95 -fall-intrinsics | ||
SRC_DIRS = . | ||
|
||
# Find all the f90 files we want to compile | ||
# Need to compile MOD files first and in particular order | ||
SRCS = Globals.f90 GridManager.f90 ScallopMortality.f90 ScallopRecruit.f90 ScallopGrowth.f90 | ||
#SRCS += $(shell find $(SRC_DIRS) -name '*.f90' | grep -v 'Globals\|DataPoint\|ScallopGrowth\|ScallopRecruit') | ||
SRCS += ScallopPopDensity.f90 IORoutines.f90 | ||
|
||
#LINUX, WIN? | ||
#LIBS = -L/usr/lib/x86_64-linux-gnu -llapack -lblas | ||
#MAC | ||
#LIBS = -L/usr/lib -llapack -lblas | ||
LIBS = | ||
|
||
EXEC = ScallopPopDensity | ||
|
||
OBJ = $(SRCS:%=$(OBJ_DIR)/%.o) | ||
OBJS = $(OBJ:.f90.o=.o) | ||
# | ||
# create executable | ||
# | ||
# The final build step. | ||
$(EXEC): $(OBJS) | ||
$(FC) $(FFLAGS) $(LIBS) -I $(MOD_DIR) $(OBJS) -o $(EXEC) | ||
|
||
# Build step for f90 source | ||
$(OBJ_DIR)/%.o: %.f90 | ||
$(FC) $(FFLAGS) -c $< -o $@ -J $(MOD_DIR) | ||
#*********************************************************************** | ||
#*********************************************************************** | ||
clean: | ||
ifeq ($(OS), Windows_NT) | ||
del $(EXEC).exe | ||
del .\obj\*.o | ||
del .\mod\*.mod | ||
else | ||
rm -fr $(EXEC) | ||
rm -fr $(OBJ_DIR)/*.o | ||
rm -fr $(MOD_DIR)/*.mod | ||
endif | ||
|
||
setup: | ||
ifeq ($(OS), Windows_NT) | ||
ifeq ("$(wildcard .\obj)", "") | ||
mkdir .\obj | ||
endif | ||
ifeq ("$(wildcard .\mod)", "") | ||
mkdir .\mod | ||
endif | ||
# Make directories needed for ScallopPopDensity executuion | ||
ifeq ("$(wildcard ..\GrowthOutput)", "") | ||
mkdir ..\GrowthOutput | ||
endif | ||
ifeq ("$(wildcard ..\Results)", "") | ||
mkdir ..\Results | ||
endif | ||
ifeq ("$(wildcard ..\RecruitField)", "") | ||
mkdir ..\RecruitField | ||
endif | ||
else | ||
if [ ! -d "$(OBJ_DIR)" ]; then mkdir $(OBJ_DIR); fi | ||
if [ ! -d "$(MOD_DIR)" ]; then mkdir $(MOD_DIR); fi | ||
cd ..; if [ ! -d "GrowthOutput" ]; then mkdir 'GrowthOutput'; fi | ||
cd ..; if [ ! -d "Results" ]; then mkdir 'Results'; fi | ||
cd ..; if [ ! -d "RecruitField" ]; then mkdir 'RecruitField'; fi | ||
#*********************************************************************** | ||
# Usage | ||
# First time, this will create directories for intermediate output | ||
# > make setup | ||
# | ||
# Create exec | ||
# > make | ||
# | ||
# To cleanup for a fresh compilation | ||
# > make clean | ||
#*********************************************************************** | ||
# | ||
# define executable and sourcecode macros | ||
# | ||
OBJ_DIR = ./obj | ||
MOD_DIR = ./mod | ||
FC = gfortran | ||
#-fno-autom | ||
#atic -fcheck=all -fcheck-array-temporaries -Wall | ||
#-fno-automatic | ||
# -fcheck=all -fcheck-array-temporaries-fno-automatic -fmax-stack-var-size=100000 | ||
#FFLAGS = -O3 -mcmodel=medium -funroll-all-loops -ffast-math -msse -msse2 -m3dnow -m64 | ||
FFLAGS = -g -Wall -std=f95 -fall-intrinsics | ||
SRC_DIRS = . | ||
|
||
# Find all the f90 files we want to compile | ||
# Need to compile MOD files first and in particular order | ||
SRCS = Globals.f90 GridManager.f90 ScallopMortality.f90 ScallopRecruit.f90 ScallopGrowth.f90 | ||
#SRCS += $(shell find $(SRC_DIRS) -name '*.f90' | grep -v 'Globals\|DataPoint\|ScallopGrowth\|ScallopRecruit') | ||
SRCS += ScallopPopDensity.f90 IORoutines.f90 | ||
|
||
#LINUX, WIN? | ||
#LIBS = -L/usr/lib/x86_64-linux-gnu -llapack -lblas | ||
#MAC | ||
#LIBS = -L/usr/lib -llapack -lblas | ||
LIBS = | ||
|
||
EXEC = ScallopPopDensity | ||
|
||
OBJ = $(SRCS:%=$(OBJ_DIR)/%.o) | ||
OBJS = $(OBJ:.f90.o=.o) | ||
# | ||
# create executable | ||
# | ||
# The final build step. | ||
$(EXEC): $(OBJS) | ||
$(FC) $(FFLAGS) $(LIBS) -I $(MOD_DIR) $(OBJS) -o $(EXEC) | ||
|
||
# Build step for f90 source | ||
$(OBJ_DIR)/%.o: %.f90 | ||
$(FC) $(FFLAGS) -c $< -o $@ -J $(MOD_DIR) | ||
#*********************************************************************** | ||
#*********************************************************************** | ||
clean: | ||
ifeq ($(OS), Windows_NT) | ||
del $(EXEC).exe | ||
del .\obj\*.o | ||
del .\mod\*.mod | ||
else | ||
rm -fr $(EXEC) | ||
rm -fr $(OBJ_DIR)/*.o | ||
rm -fr $(MOD_DIR)/*.mod | ||
endif | ||
|
||
setup: | ||
ifeq ($(OS), Windows_NT) | ||
ifeq ("$(wildcard .\obj)", "") | ||
mkdir .\obj | ||
endif | ||
ifeq ("$(wildcard .\mod)", "") | ||
mkdir .\mod | ||
endif | ||
# Make directories needed for ScallopPopDensity executuion | ||
ifeq ("$(wildcard ..\GrowthOutput)", "") | ||
mkdir ..\GrowthOutput | ||
endif | ||
ifeq ("$(wildcard ..\Results)", "") | ||
mkdir ..\Results | ||
endif | ||
ifeq ("$(wildcard ..\RecruitField)", "") | ||
mkdir ..\RecruitField | ||
endif | ||
else | ||
if [ ! -d "$(OBJ_DIR)" ]; then mkdir $(OBJ_DIR); fi | ||
if [ ! -d "$(MOD_DIR)" ]; then mkdir $(MOD_DIR); fi | ||
cd ..; if [ ! -d "GrowthOutput" ]; then mkdir 'GrowthOutput'; fi | ||
cd ..; if [ ! -d "Results" ]; then mkdir 'Results'; fi | ||
cd ..; if [ ! -d "RecruitField" ]; then mkdir 'RecruitField'; fi | ||
endif |