Skip to content

Commit e1dd015

Browse files
James CraigJames Craig
authored andcommitted
Makefile upgrade for AppleSilicon
Thanks to Bohao.
1 parent afd34d9 commit e1dd015

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# Jan 2019 Alan J. Barton - added OS name to created exe name
1313
# Dec 2023 David Huard - support for python binding
1414
# Jul 2024 James Craig and Bohao Tang - support for lp_solve
15+
# Feb 2025 James Craig and Bohao Tang - support for new Mac (Applie Silicon)
1516
###
1617
# appname := raven_rev$(shell svnversion -n . | sed -e 's/:/-/g')_$(shell uname -o).exe
1718
appname := Raven.exe
@@ -28,13 +29,20 @@ CXXFLAGS += -std=c++11 -fPIC
2829
#CXXFLAGS += -Dnetcdf
2930
#LDLIBS += -L/usr/local -lnetcdf
3031

32+
# OPTION 1b) include netcdf - for newer MacOS with Apple Silicon (use with option 1 also uncommented)
33+
#CXXFLAGS += -I/opt/homebrew/include
34+
#LDLIBS += -L/opt/homebrew/lib
35+
3136
# OPTION 2) include lp_solve for water management optimization- uncomment following two commands (assumes liblpsolve55.a in ../lib/lp_solve_unix/ folder):
32-
CXXFLAGS += -D_LPSOLVE_
33-
LDLIBS += -L../lib/lp_solve_unix -llpsolve55
37+
#CXXFLAGS += -D_LPSOLVE_
38+
#LDLIBS += -L../lib/lp_solve_unix -llpsolve55
39+
40+
# OPTION 2b) include lp_solve for water management optimization- for newer MacOS with Apple Silicon (use with option 2 also uncommented):
41+
#LDLIBS += -L/opt/homebrew/lib
3442

3543
# OPTION 3) if you use a OSX/BSD system, uncomment the LDFLAGS line below
3644
# this is to allow for use a 1Gb stack, see http://linuxtoosx.blogspot.ca/2010/10/stack-overflow-increasing-stack-limit.html
37-
# LDFLAGS += -Wl,-stack_size,0x80000000,-stack_addr,0xf0000000
45+
#LDFLAGS += -Wl,-stack_size,0x80000000,-stack_addr,0xf0000000
3846

3947
# OPTION 4) uncomment for M1 and newer MacOS
4048
#CXXFLAGS += -Dfinite=isfinite

0 commit comments

Comments
 (0)