diff options
Diffstat (limited to 'unit_tests/UnitTests.makefile')
-rw-r--r-- | unit_tests/UnitTests.makefile | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/unit_tests/UnitTests.makefile b/unit_tests/UnitTests.makefile new file mode 100644 index 0000000..b3d1c58 --- /dev/null +++ b/unit_tests/UnitTests.makefile | |||
@@ -0,0 +1,33 @@ | |||
1 | # | ||
2 | # Lanes/unit_tests/UnitTests.makefile | ||
3 | # | ||
4 | |||
5 | include ../Shared.makefile | ||
6 | |||
7 | _SRC := $(wildcard *.cpp) ../src/deep.cpp ../src/compat.cpp | ||
8 | |||
9 | _OBJ := $(_SRC:.cpp=.o) | ||
10 | |||
11 | |||
12 | _UNITTEST_TARGET := UnitTests$(_LUAEXT) | ||
13 | |||
14 | #--- | ||
15 | all: $(_UNITTEST_TARGET) | ||
16 | $(info CC: $(CC)) | ||
17 | $(info _SRC: $(_SRC)) | ||
18 | |||
19 | _pch.hpp.gch: _pch.hpp | ||
20 | $(CC) -I "../.." $(CFLAGS) -x c++-header _pch.hpp -o _pch.hpp.gch | ||
21 | |||
22 | %.o: %.cpp _pch.hpp.gch *.h *.hpp UnitTests.makefile | ||
23 | $(CC) -I "../.." $(CFLAGS) -c $< | ||
24 | |||
25 | # Note: Don't put $(LUA_LIBS) ahead of $^; MSYS will not like that (I think) | ||
26 | # | ||
27 | $(_UNITTEST_TARGET): $(_OBJ) | ||
28 | $(CC) $^ $(LIBS) $(LUA_LIBS) -o $@ | ||
29 | |||
30 | clean: | ||
31 | -rm -rf $(_UNITTEST_TARGET) *.o *.map *.gch | ||
32 | |||
33 | .PHONY: all clean | ||