1. Taro L. Saito
  2. sqlite-jdbc

Source

sqlite-jdbc / Makefile

leo f05246a 
leo 9a35609 
leo 9518c42 
Taro L. Saito c6db4ba 
leo f3f15cc 
leo 0a8ffee 

leo 062784e 
leo 44c13d5 
leo f05246a 

leo 44c13d5 
leo f05246a 

leo 44c13d5 
leo f05246a 

leo 44c13d5 
leo f05246a 


leo bcb45ce 
leo 44c13d5 
leo f05246a 


leo b1ef1b1 
leo f05246a 
leo 8d0d505 
leo f05246a 







leo 251217f 
leo f05246a 



leo 9a35609 
leo cb2607e 
leo 251217f 


leo 64b0582 
leo a88b0cd 
leo 8c505da 
leo 9881f49 
leo 251217f 
leo 3a1eb1c 
leo 062784e 
leo 251217f 
leo 64b0582 
leo 251217f 
leo f05246a 
leo 251217f 
leo cb2607e 
leo f3f15cc 
leo 251217f 


leo 062784e 
leo 11a9f1e 
leo 251217f 
leo 3a1eb1c 
leo 251217f 

leo 8cceb6c 
leo e77150a 
leo 251217f 

leo ce9cc68 
leo 251217f 


leo ce9cc68 
leo 251217f 

leo 9242293 
leo f05246a 

leo ee92b96 


leo 0a8ffee 



leo 9a35609 
leo 7cf0d2d 
leo 1625865 
leo 7cf0d2d 
leo 9a35609 
leo f05246a 
leo 74f92b6 
leo 9a35609 
leo f05246a 
leo 0a8ffee 
# use JDK1.5 to build native libraries

include VERSION
sqlite := sqlite-$(version)

#CURRENT_DIR = $(shell cygpath -w `pwd`)
RESOURCE_DIR = src/main/resources

ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
  OS := Win
endif
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
  OS := Win
endif
ifeq ($(shell uname),Darwin)
  OS := Darwin
endif

ifeq ($(OS),)
  OS := Default
endif


ifeq ($(arch),)
arch := $(shell uname -m)
endif

target = $(OS)-$(arch)

Default_LIBNAME   := libsqlitejdbc.so
Darwin_LIBNAME   := libsqlitejdbc.jnilib
Win_LIBNAME      := sqlitejdbc.dll
LIBNAME   := $($(OS)_LIBNAME)


.phony: all package win mac linux native deploy

all: package

deploy: 
	mvn deploy 


OSInfoClass=org/sqlite/OSInfo
OSINFO_PROG=target/sqlitejdbc/$(OSInfoClass).class
SQLITE_DLL=sqlitejdbc/build/$(target)/$(LIBNAME)
SQLITE_BUILD_DIR=sqlitejdbc/build/$(sqlite)-$(target)

LIB_FOLDER = $(shell java -cp target/sqlitejdbc $(OSInfoClass))
WORK_DIR=target/dll/$(sqlite)/native
UPDATE_FLAG=target/dll/$(sqlite)/UPDATE

$(OSINFO_PROG): src/main/java/$(OSInfoClass).java
	mkdir -p target/sqlitejdbc
	javac $< -d target/sqlitejdbc

$(SQLITE_DLL): $(SQLITE_BUILD_DIR)

$(SQLITE_BUILD_DIR): Makefile sqlitejdbc/Makefile 
	cd sqlitejdbc && make native 

#$(NATIVE_DLL): $(OSINFO_PROG) $(SQLITE_DLL)
#	mkdir -p $(WORK_DIR)/$(LIB_FOLDER)
#	cp $(SQLITE_DLL) $(WORK_DIR)/$(LIB_FOLDER) 

#native: sqlitejdbc/build/$(target)/$(LIBNAME) target/sqlitejdbc/$(OSInfoClass).class

$(UPDATE_FLAG): $(OSINFO_PROG) $(SQLITE_DLL)
	mkdir -p $(WORK_DIR)/$(LIB_FOLDER)
	cp $(SQLITE_DLL) $(WORK_DIR)/$(LIB_FOLDER) 
	mkdir -p $(RESOURCE_DIR)/native/$(LIB_FOLDER)
	cp $(NATIVE_DLL) $(RESOURCE_DIR)/native/$(LIB_FOLDER)
	touch $(UPDATE_FLAG)

native: $(UPDATE_FLAG)

NATIVE_DLL=$(WORK_DIR)/$(LIB_FOLDER)/$(LIBNAME)

package: $(UPDATE_FLAG)
	mkdir -p $(RESOURCE_DIR)/native/$(LIB_FOLDER)
	cp $(NATIVE_DLL) $(RESOURCE_DIR)/native/$(LIB_FOLDER)
	rm -rf target/dependency-maven-plugin-markers
	mvn package

clean-native:
	rm -rf sqlitejdbc/build/$(sqlite)-$(target)

purejava: 
	cd sqlitejdbc && make -f Makefile.nested
	mkdir -p $(RESOURCE_DIR)/org/sqlite
	cp sqlitejdbc/build/org/sqlite/SQLite.class $(RESOURCE_DIR)/org/sqlite/

test-purejava:
	mvn -DargLine="-Dsqlite.purejava=true" test	

clean:
	cd sqlitejdbc && make clean
	rm -rf sqlitejdbc/dl
	mvn clean