-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update sdm to 3.07 * Test without the old patch * Update sdm to 3.08 * Update Makefile patch --------- Co-authored-by: Nicola Soranzo <[email protected]>
- Loading branch information
1 parent
40106eb
commit 5eb1b61
Showing
2 changed files
with
14 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,27 @@ | ||
diff --git a/Makefile b/Makefile | ||
index df16bce..5967e96 100644 | ||
index a22c3ed..53e2310 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -15,13 +15,22 @@ program_INCLUDE_DIRS := ./ | ||
program_LIBRARY_DIRS := ${CPATH} | ||
program_LIBRARIES := | ||
@@ -15,13 +15,19 @@ isa_FLAGS2 := | ||
#isa_FLAGS := -D_isa1gzip | ||
#isa_FLAGS2 := -lisal | ||
|
||
- | ||
-CPPFLAGS += -O3 -std=c++17 -lrt | ||
-CPPFLAGS += -O3 -std=c++17 -lrt $(isa_FLAGS) | ||
+UNAME := $(shell uname) | ||
+CPPFLAGS += -O3 -std=c++17 -pthread | ||
+CPPFLAGS += -O3 -std=c++17 -pthread $(isa_FLAGS) | ||
#-D_isa1gzip | ||
CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) | ||
+ifeq ($(UNAME), Darwin) | ||
+# 'shared_mutex' is available from macOS 10.12 | ||
+CPPFLAGS += -mmacosx-version-min=10.12 | ||
+endif | ||
CXXFLAGS=-D__STDC_CONSTANT_MACROS | ||
-LDFLAGS += $(foreach librarydir,$(program_LIBRARY_DIRS),-L$(librarydir)) -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive | ||
-LDFLAGS += $(foreach library,$(program_LIBRARIES),-l$(library)) | ||
+LDFLAGS += $(foreach librarydir,$(program_LIBRARY_DIRS),-L$(librarydir)) | ||
LDFLAGS += $(foreach library,$(program_LIBRARIES),-l$(library)) | ||
LDLIBS += -lz | ||
+LDLIBS += $(foreach library,$(program_LIBRARIES),-l$(library)) | ||
LDLIBS += -lz $(isa_FLAGS2) | ||
+ifeq ($(UNAME), Linux) | ||
+LDLIBS += -lrt -Wl,--whole-archive -lpthread -Wl,--no-whole-archive | ||
+else | ||
+LDLIBS += -lpthread | ||
+endif | ||
#-lisal | ||
|
||
.PHONY: all clean distclean | ||
|