From 602c241a0ba237e8c65e7db5757702c0d3a2cb2f Mon Sep 17 00:00:00 2001 From: Kyle Chisholm Date: Fri, 25 Nov 2016 04:55:38 -0500 Subject: [PATCH] fixed "make test" on Mac (clang) --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b633c80..614b7c1 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ UTILS_LIBNAME = libcjson_utils CJSON_TEST = cJSON_test UTILS_TEST = cJSON_test_utils +CJSON_TEST_SRC = cJSON.c test.c +UTILS_TEST_SRC = cJSON.c cJSON_Utils.c test_utils.c + LDLIBS = -lm LIBVERSION = 1.0.2 @@ -66,11 +69,11 @@ test: tests #tests #cJSON -$(CJSON_TEST): cJSON.c cJSON.h test.c - $(CC) $^ -o $@ $(LDLIBS) -I. +$(CJSON_TEST): $(CJSON_TEST_SRC) cJSON.h + $(CC) $(CJSON_TEST_SRC) -o $@ $(LDLIBS) -I. #cJSON_Utils -$(UTILS_TEST): cJSON.c cJSON.h test.c - $(CC) $^ -o $@ $(LDLIBS) -I. +$(UTILS_TEST): $(UTILS_TEST_SRC) cJSON.h cJSON_Utils.h + $(CC) $(UTILS_TEST_SRC) -o $@ $(LDLIBS) -I. #static libraries #cJSON -- GitLab