|
| 1 | +# Makefile variable overrides for Mac OSX compilation with CLANG. |
| 2 | +# |
| 3 | +# Note that we have not been able to link against gfortran, so if you need |
| 4 | +# fortran interfaces, use make.inc.macosx_gcc-* instead. |
| 5 | +# |
| 6 | +# Copy this file to make.inc, and if needed edit for your setup. |
| 7 | +# Barnett 10/27/18. Input from Yu-Hsuan Shih, Amit Moskovich. |
| 8 | + |
| 9 | +# (note that /usr/bin/g++,gcc are aliased to clang/LLVM, so CXX,CC unchanged) |
| 10 | + |
| 11 | +# compile flags for use with clang: (note absence of -march, etc) |
| 12 | +CFLAGS = -O3 -arch arm64 |
| 13 | + |
| 14 | +# If you're getting warning messages of the form: |
| 15 | +# ld: warning: object file (lib-static/libfinufft.a(finufft1d.o)) was built for |
| 16 | +# newer OSX version (10.13) than being linked (10.9) |
| 17 | +# Then you can uncomment the following two lines with the older version number |
| 18 | +# (in this example -mmacosx-version-min=10.9) |
| 19 | +# |
| 20 | +#CFLAGS += "-mmacosx-version-min=<OLDER OSX VERSION NUMBER>" |
| 21 | + |
| 22 | +CXX=clang++ |
| 23 | +CC=clang |
| 24 | + |
| 25 | +# taken from makefile... |
| 26 | +CFLAGS += -I include -I/usr/local/include -I/opt/homebrew/include |
| 27 | +FFLAGS = $(CFLAGS) |
| 28 | +CXXFLAGS = $(CFLAGS) |
| 29 | +LIBS += -L/usr/local/lib |
| 30 | + |
| 31 | +# OpenMP with clang needs following... |
| 32 | +OMPFLAGS = -Xpreprocessor -fopenmp |
| 33 | +OMPLIBS = -L/usr/local/lib -L/opt/homebrew/lib -lomp |
| 34 | +# since fftw3_omp doesn't work in OSX, we need... |
| 35 | +FFTWOMPSUFFIX=threads |
| 36 | + |
| 37 | + |
| 38 | +# MATLAB interface: this will probably segfault. Instead we suggest you use |
| 39 | +# make.inc.macosx_clang_matlab |
| 40 | + |
| 41 | +# Some of these will depend on your FFTW library location... |
| 42 | +MFLAGS += -I/usr/local/include -L/usr/local/lib -lm |
| 43 | +# may need to edit for your MATLAB version location... |
| 44 | +MEX = $(shell ls -d /Applications/MATLAB_R20**.app)/bin/mex |
| 45 | +# Also see docs/install.rst for possible edits to MATLAB's MEX XML file. |
0 commit comments