From 248d9ddcefd141b259805d40e7642c124f7d0ed6 Mon Sep 17 00:00:00 2001 From: heck Date: Wed, 16 Jun 2021 01:55:21 +0200 Subject: [PATCH] Tests: PityTest - static lib --- test/Makefile | 13 ++++++------- test/pitytest11/Makefile | 15 ++++++++++++--- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/test/Makefile b/test/Makefile index f9f2fb3..2368717 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,7 +1,7 @@ include ../Makefile.conf -LDFLAGS:=-L../src $(LDFLAGS) -LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter +LDFLAGS:=-L../src $(LDFLAGS) -L./pitytest11/src +LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter -lPityTest CXXFLAGS:=-I../src -DENGINE_TEST=$(ENGINE_TEST) $(CXXFLAGS) # Test @@ -22,18 +22,17 @@ OBJ_FRAMEWORK=$(subst .cc,.o,$(SRC_FRAMEWORK)) # -include $(DEPENDS) #endif -.PHONY: all clean rmtestdata pitytest pitytest_clean +.PHONY: all clean rmtestdata pitytest pitytest-clean .DEFAULT_GOAL := all -all: $(BIN_TEST) pitytest +all: $(BIN_TEST) $(BIN_TEST): $(OBJ_FRAMEWORK) pitytest: $(MAKE) -C pitytest11 - -clean: pitytest_clean +clean: rm -f $(BIN_TEST) rm -f $(OBJ_FRAMEWORK) rm -Rf *.dSYM @@ -41,7 +40,7 @@ clean: pitytest_clean rm -f *.o rm -Rf /tmp/test_pEp.* -pitytest_clean: +pitytest-clean: $(MAKE) -C pitytest11 clean rmtestdata: diff --git a/test/pitytest11/Makefile b/test/pitytest11/Makefile index 770fbc2..7cfdae5 100644 --- a/test/pitytest11/Makefile +++ b/test/pitytest11/Makefile @@ -1,8 +1,9 @@ +TARGET=src/libPityTest.a LDLIBS=-lstdc++ -lpEpAdapter LDFLAGS=-L../../src/ CXXFLAGS=-std=c++11 -g CXXFLAGS+=-I./src -TEST_EXTRA_OBJS=../framework/utils.o +#TEST_EXTRA_OBJS=../framework/utils.o # Src SRC=$(wildcard src/*.cc) @@ -16,12 +17,20 @@ TEST_OBJ=$(subst .cc,,$(TEST_SRC)) .PHONY: all clean rmtestdata .DEFAULT_GOAL := all -all: $(TEST_OBJ) -$(TEST_OBJ): $(OBJ) $(TEST_EXTRA_OBJS) +all: $(TARGET) test + +$(TARGET): $(OBJ) + $(AR) -rc $@ $^ + + +test : $(TEST_OBJ) + +$(TEST_OBJ): $(OBJ) clean: + rm -f $(TARGET) rm -f $(OBJ) rm -f $(TEST_OBJ) rm -rf src/*.dSYM