aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2025-03-14 09:23:23 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2025-03-14 09:23:23 +0100
commit536a64557c82c350fd73ea64c6d4dd1737896579 (patch)
treed90e1f2ba846090be20242925182ee5208828e15 /Makefile
parentc39cb92325ba7280dae175ec5a32a97d0668981e (diff)
downloadlanes-536a64557c82c350fd73ea64c6d4dd1737896579.tar.gz
lanes-536a64557c82c350fd73ea64c6d4dd1737896579.tar.bz2
lanes-536a64557c82c350fd73ea64c6d4dd1737896579.zip
More makefile tweaks
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 13 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 0eb485f..c620f0f 100644
--- a/Makefile
+++ b/Makefile
@@ -47,39 +47,40 @@ $(info _UNITTEST_TARGET: $(_UNITTEST_TARGET))
47_DUE_TARGET := deep_userdata_example/deep_userdata_example.$(_SO) 47_DUE_TARGET := deep_userdata_example/deep_userdata_example.$(_SO)
48$(info _DUE_TARGET: $(_DUE_TARGET)) 48$(info _DUE_TARGET: $(_DUE_TARGET))
49 49
50_PREFIX := LUA_CPATH="./src/?.$(_SO)" LUA_PATH="./src/?.lua;./tests/?.lua" 50# setup LUA_PATH and LUA_CPATH so that requiring lanes and deep_userdata_example work without having to install them
51_PREFIX := LUA_CPATH="./src/?.$(_SO);./deep_userdata_example/?.$(_SO)" LUA_PATH="./src/?.lua;./tests/?.lua"
51 52
52.PHONY: all unit_tests 53.PHONY: all build_lanes build_unit_tests build_DUE
53 54
54# only build lanes itself by default 55# only build lanes itself by default
55all: $(_LANES_TARGET) 56all: build_lanes
56
57# build the unit_tests and the side deep_userdata_example module
58# also run the test that shows whether lanes is successfully loaded or not
59unit_tests: $(_UNITTEST_TARGET) $(_DUE_TARGET)
60 cd deep_userdata_example && $(MAKE) -f DUE.makefile LUA_LIBDIR=$(LUA_LIBDIR) install
61 $(_UNITTEST_TARGET) "lanes.require 'lanes'"
62 57
63#--- 58#---
64 59
65$(_LANES_TARGET): src/*.lua src/*.cpp src/*.h src/*.hpp 60build_lanes:
66 @echo ========================================================================================= 61 @echo =========================================================================================
67 cd src && $(MAKE) -f Lanes.makefile LUA=$(LUA) 62 cd src && $(MAKE) -f Lanes.makefile LUA=$(LUA)
68 @echo ==================== $(_LANES_TARGET): DONE! 63 @echo ==================== $(_LANES_TARGET): DONE!
69 @echo 64 @echo
70 65
71$(_UNITTEST_TARGET): $(_LANES_TARGET) 66build_unit_tests:
72 @echo ========================================================================================= 67 @echo =========================================================================================
73 cd unit_tests && $(MAKE) -f UnitTests.makefile 68 cd unit_tests && $(MAKE) -f UnitTests.makefile
74 @echo ==================== $(_UNITTEST_TARGET): DONE! 69 @echo ==================== $(_UNITTEST_TARGET): DONE!
75 @echo 70 @echo
76 71
77$(_DUE_TARGET): 72build_DUE:
78 @echo ========================================================================================= 73 @echo =========================================================================================
79 cd deep_userdata_example && $(MAKE) -f DUE.makefile 74 cd deep_userdata_example && $(MAKE) -f DUE.makefile
80 @echo ==================== $(_DUE_TARGET): DONE! 75 @echo ==================== $(_DUE_TARGET): DONE!
81 @echo 76 @echo
82 77
78# build the unit_tests and the side deep_userdata_example module
79# also run a test that shows whether lanes is successfully loaded or not
80run_unit_tests: build_lanes build_unit_tests build_DUE
81 @echo =========================================================================================
82 $(_PREFIX) $(_UNITTEST_TARGET) "lanes.require 'lanes'"
83
83clean: 84clean:
84 cd src && $(MAKE) -f Lanes.makefile clean 85 cd src && $(MAKE) -f Lanes.makefile clean
85 cd unit_tests && $(MAKE) -f UnitTests.makefile clean 86 cd unit_tests && $(MAKE) -f UnitTests.makefile clean