summaryrefslogtreecommitdiffstats
path: root/src/Makefile
diff options
context:
space:
mode:
authorandmarti1424 <andmarti@gmail.com>2017-05-11 21:43:45 -0300
committerandmarti1424 <andmarti@gmail.com>2017-05-11 21:43:45 -0300
commita1f79352958c2ea17128189b341c497af5015a9f (patch)
tree34e83c8c04daa027fbf799a4cdcebdad1835d0f9 /src/Makefile
parent43abb1b0542a9890d2a0efe41a867dfaf35d2456 (diff)
Change Makefile for FreeBSD and OSX
Diffstat (limited to 'src/Makefile')
-rwxr-xr-xsrc/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile
index 2cd6346..0335b73 100755
--- a/src/Makefile
+++ b/src/Makefile
@@ -79,7 +79,9 @@ CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""tmux show-buffer"\"
CFLAGS += -DAUTOBACKUP
# Have threads? Set these two, if you want the autobackup feature to work with threads.
CFLAGS += -DHAVE_PTHREAD
+ifneq ($(shell uname -s),Darwin)
LDLIBS += -pthread
+endif
# NOTE: libxml and libzip are required for xlsx file import support
ifneq ($(shell pkg-config --exists libzip libxml-2.0 || echo 'no'),no)
@@ -98,8 +100,10 @@ ifneq ($(shell pkg-config --exists lua51 || echo 'no'),no)
CFLAGS += -DXLUA $(shell pkg-config --cflags lua51)
LDLIBS += $(shell pkg-config --libs lua51) -Wl,--export-dynamic
endif
-# dynamic linking
+# dynamic linking (should not be used in FreeBSD
+ifneq ($(shell uname -s),FreeBSD)
LDLIBS += -ldl
+endif
# Check for gnuplot existance
ifneq (, $(shell which gnuplot))