dtm icon indicating copy to clipboard operation
dtm copied to clipboard

Compiling for the new mac architectures

Open miguelgondu opened this issue 1 year ago • 0 comments

Hi magsilva.

Just as a reference for future users (and, quite likely, myself), let me leave a record of how to compile this project for M1 and M2 mac users.

I installed gsl and gflags using brew.

brew install gsl
brew install gflags

brew places the headers and the libraries in

/opt/homebrew/Cellar/gsl/2.7.1
/opt/homebrew/Cellar/gflags/2.2.2

This means that one needs to change the Makefile's CXX flags as follows:

# Line 8 in the Makefile
CXXFLAGS += -I /opt/homebrew/Cellar/gsl/2.7.1/include -L /opt/homebrew/Cellar/gsl/2.7.1/lib -I /opt/homebrew/Cellar/gflags/2.2.2/include -L /opt/homebrew/Cellar/gflags/2.2.2/lib -I ${LIB} -I ${LIB}/math -I ${GSLWRAP_LIB}/include -I ${GSLWRAP_LIB}/include/gslwrap 

This change allows you to compile in the new architectures.

miguelgondu avatar Jan 15 '24 19:01 miguelgondu