From 8d92b2e1fa285f10e9f8703a8686e607dcc0f08b Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Fri, 20 Nov 2009 14:59:55 +0100 Subject: preparations for continuous builds and cross compilation (WIP). --- Makefile | 38 ++++++++++++++++++++ make/build-crosscompile.xml | 86 +++++++++++++++++++++++++++++++++++++++++++++ make/build.xml | 14 +++++--- make/gluegen-cpptasks.xml | 4 ++- 4 files changed, 136 insertions(+), 6 deletions(-) create mode 100644 Makefile create mode 100644 make/build-crosscompile.xml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3248e69 --- /dev/null +++ b/Makefile @@ -0,0 +1,38 @@ +BITS=32 + +ifeq ($(BITS),32) + CC=gcc32 + NS=win-x86 + SCFLAGS= +else + BITS=64 + CC=gcc64 + NS=win-x64 + SCFLAGS=-D_MSC_VER=1400 +endif + +CFLAGS=-m$(BITS) -shared -c -fno-rtti -fPIC $(SCFLAGS) -I/usr/lib/jvm/java-6-sun/include -I../common/platform-libs/jre-include/win32 +LFLAGS=-m$(BITS) -shared -fno-rtti -fPIC + +SRC1=src/native/common/CPU.c +SRC2=src/native/windows/WindowsDynamicLinkerImpl_JNI.c + +OBJ1=build/obj/$(NS)/CPU.o +OBJ2=build/obj/$(NS)/WindowsDynamicLinkerImpl_JNI.o + +BIN=build/obj/$(NS)/gluegen-rt.dll + +all: $(BIN) + +$(BIN): $(OBJ1) $(OBJ2) + $(CC) $(LFLAGS) $(OBJ1) $(OBJ2) -o $(BIN) + +$(OBJ1): $(SRC1) + $(CC) $(CFLAGS) $(SRC1) -o $(OBJ1) + +$(OBJ2): $(SRC2) + $(CC) $(CFLAGS) $(SRC2) -o $(OBJ2) + +clean: + rm -f $(BIN) $(OBJ1) $(OBJ2) + diff --git a/make/build-crosscompile.xml b/make/build-crosscompile.xml new file mode 100644 index 0000000..aba6e44 --- /dev/null +++ b/make/build-crosscompile.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/make/build.xml b/make/build.xml index 7b5f073..7832aea 100755 --- a/make/build.xml +++ b/make/build.xml @@ -329,7 +329,8 @@ - + + @@ -344,7 +345,10 @@ - + + + + @@ -352,8 +356,8 @@ - + diff --git a/make/gluegen-cpptasks.xml b/make/gluegen-cpptasks.xml index d293843..1c905b7 100755 --- a/make/gluegen-cpptasks.xml +++ b/make/gluegen-cpptasks.xml @@ -639,6 +639,7 @@ + - + + -- cgit v1.2.3