Skip to content

Commit

Permalink
Add LDFLAGS to support -lomp on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
lindstro committed Jul 21, 2022
1 parent 5190cae commit b9166ad
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions Config
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ FC = gfortran

OPTFLAGS = -O3
FLAGS = $(OPTFLAGS) -fPIC -pedantic -Wall -Wextra
LDFLAGS =
SOFLAGS =

# OpenMP compiler options -----------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ Regardless of the settings below, |libzfp| will always be built.
.. c:macro:: BUILD_SHARED_LIBS
Build shared objects (:file:`.so`, :file:`.dylib`, or :file:`.dll` files).
On macOS, the :code:`SOFLAGS` line in the :file:`Config` file may have
to be uncommented when building with GNU make.
CMake default: on.
GNU make default: off.

Expand Down
4 changes: 2 additions & 2 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ TARGETS = $(BINDIR)/array\
$(BINDIR)/speed
INCS = -I../include
LIBS = -L../lib -lzfp
CLIBS = $(LIBS) -lm
CXXLIBS = $(LIBS)
CLIBS = $(LIBS) $(LDFLAGS) -lm
CXXLIBS = $(LIBS) $(LDFLAGS)

# add cfp examples when BUILD_CFP is enabled
ifneq ($(BUILD_CFP),0)
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include ../Config
BINDIR = ../bin
TARGETS = $(BINDIR)/testzfp $(BINDIR)/testviews
INCS = -I../include -I../array
LIBS = -L../lib -lzfp
LIBS = -L../lib -lzfp $(LDFLAGS)

all: $(TARGETS)

Expand Down
2 changes: 1 addition & 1 deletion utils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include ../Config

TARGET = ../bin/zfp
INCS = -I../include
LIBS = -L../lib -lzfp -lm
LIBS = -L../lib -lzfp $(LDFLAGS) -lm

all: $(TARGET)

Expand Down

0 comments on commit b9166ad

Please sign in to comment.