summaryrefslogtreecommitdiff
blob: 8460497f1d6804011a12860f84abf50ce3378782 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
commit ea514c9ded266aa365976649d88fa5593ef7ebf5
Author: hasufell <hasufell@gentoo.org>
Date:   Tue Jun 25 23:48:26 2013 +0200

    add switch to use system lua

diff --git a/makefile b/makefile
index dd4598d..bdf22d2 100644
--- a/makefile
+++ b/makefile
@@ -228,6 +228,9 @@ BUILD_JPEGLIB = 1
 # uncomment next line to build PortMidi as part of MAME/MESS build
 BUILD_MIDILIB = 1
 
+# uncomment next line to build Lua-5.2 as part of MAME/MESS build
+BUILD_LUA = 1
+
 # uncomment next line to include the symbols
 # SYMBOLS = 1
 
@@ -664,7 +667,12 @@ SOFTFLOAT = $(OBJ)/libsoftfloat.a
 FORMATS_LIB = $(OBJ)/libformats.a
 
 # add LUA library
+ifeq ($(BUILD_LUA),1)
 LUA_LIB = $(OBJ)/liblua.a
+else
+LIBS += $(shell $(PKG_CONFIG) --libs lua)
+INCPATH += $(shell $(PKG_CONFIG) --cflags lua)
+endif
 
 # add PortMidi MIDI library
 ifeq ($(BUILD_MIDILIB),1)