summaryrefslogtreecommitdiff
path: root/windows
diff options
context:
space:
mode:
authorShmuel Zeigerman <solomuz0@gmail.com>2015-02-26 19:52:07 +0200
committerShmuel Zeigerman <solomuz0@gmail.com>2015-02-26 19:52:07 +0200
commit0684b19e44ea5e937791a051133d31eb06c27292 (patch)
tree55a30cf02d9255b555505b7374b95423d696c68b /windows
parenta5c2a17019a42cccc8a5163bb8dc57af6f17f61d (diff)
downloadlrexlib-0684b19e44ea5e937791a051133d31eb06c27292.tar.gz
In the functions searching for multiple matches every empty match adjacent to the previous match is discarded.
Diffstat (limited to 'windows')
-rw-r--r--windows/mingw/_mingw.mak28
1 files changed, 16 insertions, 12 deletions
diff --git a/windows/mingw/_mingw.mak b/windows/mingw/_mingw.mak
index 224c7fa..bb6e5f0 100644
--- a/windows/mingw/_mingw.mak
+++ b/windows/mingw/_mingw.mak
@@ -6,27 +6,24 @@ VERSION = 2.7.2
# Target Lua version (51 for Lua 5.1; 52 for Lua 5.2).
LUAVERSION = 51
+LUADOTVERSION = $(subst 5,5.,$(LUAVERSION))
# INSTALLPATH : Path to install the built DLL.
# LUADLL : Name of Lua DLL to link to (.dll should be omitted).
# LUAEXE : Name of Lua interpreter.
# LUAINC : Path of Lua include files.
-# LIBPATH : Path of lua5.1.dll, lua52.dll, pcre.dll, etc.
+# LIBPATH : Path of lua51.dll, lua52.dll, pcre.dll, etc.
-LIBPATH = c:\exe32
+INSTALLPATH = s:\exe\lib32\lua\$(LUADOTVERSION)
+LUADLL = lua$(LUAVERSION)
+LUAINC = s:\progr\work\system\include\lua\$(LUADOTVERSION)
+LIBPATH = c:\exe32
ifeq ($(LUAVERSION),51)
- INSTALLPATH = s:\exe\lib32\lua\5.1
- LUADLL = lua5.1
LUAEXE = lua.exe
- LUAINC = s:\progr\work\system\include\lua\5.1
- MYCFLAGS += -DREX_CREATEGLOBALVAR
+ CREATEGLOBAL = -DREX_CREATEGLOBALVAR
else
- INSTALLPATH = s:\exe\lib32\lua\5.2
- LUADLL = lua52
- LUAEXE = lua52.exe
- LUAINC = s:\progr\work\system\include\lua\5.2
-# MYCFLAGS += -DREX_CREATEGLOBALVAR
+ LUAEXE = lua$(LUAVERSION).exe
endif
# --------------------------------------------------------------------------
@@ -34,8 +31,11 @@ endif
BIN = $(PROJECT).dll
BININSTALL = $(INSTALLPATH)\$(BIN)
CC = mingw32-gcc
+AR = ar rcu
+RANLIB = ranlib
CFLAGS = -W -Wall -O2 $(INCS) -DREX_OPENLIB=luaopen_$(PROJECT) \
- -DREX_LIBNAME=\"$(PROJECT)\" -DVERSION=\"$(VERSION)\" $(MYCFLAGS)
+ -DREX_LIBNAME=\"$(PROJECT)\" -DVERSION=\"$(VERSION)\" \
+ $(CREATEGLOBAL) $(MYCFLAGS)
DEFFILE = $(PROJECT).def
EXPORTED = luaopen_$(PROJECT)
INCS = -I$(LUAINC) $(MYINCS)
@@ -61,6 +61,10 @@ test:
$(BIN): $(OBJ) $(DEFFILE)
$(CC) $(DEFFILE) $(OBJ) -L$(LIBPATH) $(LIBS) -o $@ -shared
+lib$(PROJECT)$(LUAVERSION).a: $(OBJ)
+ $(AR) $@ $?
+ $(RANLIB) $@
+
$(DEFFILE):
echo EXPORTS > $@
for %%d in ($(EXPORTED)) do echo %%d>> $@