Skip to content

Commit b4c5726

Browse files
committed
Clean up non-ncar make files and build_examples
1 parent 59df5f9 commit b4c5726

3 files changed

Lines changed: 14 additions & 50 deletions

File tree

standalone/build/build_examples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ FMS_ROOT=${CESM_ROOT}/libraries/FMS
1818
# Default compiler
1919
COMPILER="intel"
2020
MACHINE="ncar"
21-
DEBUG=0 # Set to False, or REPRO Mode!
21+
DEBUG=0 # Set to False (REPRO Mode)!
2222

2323
# Parse command line arguments
2424
while [[ "$#" -gt 0 ]]; do

standalone/templates/homebrew-gnu.mk

Lines changed: 10 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -12,68 +12,36 @@ LD = mpif90 $(MAIN_PROGRAM)
1212
# flags #
1313
#########
1414
DEBUG =
15-
REPRO =
16-
VERBOSE =
17-
OPENMP =
1815

1916
MAKEFLAGS += --jobs=2
2017

2118
FPPFLAGS :=
2219

2320
FFLAGS := -fcray-pointer -fdefault-double-8 -fdefault-real-8 -Waliasing -ffree-line-length-none -fno-range-check
24-
FFLAGS += -I$(shell nf-config --includedir)
25-
FFLAGS_OPT = -O3
2621
FFLAGS_REPRO = -O2 -fbounds-check
2722
FFLAGS_DEBUG = -O0 -g -W -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow
28-
FFLAGS_OPENMP = -fopenmp
29-
FFLAGS_VERBOSE =
3023

3124
CFLAGS := -D__IFC
32-
CFLAGS += -I$(shell nc-config --includedir)
33-
CFLAGS_OPT = -O2
34-
CFLAGS_OPENMP = -fopenmp
25+
CFLAGS_REPRO= -O2
3526
CFLAGS_DEBUG = -O0 -g
3627

37-
# Optional Testing compile flags. Mutually exclusive from DEBUG, REPRO, and OPT
38-
# *_TEST will match the production if no new option(s) is(are) to be tested.
39-
FFLAGS_TEST = -O2
40-
CFLAGS_TEST = -O2
41-
4228
LDFLAGS :=
43-
LDFLAGS_OPENMP := -fopenmp
44-
LDFLAGS_VERBOSE :=
4529

46-
ifneq ($(REPRO),)
47-
CFLAGS += $(CFLAGS_REPRO)
48-
FFLAGS += $(FFLAGS_REPRO)
49-
else ifneq ($(DEBUG),)
30+
ifeq ($(DEBUG),1)
5031
CFLAGS += $(CFLAGS_DEBUG)
5132
FFLAGS += $(FFLAGS_DEBUG)
52-
else ifneq ($(TEST),)
53-
CFLAGS += $(CFLAGS_TEST)
54-
FFLAGS += $(FFLAGS_TEST)
5533
else
56-
CFLAGS += $(CFLAGS_OPT)
57-
FFLAGS += $(FFLAGS_OPT)
58-
endif
59-
60-
ifneq ($(OPENMP),)
61-
CFLAGS += $(CFLAGS_OPENMP)
62-
FFLAGS += $(FFLAGS_OPENMP)
63-
LDFLAGS += $(LDFLAGS_OPENMP)
34+
CFLAGS += $(CFLAGS_REPRO)
35+
FFLAGS += $(FFLAGS_REPRO)
6436
endif
6537

66-
ifneq ($(VERBOSE),)
67-
CFLAGS += $(CFLAGS_VERBOSE)
68-
FFLAGS += $(FFLAGS_VERBOSE)
69-
LDFLAGS += $(LDFLAGS_VERBOSE)
70-
endif
38+
# NetCDF Things
39+
FFLAGS += -I$(shell nf-config --includedir)
40+
CFLAGS += -I$(shell nc-config --includedir)
7141

72-
ifeq ($(NETCDF),3)
73-
# add the use_LARGEFILE cppdef
74-
ifneq ($(findstring -Duse_netCDF,$(CPPDEFS)),)
75-
CPPDEFS += -Duse_LARGEFILE
76-
endif
42+
# add the use_LARGEFILE cppdef
43+
ifneq ($(findstring -Duse_netCDF,$(CPPDEFS)),)
44+
CPPDEFS += -Duse_LARGEFILE
7745
endif
7846

7947
LIBS := $(shell nc-config --libs) $(shell nf-config --flibs)

standalone/templates/ubuntu-gnu.mk

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@ LD = mpif90 $(MAIN_PROGRAM)
1212
# flags #
1313
#########
1414
DEBUG =
15-
REPRO =
1615

1716

1817
MAKEFLAGS += --jobs=2
1918

2019
FPPFLAGS :=
2120

2221
FFLAGS := -fcray-pointer -fdefault-double-8 -fdefault-real-8 -Waliasing -ffree-line-length-none -fno-range-check
23-
FFLAGS += -I$(shell nf-config --includedir)
24-
FFLAGS_OPT = -O3
2522
FFLAGS_REPRO = -O2 -fbounds-check
2623
FFLAGS_DEBUG = -O0 -g -W -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow
2724

@@ -31,21 +28,20 @@ CFLAGS_REPRO= -O2
3128
CFLAGS_DEBUG = -O0 -g
3229

3330
LDFLAGS :=
34-
LDFLAGS_OPENMP := -fopenmp
35-
LDFLAGS_VERBOSE :=
3631

37-
ifneq ($(DEBUG),)
32+
ifeq ($(DEBUG),1)
3833
CFLAGS += $(CFLAGS_DEBUG)
3934
FFLAGS += $(FFLAGS_DEBUG)
4035
else
4136
CFLAGS += $(CFLAGS_REPRO)
4237
FFLAGS += $(FFLAGS_REPRO)
4338
endif
4439

40+
# NetCDF Things
4541
FFLAGS += -I$(shell nf-config --includedir)
4642
CFLAGS += -I$(shell nc-config --includedir)
4743

48-
# add the use_LARGEFILE cppdef
44+
# add the use_LARGEFILE cppdef
4945
ifneq ($(findstring -Duse_netCDF,$(CPPDEFS)),)
5046
CPPDEFS += -Duse_LARGEFILE
5147
endif

0 commit comments

Comments
 (0)