Skip to content

Commit

Permalink
added static linking for executable portability
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiandeorowicz committed Jul 8, 2024
1 parent 833bb4a commit 8f41ba1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ endif

CFLAGS=-O3 -std=c++11

ifeq ($(uname_S),Linux)
CFLAGS+=-fabi-version=6
CFLAGS+=-static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
endif

ifeq ($(uname_S),Darwin)
CFLAGS+= -lc -static-libgcc
ifeq ($(STATIC_LINK),true)
ifeq ($(uname_S),Linux)
CFLAGS+=-fabi-version=6
CFLAGS+=-static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
endif

ifeq ($(uname_S),Darwin)
CFLAGS+= -lc -static-libgcc
endif
endif


Expand Down
Binary file added utils/matcher
Binary file not shown.
Binary file added utils/phist
Binary file not shown.

0 comments on commit 8f41ba1

Please sign in to comment.