Browse Source

Makefile: When compiling on OS X -lrt breaks the link phase

Georgi Chorbadzhiyski 2 years ago
parent
commit
9b53fba7ef
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Makefile

+ 5 - 0
Makefile View File

@@ -13,7 +13,12 @@ endif
13 13
 RM = /bin/rm -f
14 14
 Q = @
15 15
 
16
+uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
17
+ifeq ($(uname_S),Darwin)
18
+LIBS = -lpthread -lm
19
+else
16 20
 LIBS = -lpthread -lm -lrt
21
+endif
17 22
 
18 23
 FUNCS_DIR = libfuncs
19 24
 FUNCS_LIB = $(FUNCS_DIR)/libfuncs.a