diff --git a/radio/src/Makefile b/radio/src/Makefile index f136a5f92..8e61d7d31 100644 --- a/radio/src/Makefile +++ b/radio/src/Makefile @@ -1486,5 +1486,8 @@ gtest_main.a : gtest-all.o gtest_main.o # gtest_main.a, depending on whether it defines its own main() # function. -gtests: $(BOARDSRC) $(CPPSRC) tests/gtests.cpp targets/simu/simpgmspace.cpp *.h gtest_main.a - g++ -std=gnu++0x $(CPPFLAGS) $(BOARDSRC) $(CPPSRC) tests/gtests.cpp targets/simu/simpgmspace.cpp -I$(GTEST_DIR) ${INCFLAGS} -I$(GTEST_DIR)/include -o gtests -lpthread -MD -DSIMU -lQtCore -lQtGui gtest_main.a +#use all .cpp files from tests/ dir +GTEST_TESTS_SRCS = $(shell find tests/ -type f -name '*.cpp') + +gtests: $(BOARDSRC) $(CPPSRC) $(GTEST_TESTS_SRCS) targets/simu/simpgmspace.cpp *.h gtest_main.a + g++ -std=gnu++0x $(CPPFLAGS) $(BOARDSRC) $(CPPSRC) $(GTEST_TESTS_SRCS) targets/simu/simpgmspace.cpp -I$(GTEST_DIR) ${INCFLAGS} -I$(GTEST_DIR)/include -o gtests -lpthread -MD -DSIMU -lQtCore -lQtGui gtest_main.a