diff --git a/Makefile.cpputest b/Makefile.cpputest index eb1fadf..61d7cf8 100644 --- a/Makefile.cpputest +++ b/Makefile.cpputest @@ -1,5 +1,9 @@ .PHONY: unittest check clean_unittest +CPPUTEST_HOME ?= /usr/local + +CXXFLAGS += -I$(CPPUTEST_HOME)/include -DCPPUTEST_MEM_LEAK_DETECTION_DISABLED + OBJ_UNIT_TEST = \ unittest/helpers/fake_wire.o \ unittest/helpers/fake_connection.o \ @@ -16,8 +20,9 @@ OBJ_UNIT_TEST = \ unittest/fd_tests.o \ unittest/fd_multidrop_tests.o \ + unittest: $(OBJ_UNIT_TEST) library - $(CXX) $(CPPFLAGS) -o $(BLD)/unit_test $(OBJ_UNIT_TEST) -L$(BLD) -lm -pthread -ltinyprotocol -lCppUTest -lCppUTestExt + $(CXX) $(CPPFLAGS) -o $(BLD)/unit_test $(OBJ_UNIT_TEST) -L$(BLD) -L$(CPPUTEST_HOME)/lib -lm -pthread -ltinyprotocol -lCppUTest -lCppUTestExt check: unittest $(BLD)/unit_test