mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Added debugging, profiling, and optimizing options in Makefile.
This commit is contained in:
parent
8b3a8111bf
commit
f0e1337e30
1 changed files with 26 additions and 4 deletions
30
src/Makefile
30
src/Makefile
|
|
@ -6,14 +6,36 @@ program = openmc
|
|||
|
||||
include OBJECTS
|
||||
|
||||
#===============================================================================
|
||||
# User Options
|
||||
#===============================================================================
|
||||
|
||||
USE_MPI = no
|
||||
DEBUG = no
|
||||
PROFILE = no
|
||||
OPTIMIZE = no
|
||||
|
||||
#===============================================================================
|
||||
# Compiler Options
|
||||
#===============================================================================
|
||||
|
||||
F90 = ifort
|
||||
F90FLAGS = -fpp -g -traceback
|
||||
F90 = ifort
|
||||
F90FLAGS = -cpp -warn
|
||||
LDFLAGS =
|
||||
|
||||
USE_MPI = no
|
||||
ifeq ($(DEBUG),yes)
|
||||
F90FLAGS += -g -traceback -ftrapuv -fp-stack-check -check all
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
ifeq ($(PROFILE),yes)
|
||||
F90FLAGS += -pg
|
||||
LDFLAGS += -pg
|
||||
endif
|
||||
|
||||
ifeq ($(OPTIMIZE),yes)
|
||||
F90FLAGS += -ipo -O3
|
||||
endif
|
||||
|
||||
ifeq ($(USE_MPI),yes)
|
||||
MPI = /opt/mpich2/1.4-intel
|
||||
|
|
@ -27,7 +49,7 @@ endif
|
|||
|
||||
all: $(program)
|
||||
$(program): $(objects)
|
||||
$(F90) $(objects) -o $@
|
||||
$(F90) $(objects) -o $@ $(LDFLAGS)
|
||||
clean:
|
||||
@rm -f *.o *.mod $(program)
|
||||
neat:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue