aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2025-03-06 09:32:02 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2025-03-06 09:32:02 +0100
commitfc160438406458a11921566a4644c7f15d49c244 (patch)
treeca484f902d836626a45d973235a78cc85bae6e80 /Makefile
parentdacdd54a805aac286e07582706d8a0e85d1f69a4 (diff)
downloadlanes-fc160438406458a11921566a4644c7f15d49c244.tar.gz
lanes-fc160438406458a11921566a4644c7f15d49c244.tar.bz2
lanes-fc160438406458a11921566a4644c7f15d49c244.zip
Makefile and code fixes to build the unit tests
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d7c4d6f..25dc38d 100644
--- a/Makefile
+++ b/Makefile
@@ -37,14 +37,19 @@ LUA=$(word 1,$(shell which lua5.1$(_LUAEXT)) $(shell which lua51$(_LUAEXT)) $(sh
37 37
38_TARGET_SO=$(_TARGET_DIR)/core.$(_SO) 38_TARGET_SO=$(_TARGET_DIR)/core.$(_SO)
39 39
40_UNITTEST_TARGET=$(_TARGET_DIR)/UnitTests$(_LUAEXT)
41
40_PREFIX=LUA_CPATH="./src/?.$(_SO)" LUA_PATH="./src/?.lua;./tests/?.lua" 42_PREFIX=LUA_CPATH="./src/?.$(_SO)" LUA_PATH="./src/?.lua;./tests/?.lua"
41 43
42#--- 44#---
43all: $(_TARGET_SO) 45all: $(_TARGET_SO) $(_UNITTEST_TARGET)
44 46
45$(_TARGET_SO): src/*.lua src/*.cpp src/*.h src/*.hpp 47$(_TARGET_SO): src/*.lua src/*.cpp src/*.h src/*.hpp
46 cd src && $(MAKE) LUA=$(LUA) 48 cd src && $(MAKE) LUA=$(LUA)
47 49
50$(_UNITTEST_TARGET): $(_TARGET_SO)
51 cd unit_tests && $(MAKE)
52
48clean: 53clean:
49 cd src && $(MAKE) clean 54 cd src && $(MAKE) clean
50 55
@@ -271,7 +276,7 @@ endif
271# 2.0.1: Running this (instant exit of the main Lua state) occasionally 276# 2.0.1: Running this (instant exit of the main Lua state) occasionally
272# segfaults (1:15 or so on OS X PowerPC G4). 277# segfaults (1:15 or so on OS X PowerPC G4).
273# 278#
274require: $(_TARGET_SO) 279require_module: $(_TARGET_SO)
275 $(_PREFIX) $(LUA) -e "require '$(MODULE)'" 280 $(_PREFIX) $(LUA) -e "require '$(MODULE)'"
276 281
277run: $(_TARGET_SO) 282run: $(_TARGET_SO)