diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2025-03-13 16:09:03 +0100 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2025-03-13 16:09:03 +0100 |
commit | 24c8215fa05142cc2461efacc1187ef443450af9 (patch) | |
tree | cf03c78028abc7f0c0973328f9580e5acc7b4cc9 /unit_tests | |
parent | 3ad53d3db2215aa50517a646296b9c25cb3155e3 (diff) | |
download | lanes-24c8215fa05142cc2461efacc1187ef443450af9.tar.gz lanes-24c8215fa05142cc2461efacc1187ef443450af9.tar.bz2 lanes-24c8215fa05142cc2461efacc1187ef443450af9.zip |
More work on Makefiles
* renamed makefiles:
- Shared.mk → Shared.makefile
- src/Makefile → src/Lanes.makefile
- unit_tests/Makefile → unit_tests/UnitTests.makefile
- deep_userdata_example/Makefile → deep_userdata_example/DUE.makefile
* Add a makefile for deep_userdata_example
* added a target 'unit_tests' to build them (not running them yet)
* plus some minor internal improvements
Diffstat (limited to 'unit_tests')
-rw-r--r-- | unit_tests/UnitTests.makefile (renamed from unit_tests/Makefile) | 18 | ||||
-rw-r--r-- | unit_tests/UnitTests.vcxproj | 2 | ||||
-rw-r--r-- | unit_tests/UnitTests.vcxproj.filters | 2 |
3 files changed, 12 insertions, 10 deletions
diff --git a/unit_tests/Makefile b/unit_tests/UnitTests.makefile index 89106b9..b3d1c58 100644 --- a/unit_tests/Makefile +++ b/unit_tests/UnitTests.makefile | |||
@@ -1,31 +1,33 @@ | |||
1 | # | 1 | # |
2 | # Lanes/unit_tests/Makefile | 2 | # Lanes/unit_tests/UnitTests.makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | include ../Shared.mk | 5 | include ../Shared.makefile |
6 | 6 | ||
7 | SRC=$(wildcard *.cpp) ../src/deep.cpp ../src/compat.cpp | 7 | _SRC := $(wildcard *.cpp) ../src/deep.cpp ../src/compat.cpp |
8 | 8 | ||
9 | OBJ=$(SRC:.cpp=.o) | 9 | _OBJ := $(_SRC:.cpp=.o) |
10 | 10 | ||
11 | 11 | ||
12 | _UNITTEST_TARGET=UnitTests$(_LUAEXT) | 12 | _UNITTEST_TARGET := UnitTests$(_LUAEXT) |
13 | 13 | ||
14 | #--- | 14 | #--- |
15 | all: $(_UNITTEST_TARGET) | 15 | all: $(_UNITTEST_TARGET) |
16 | $(info CC: $(CC)) | ||
17 | $(info _SRC: $(_SRC)) | ||
16 | 18 | ||
17 | _pch.hpp.gch: _pch.hpp | 19 | _pch.hpp.gch: _pch.hpp |
18 | $(CC) -I "../.." $(CFLAGS) -x c++-header _pch.hpp -o _pch.hpp.gch | 20 | $(CC) -I "../.." $(CFLAGS) -x c++-header _pch.hpp -o _pch.hpp.gch |
19 | 21 | ||
20 | %.o: %.cpp _pch.hpp.gch *.h *.hpp Makefile | 22 | %.o: %.cpp _pch.hpp.gch *.h *.hpp UnitTests.makefile |
21 | $(CC) -I "../.." $(CFLAGS) -c $< | 23 | $(CC) -I "../.." $(CFLAGS) -c $< |
22 | 24 | ||
23 | # Note: Don't put $(LUA_LIBS) ahead of $^; MSYS will not like that (I think) | 25 | # Note: Don't put $(LUA_LIBS) ahead of $^; MSYS will not like that (I think) |
24 | # | 26 | # |
25 | $(_UNITTEST_TARGET): $(OBJ) | 27 | $(_UNITTEST_TARGET): $(_OBJ) |
26 | $(CC) $^ $(LIBS) $(LUA_LIBS) -o $@ | 28 | $(CC) $^ $(LIBS) $(LUA_LIBS) -o $@ |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | -rm -rf $(_UNITTEST_TARGET) *.o *.map *.gch | 31 | -rm -rf $(_UNITTEST_TARGET) *.o *.map *.gch |
30 | 32 | ||
31 | .PROXY: all clean | 33 | .PHONY: all clean |
diff --git a/unit_tests/UnitTests.vcxproj b/unit_tests/UnitTests.vcxproj index 9645a30..013a84f 100644 --- a/unit_tests/UnitTests.vcxproj +++ b/unit_tests/UnitTests.vcxproj | |||
@@ -939,7 +939,7 @@ | |||
939 | </ItemGroup> | 939 | </ItemGroup> |
940 | <ItemGroup> | 940 | <ItemGroup> |
941 | <None Include="Catch2.runsettings" /> | 941 | <None Include="Catch2.runsettings" /> |
942 | <None Include="Makefile" /> | 942 | <None Include="UnitTests.makefile" /> |
943 | <None Include="scripts\coro\basics.lua" /> | 943 | <None Include="scripts\coro\basics.lua" /> |
944 | <None Include="scripts\coro\error_handling.lua" /> | 944 | <None Include="scripts\coro\error_handling.lua" /> |
945 | <None Include="scripts\lane\cooperative_shutdown.lua" /> | 945 | <None Include="scripts\lane\cooperative_shutdown.lua" /> |
diff --git a/unit_tests/UnitTests.vcxproj.filters b/unit_tests/UnitTests.vcxproj.filters index c4e85c5..eb02d19 100644 --- a/unit_tests/UnitTests.vcxproj.filters +++ b/unit_tests/UnitTests.vcxproj.filters | |||
@@ -110,7 +110,7 @@ | |||
110 | <None Include="Catch2.runsettings"> | 110 | <None Include="Catch2.runsettings"> |
111 | <Filter>Catch2</Filter> | 111 | <Filter>Catch2</Filter> |
112 | </None> | 112 | </None> |
113 | <None Include="Makefile"> | 113 | <None Include="UnitTests.makefile"> |
114 | <Filter>Make</Filter> | 114 | <Filter>Make</Filter> |
115 | </None> | 115 | </None> |
116 | </ItemGroup> | 116 | </ItemGroup> |