summaryrefslogtreecommitdiff
path: root/windows/mingw/_mingw.mak
diff options
context:
space:
mode:
Diffstat (limited to 'windows/mingw/_mingw.mak')
-rw-r--r--windows/mingw/_mingw.mak30
1 files changed, 20 insertions, 10 deletions
diff --git a/windows/mingw/_mingw.mak b/windows/mingw/_mingw.mak
index 6eed649..668a8df 100644
--- a/windows/mingw/_mingw.mak
+++ b/windows/mingw/_mingw.mak
@@ -1,18 +1,28 @@
-# tested with GNU Make
+# Use with GNU Make.
# User Settings ------------------------------------------------------------
-# path of Lua include files
-LUAINC = s:\progr\work\system\include
-# name of Lua DLL to link to (.dll should be omitted)
-LUADLL = lua5.1
+# Path of Lua include files.
+# Name of Lua DLL to link to (.dll should be omitted).
+# Name of Lua interpreter.
+# Path to install the built DLL.
+
+ifeq ($(LUAVERSION),51)
+ LUAINC = s:\progr\work\system\include\lua51
+ LUADLL = lua5.1
+ LUAEXE = lua.exe
+ INSTALLPATH = s:\exe\lib\lua\5.1
+else
+ LUAINC = s:\progr\work\system\include\lua52
+ LUADLL = lua52
+ LUAEXE = lua52.exe
+ INSTALLPATH = s:\exe\lib\lua\5.2
+endif
-# path to install rex_onig.dll
-INSTALLPATH = s:\exe\lib\lua\5.1
# --------------------------------------------------------------------------
-LIBS = $(MYLIBS) -s
-INCS = $(MYINCS)
+LIBS = -l$(LUADLL) $(MYLIBS) -s
+INCS = -I$(LUAINC) $(MYINCS)
BIN = $(PROJECT).dll
DEFFILE = $(PROJECT).def
BININSTALL = $(INSTALLPATH)\$(BIN)
@@ -33,7 +43,7 @@ clean:
install: $(BININSTALL)
test:
- cd $(TESTPATH) && lua runtest.lua $(TESTNAME) -d$(CURDIR)
+ cd $(TESTPATH) && $(LUAEXE) runtest.lua $(TESTNAME) -d$(CURDIR)
$(BIN): $(OBJ) $(DEFFILE)
$(CC) $(DEFFILE) $(OBJ) $(LIBS) -o $@ -shared