From 75e4385747f8b6d36160fb858496bdcfb813f35e Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 14 Oct 2008 01:52:23 +0000 Subject: [PATCH] modified the Makefile git-svn-id: http://www.xerial.org/svn/project/XerialJ/trunk/sqlite-jdbc@2519 ae02f08e-27ec-0310-ae8c-8ba02fe2eafd --- Makefile | 8 ++++++-- Makefile.package | 21 ++++++++++++++------- Makefile.version | 2 ++ sqlitejdbc/Makefile.common | 2 ++ .../resources/native/Mac/i386/libsqlitejdbc.jnilib | Bin 458996 -> 458996 bytes 5 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 Makefile.version diff --git a/Makefile b/Makefile index 7d85126..27a2ce0 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ # use JDK1.5 to build native libraries +include Makefile.version + #CURRENT_DIR = $(shell cygpath -w `pwd`) RESOURCE_DIR = src/main/resources @@ -44,15 +46,17 @@ OSInfoClass=org/xerial/db/sql/sqlite/OSInfo target/sqlitejdbc/$(OSInfoClass).class: mkdir -p target/sqlitejdbc javac src/main/java/$(OSInfoClass).java -d target/sqlitejdbc - sqlitejdbc/build/$(target)/$(LIBNAME): cd sqlitejdbc && make native +sqlitejdbc/build/$(sqlite)-$(target): + cd sqlitejdbc && make native + LIB_FOLDER = $(RESOURCE_DIR)/native/$(shell java -cp target/sqlitejdbc org.xerial.db.sql.sqlite.OSInfo) #native: sqlitejdbc/build/$(target)/$(LIBNAME) target/sqlitejdbc/$(OSInfoClass).class -native: target/sqlitejdbc/$(OSInfoClass).class +native: sqlitejdbc/build/$(sqlite)-$(target) sqlitejdbc/build/$(target)/$(LIBNAME) target/sqlitejdbc/$(OSInfoClass).class mkdir -p $(LIB_FOLDER) cp sqlitejdbc/build/$(target)/$(LIBNAME) $(LIB_FOLDER) mvn package diff --git a/Makefile.package b/Makefile.package index 3846cc5..95e5d74 100644 --- a/Makefile.package +++ b/Makefile.package @@ -1,7 +1,7 @@ -RESOURCE_DIR=src/main/resources/native +RESOURCE_DIR=src/main/resources +NATIVE_DIR=$(RESOURCE_DIR)/native RSYNC=rsync -av -e ssh --exclude=".svn" - WIN_SERVER=192.168.11.7 WIN_WORK=work/eclipse/workspace/xerial/sqlite-jdbc @@ -14,21 +14,28 @@ LINUX_WORK=work/eclipse/xerial/sqlite-jdbc AMD_SERVER=utgb01 AMD_WORK=work/eclipse/xerial/sqlite-jdbc -all: win mac linux linux-amd +BUILD_CMD = svn update && make + +all: purejava win mac linux linux-amd + +purejava: + ssh $(MAC_SERVER) "source .zprofile && cd $(MAC_WORK)/sqlitejdbc && make -f Makefile.nested" + mkdir -p $(RESOURCE_DIR)/org/sqlite + scp $(MAC_SERVER):./$(MAC_WORK)/sqlitejdbc/build/org/sqlite/SQLite.class $(RESOURCE_DIR)/org/sqlite/ win: ssh $(WIN_SERVER) "source .zprofile && cd $(WIN_WORK) && svn update && make" - $(RSYNC) $(WIN_SERVER):./$(WIN_WORK)/$(RESOURCE_DIR)/Windows/ $(RESOURCE_DIR)/Windows/ + $(RSYNC) $(WIN_SERVER):./$(WIN_WORK)/$(NATIVE_DIR)/Windows/ $(NATIVE_DIR)/Windows/ mac: ssh $(MAC_SERVER) "source .zprofile && cd $(MAC_WORK) && svn update && make" - $(RSYNC) $(MAC_SERVER):./$(MAC_WORK)/$(RESOURCE_DIR)/Mac/ $(RESOURCE_DIR)/Mac/ + $(RSYNC) $(MAC_SERVER):./$(MAC_WORK)/$(NATIVE_DIR)/Mac/ $(NATIVE_DIR)/Mac/ linux: ssh $(LINUX_SERVER) "source .zprofile && source /etc/profile.d/java.sh && cd $(LINUX_WORK) && svn update && make" - $(RSYNC) $(LINUX_SERVER):./$(LINUX_WORK)/$(RESOURCE_DIR)/Linux/i386/ $(RESOURCE_DIR)/Linux/i386/ + $(RSYNC) $(LINUX_SERVER):./$(LINUX_WORK)/$(NATIVE_DIR)/Linux/i386/ $(NATIVE_DIR)/Linux/i386/ linux-amd: ssh $(AMD_SERVER) "source .zprofile && cd $(AMD_WORK) && svn update && make" - $(RSYNC) $(AMD_SERVER):./$(AMD_WORK)/$(RESOURCE_DIR)/Linux/amd64/ $(RESOURCE_DIR)/Linux/amd64/ + $(RSYNC) $(AMD_SERVER):./$(AMD_WORK)/$(NATIVE_DIR)/Linux/amd64/ $(NATIVE_DIR)/Linux/amd64/ diff --git a/Makefile.version b/Makefile.version new file mode 100644 index 0000000..6873fff --- /dev/null +++ b/Makefile.version @@ -0,0 +1,2 @@ +sqlite_version := 3.6.3 +sqlite := sqlite-$(sqlite_version) diff --git a/sqlitejdbc/Makefile.common b/sqlitejdbc/Makefile.common index dc4a01d..5d2dec5 100644 --- a/sqlitejdbc/Makefile.common +++ b/sqlitejdbc/Makefile.common @@ -1,3 +1,5 @@ +include ../Makefile.version + ifndef JAVA_HOME $(error Set JAVA_HOME environment variable) endif diff --git a/src/main/resources/native/Mac/i386/libsqlitejdbc.jnilib b/src/main/resources/native/Mac/i386/libsqlitejdbc.jnilib index 2e37a90617de31ad0fe2ea29ddc9d2a825dfd9e6..d43be9092c36380ec6f91da69cedf89b53c13d85 100755 GIT binary patch delta 41 qcmey;DD$OJX2Ss%ChgzNhgjMVu`mKL6A&{4F^JE){SXVA(H{VBVh~9H delta 41 qcmey;DD$OJX2Ss%rd5xd53#f#VqpYgCLm@8Vi2Eo`ym!Kqdx$9^ANBA -- 2.11.0