File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -147,8 +147,13 @@ SYCLC_FLAGS += $(SYCLC_FLAGS_INPUT)
147147ifeq ($(PETSC_USE_SHARED_LIBRARIES ) ,0)
148148OUT = $(LIBDIR ) /libpflare.a
149149else
150+ # mac osx name is different
151+ ifeq ($(shell uname -s 2>/dev/null) ,Darwin)
152+ OUT = $(LIBDIR ) /libpflare.dylib
153+ else
150154OUT = $(LIBDIR ) /libpflare.so
151155endif
156+ endif
152157
153158# Dependency generation with makedepf90
154159DEPFILE = Makefile.deps
Original file line number Diff line number Diff line change @@ -33,7 +33,17 @@ CPPFLAGS += $(CPPFLAGS_INPUT)
3333FPPFLAGS += $(FPPFLAGS_INPUT )
3434
3535# Link to pflare - order is important
36- LDLIBS := -L$(LIBDIR ) -lpflare -Wl,-rpath,$(LIBDIR ) :$(LDLIBS )
36+ LDFLAGS += -Wl,-rpath,$(LIBDIR )
37+ LDLIBS += -L$(LIBDIR ) -lpflare
38+
39+ EXISTING_LD := $(LD_LIBRARY_PATH )
40+ EXISTING_DYLD := $(DYLD_FALLBACK_LIBRARY_PATH )
41+
42+ ifeq ($(shell uname -s 2>/dev/null) ,Darwin)
43+ export DYLD_FALLBACK_LIBRARY_PATH=$(LIBDIR )$(if $(EXISTING_DYLD ) , :$(EXISTING_DYLD ) )
44+ else
45+ export LD_LIBRARY_PATH=$(LIBDIR )$(if $(EXISTING_LD ) , :$(EXISTING_LD ) )
46+ endif
3747
3848clean ::
3949 $(RM ) -f $(TEST_TARGETS )
You can’t perform that action at this time.
0 commit comments