diff options
author | shmuz <shmuz> | 2008-05-28 19:33:33 +0000 |
---|---|---|
committer | shmuz <shmuz> | 2008-05-28 19:33:33 +0000 |
commit | e2726843eb84852b7d3e0333225641d253d155e0 (patch) | |
tree | 0c879751e22489c26af535a8da984fe4050fde56 /windows | |
parent | 158d23e9ff1de04666dcc6b709d90f8a89ca2699 (diff) | |
download | lrexlib-e2726843eb84852b7d3e0333225641d253d155e0.tar.gz |
files added (as part of directory rename)
Diffstat (limited to 'windows')
-rwxr-xr-x | windows/mingw/Makefile | 22 | ||||
-rwxr-xr-x | windows/mingw/_mingw.mak | 36 | ||||
-rwxr-xr-x | windows/mingw/rex_pcre.mak | 32 | ||||
-rwxr-xr-x | windows/mingw/rex_spencer.mak | 31 |
4 files changed, 121 insertions, 0 deletions
diff --git a/windows/mingw/Makefile b/windows/mingw/Makefile new file mode 100755 index 0000000..0c7fdfb --- /dev/null +++ b/windows/mingw/Makefile @@ -0,0 +1,22 @@ +# Makefile for lrexlib + +all: build test + +build: + make -f rex_pcre.mak + make -f rex_spencer.mak + +test: + make -f rex_pcre.mak test + make -f rex_spencer.mak test + +install: + make -f rex_pcre.mak install + make -f rex_spencer.mak install + +clean: + make -f rex_pcre.mak clean + make -f rex_spencer.mak clean + + +.PHONY: all build test install clean diff --git a/windows/mingw/_mingw.mak b/windows/mingw/_mingw.mak new file mode 100755 index 0000000..389988c --- /dev/null +++ b/windows/mingw/_mingw.mak @@ -0,0 +1,36 @@ +# tested with GNU Make + +LIBS = --add-stdcall-alias $(MYLIBS) -s +INCS = $(MYINCS) +BIN = $(PROJECT).dll +DEFFILE = $(PROJECT).def +BININSTALL= $(INSTALLPATH)\$(BIN) +CC = gcc.exe +CFLAGS = $(INCS) -DREX_OPENLIB=luaopen_$(PROJECT) \ + -DREX_LIBNAME=\"$(PROJECT)\" $(MYCFLAGS) + +.PHONY: all install test clean + +vpath %.c $(SRCPATH) +vpath %.h $(SRCPATH) + +all: $(BIN) + +clean: + del $(OBJ) $(BIN) $(DEFFILE) + +install: $(BININSTALL) + +test: + cd $(TESTPATH) && lua runtest.lua $(TESTNAME) + +$(BIN): $(OBJ) $(DEFFILE) + $(CC) $(DEFFILE) $(OBJ) $(LIBS) -o $@ -shared + +$(DEFFILE): + lua -e"print('EXPORTS') for k,v in ipairs{$(EXPORTED)} do \ + print('\t'..v) end" > $@ + +$(BININSTALL): $(BIN) + copy /Y $< $@ + diff --git a/windows/mingw/rex_pcre.mak b/windows/mingw/rex_pcre.mak new file mode 100755 index 0000000..25a0d76 --- /dev/null +++ b/windows/mingw/rex_pcre.mak @@ -0,0 +1,32 @@ +# Project: rex_pcre + +# User Settings ------------------------------------------------------------ +# -1- path of Lua include files +LUAINC = s:\progr\work\system\include + +# -2- path of PCRE include files +REGEXINC = s:\progr\work\system\include + +# -3- path of lua5.1.dll and pcre.dll +DLLPATH = c:\exe + +# -4- path to install rex_pcre.dll +INSTALLPATH = s:\exe\lib\lua\5.1 +# -------------------------------------------------------------------------- + +PROJECT = rex_pcre +MYINCS = -I$(REGEXINC) -I$(LUAINC) +MYLIBS = -L$(DLLPATH) -lpcre -llua5.1 +OBJ = lpcre.o lpcre_f.o common.o +MYCFLAGS = -W -Wall -O2 +EXPORTED = 'luaopen_$(PROJECT)' +SRCPATH = ..\..\src +TESTPATH = ..\..\test +TESTNAME = pcre + +include _mingw.mak + +lpcre.o : common.h algo.h +lpcre_f.o : common.h +common.o : common.h + diff --git a/windows/mingw/rex_spencer.mak b/windows/mingw/rex_spencer.mak new file mode 100755 index 0000000..f98e70c --- /dev/null +++ b/windows/mingw/rex_spencer.mak @@ -0,0 +1,31 @@ +# Project: rex_spencer + +# User Settings ------------------------------------------------------------ +# -1- path of Lua include files +LUAINC = s:\progr\work\system\include + +# -2- path of Spencer's include files +REGEXINC = s:\progr\work\system\include\rxspencer + +# -3- path of lua5.1.dll and rxspencer.dll +DLLPATH = c:\exe + +# -4- path to install rex_spencer.dll +INSTALLPATH = s:\exe\lib\lua\5.1 +# -------------------------------------------------------------------------- + +PROJECT = rex_spencer +MYINCS = -I$(REGEXINC) -I$(LUAINC) +MYLIBS = -L$(DLLPATH) -lrxspencer -llua5.1 +OBJ = lposix.o common.o +MYCFLAGS = -W -Wall -O2 +EXPORTED = 'luaopen_$(PROJECT)' +SRCPATH = ..\..\src +TESTPATH = ..\..\test +TESTNAME = spencer + +include _mingw.mak + +lposix.o : common.h algo.h +common.o : common.h + |