From 9b53fba7ef76fac68f7023c0faae2a5813050d4e Mon Sep 17 00:00:00 2001 From: Georgi Chorbadzhiyski Date: Tue, 11 Oct 2016 08:29:38 +0300 Subject: [PATCH] Makefile: When compiling on OS X -lrt breaks the link phase --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 53b2760..d8204b5 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,12 @@ endif RM = /bin/rm -f Q = @ +uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') +ifeq ($(uname_S),Darwin) +LIBS = -lpthread -lm +else LIBS = -lpthread -lm -lrt +endif FUNCS_DIR = libfuncs FUNCS_LIB = $(FUNCS_DIR)/libfuncs.a