forked from schism-dev/schism
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Make.defs.config
62 lines (49 loc) · 1.98 KB
/
Make.defs.config
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# -*- Mode: Makefile; -*-
## Set the configuration string used in filenames and directories
## This file should not need to be edited by users who are trying to compile
## Developers should change it only when they are adding
## a new module or feature that users can toggle.
## Usage:
## When this file is `include'd in another makefile, the following
## variables must already be defined:
## ENV == name of the "ENV" variable that is a standin for compiler options
## USE_WWM == include the wind-wave module
## DEBUG == TRUE for symbol table, FALSE for no symbol table
## OPT == FALSE no optimization
## TRUE optimization, asserts, and initial setVal
## HIGH optimization, no asserts, and initialize to zero
## ENV == name of the user environment
makefiles+=Make.defs.config
# If OPT isn't set, set it to the opposite of DEBUG
ifeq ($(OPT),)
ifeq ($(DEBUG),yes)
OPT := no
endif
ifeq ($(DEBUG),no)
OPT := yes
endif
endif
# Set USE_SETVAL to TRUE unless OPT=HIGH
ifeq ($(USE_SETVAL),)
USE_SETVAL := TRUE
ifeq ($(OPT),HIGH)
USE_SETVAL := no
endif
endif
# these variables specify pieces of the configuration string
_vers := svn
ifneq ($(ENV),)
_env := .$(ENV)
endif
_debug := $(subst no,,$(subst yes,.DEBUG,$(USE_DEBUG)))
_opt := $(subst no,,$(subst yes,.OPT,$(subst HIGH,.OPTHIGH,$(OPT))))
_wwm := $(subst no,,$(subst yes,.WWM,$(USE_WWM)))
_petsc := $(subst no,,$(subst yes,.PETSC,$(USE_PETSC)))
_sed := $(subst no,,$(subst yes,.SED,$(USE_SED)))
_sed2d := $(subst no,,$(subst yes,.SED2D,$(USE_SED2D)))
_eco := $(subst no,,$(subst yes,.ECO,$(USE_ECO)))
_icm := $(subst no,,$(subst yes,.ICM,$(USE_ICM)))
_napzd := $(subst no,,$(subst yes,.NAPZD,$(USE_NAPZD)))
_timer := $(subst no,,$(subst yes,.TIMER,$(USE_TIMER)))
# create a base for all of the other config strings
config := $(shell echo $(_vers)$(_env)$(_wwm)$(_petsc)$(_sed2d)$(_sed)$(_eco)$(_icm)$(_napzd)$(_timer)$(_debug)$(_opt) | sed -e 's/ //g' -e 's/ //g')