From 2c6caba90eda7a5ed1f441f1865ebd2bf01868bf Mon Sep 17 00:00:00 2001 From: Akagi201 Date: Tue, 2 Feb 2016 10:06:14 +0800 Subject: [PATCH] add library path to build successfully on Mac --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e29ad4b8..36052172 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,13 @@ B64_OBJS?=b64/cencode.o FORMAT_OBJS?=formats/json.o formats/raw.o formats/common.o formats/custom-type.o HTTP_PARSER_OBJS?=http-parser/http_parser.o -CFLAGS ?= -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -LDFLAGS ?= -levent -pthread +ifeq ($(shell uname -s), Darwin) + CFLAGS ?= -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -I/usr/local/include + LDFLAGS ?= -levent -pthread -L/usr/local/lib +else + CFLAGS ?= -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser + LDFLAGS ?= -levent -pthread +endif # check for MessagePack MSGPACK_LIB=$(shell ls /usr/lib/libmsgpack.so 2>/dev/null)