From b30d86ed803cf626e2cf167e83ca331388bbee68 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Tue, 14 Oct 2014 09:49:43 +0200 Subject: add NMAKE build system to tolua on Windows --- tolua/GNUmakefile | 19 +++++++++++++++++++ tolua/Makefile | 19 ------------------- tolua/Makefile.W32 | 17 +++++++++++++++++ tolua/lib/README | 1 + tolua/src/bin/GNUmakefile | 33 +++++++++++++++++++++++++++++++++ tolua/src/bin/Makefile | 33 --------------------------------- tolua/src/lib/GNUmakefile | 27 +++++++++++++++++++++++++++ tolua/src/lib/Makefile | 27 --------------------------- tolua/src/lib/Makefile.W32 | 39 +++++++++++++++++++++++++++++++++++++++ 9 files changed, 136 insertions(+), 79 deletions(-) create mode 100644 tolua/GNUmakefile delete mode 100644 tolua/Makefile create mode 100644 tolua/Makefile.W32 create mode 100644 tolua/lib/README create mode 100644 tolua/src/bin/GNUmakefile delete mode 100644 tolua/src/bin/Makefile create mode 100644 tolua/src/lib/GNUmakefile delete mode 100644 tolua/src/lib/Makefile create mode 100644 tolua/src/lib/Makefile.W32 (limited to 'tolua') diff --git a/tolua/GNUmakefile b/tolua/GNUmakefile new file mode 100644 index 0000000..40533f0 --- /dev/null +++ b/tolua/GNUmakefile @@ -0,0 +1,19 @@ +# makefile for tolua hierarchy + +tolua: + cd src/lib; make all + cd src/bin; make all + +tests: + cd src/tests; make all + +all clean klean: + cd src/lib; make $@ + cd src/bin; make $@ + cd src/tests; make $@ + +debug: + cd src/bin; make debug + + +test: diff --git a/tolua/Makefile b/tolua/Makefile deleted file mode 100644 index 40533f0..0000000 --- a/tolua/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# makefile for tolua hierarchy - -tolua: - cd src/lib; make all - cd src/bin; make all - -tests: - cd src/tests; make all - -all clean klean: - cd src/lib; make $@ - cd src/bin; make $@ - cd src/tests; make $@ - -debug: - cd src/bin; make debug - - -test: diff --git a/tolua/Makefile.W32 b/tolua/Makefile.W32 new file mode 100644 index 0000000..ac903e0 --- /dev/null +++ b/tolua/Makefile.W32 @@ -0,0 +1,17 @@ +# makefile for tolua hierarchy + +tolua: + cd src\lib; nmake all + cd src\bin; nmake all + +tests: + cd src\tests; nmake all + +all clean klean: + cd src\lib; nmake $@ + cd src\bin; nmake $@ + cd src\tests; nmake $@ + +debug: + cd src/bin; make debug + diff --git a/tolua/lib/README b/tolua/lib/README new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/tolua/lib/README @@ -0,0 +1 @@ +"" diff --git a/tolua/src/bin/GNUmakefile b/tolua/src/bin/GNUmakefile new file mode 100644 index 0000000..93daf77 --- /dev/null +++ b/tolua/src/bin/GNUmakefile @@ -0,0 +1,33 @@ +# makefile for tolua executable + +TOLUA=../.. + +include $(TOLUA)/config + +OBJS= \ + tolua.o \ + toluabind.o + +OBJS_D= \ + tolua_lua.o + +T= $(TOLUA)/bin/tolua +T_D = $(TOLUA)/bin/tolua_lua + +all: $(T) + +$(T): $(OBJS) + $(CC) -o $@ $(OBJS) $(LIB) -ltolua -llua -lm + +toluabind.c: $(T_D) + $(T_D) -o toluabind.c tolua.pkg + +$(T_D): $(OBJS_D) + $(CC) -o $@ $(OBJS_D) $(LIB) -ltolua -llua -lm + +tolua_lua.o: tolua.c + $(CC) -c -DLUA_SOURCE $(INC) -o $@ $< + +clean: + rm -f tolua_lua.o $(OBJS) $(OBJS_D) $(T) $(T_D) + diff --git a/tolua/src/bin/Makefile b/tolua/src/bin/Makefile deleted file mode 100644 index 93daf77..0000000 --- a/tolua/src/bin/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# makefile for tolua executable - -TOLUA=../.. - -include $(TOLUA)/config - -OBJS= \ - tolua.o \ - toluabind.o - -OBJS_D= \ - tolua_lua.o - -T= $(TOLUA)/bin/tolua -T_D = $(TOLUA)/bin/tolua_lua - -all: $(T) - -$(T): $(OBJS) - $(CC) -o $@ $(OBJS) $(LIB) -ltolua -llua -lm - -toluabind.c: $(T_D) - $(T_D) -o toluabind.c tolua.pkg - -$(T_D): $(OBJS_D) - $(CC) -o $@ $(OBJS_D) $(LIB) -ltolua -llua -lm - -tolua_lua.o: tolua.c - $(CC) -c -DLUA_SOURCE $(INC) -o $@ $< - -clean: - rm -f tolua_lua.o $(OBJS) $(OBJS_D) $(T) $(T_D) - diff --git a/tolua/src/lib/GNUmakefile b/tolua/src/lib/GNUmakefile new file mode 100644 index 0000000..b2091f3 --- /dev/null +++ b/tolua/src/lib/GNUmakefile @@ -0,0 +1,27 @@ +# makefile for tolua library + +TOLUA=../.. + +include $(TOLUA)/config + +OBJS= \ + tolua_event.o \ + tolua_is.o \ + tolua_map.o \ + tolua_push.o \ + tolua_to.o + +T= $(TOLUA)/lib/libtolua.a + +all: $T + +$T: $(OBJS) + $(AR) $@ $(OBJS) + $(RANLIB) $@ + +clean: + rm -f $(OBJS) + +klean: + rm -f $T + diff --git a/tolua/src/lib/Makefile b/tolua/src/lib/Makefile deleted file mode 100644 index b2091f3..0000000 --- a/tolua/src/lib/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# makefile for tolua library - -TOLUA=../.. - -include $(TOLUA)/config - -OBJS= \ - tolua_event.o \ - tolua_is.o \ - tolua_map.o \ - tolua_push.o \ - tolua_to.o - -T= $(TOLUA)/lib/libtolua.a - -all: $T - -$T: $(OBJS) - $(AR) $@ $(OBJS) - $(RANLIB) $@ - -clean: - rm -f $(OBJS) - -klean: - rm -f $T - diff --git a/tolua/src/lib/Makefile.W32 b/tolua/src/lib/Makefile.W32 new file mode 100644 index 0000000..9a92b7a --- /dev/null +++ b/tolua/src/lib/Makefile.W32 @@ -0,0 +1,39 @@ +# makefile for tolua library + +LINK= link.exe +CC= cl.exe +INCLUDE_DIRS=/I$(TOLUA)\include /I$(TOLUA)\..\lua\src +COMMON_CFLAGS= /W2 /WX /nologo /O2 /EHsc /c $(INCLUDE_DIRS) + +!IFDEF DEBUG +CFLAGS= /MDd /Zi $(COMMON_CFLAGS) +LDFLAGS = /nologo +!ELSE +CFLAGS= /MD $(COMMON_CFLAGS) +LDFLAGS = /nologo +!ENDIF + +.SUFFIXES: .c .obj + +.c.obj: + $(CC) $(CFLAGS) /Fo$@ $< + +TOLUA=..\.. + +OBJS= \ + tolua_event.obj \ + tolua_is.obj \ + tolua_map.obj \ + tolua_push.obj \ + tolua_to.obj + +T= $(TOLUA)\lib\tolua.lib + +all: $T + +$T: $(OBJS) + $(LINK) /lib $(LDFLAGS) /out:$@ $? + +clean: + @-erase $(T) *.obj 2>NUL + -- cgit v1.2.3-54-g00ecf