forked from crawshaw/sqlitejdbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.release
62 lines (49 loc) · 2.26 KB
/
Makefile.release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This file is a nasty piece of work I use for building SQLiteJDBC
# across multiple architectures. Best to ignore it.
include Makefile.common
afsdir := /afs/hcoop.net/user/c/cr/crawshaw
repo := $(afsdir)/repo/sqlitejdbc
files := $(afsdir)/files/sqlitejdbc
default: dist/$(sqlitejdbc).jar dist/$(sqlitejdbc)-src.tgz dist/$(sqlitejdbc)-bin.tgz
release: dist/$(sqlitejdbc).jar dist/$(sqlitejdbc)-src.tgz dist/$(sqlitejdbc)-bin.tgz
git push hcoop:$(repo)
scp dist/$(sqlitejdbc)* hcoop:$(files)/
dist/$(sqlitejdbc).jar: build/mac-universal.lib build/win-x86.lib build/linux-x86.lib build/linux-amd64.lib dist/$(sqlitejdbc)-pure.jar
cp dist/$(sqlitejdbc)-pure.jar build/$(sqlitejdbc).jar
(cd build; jar uf $(sqlitejdbc).jar *.lib)
cp build/$(sqlitejdbc).jar $@
rm build/$(sqlitejdbc).jar
dist/$(sqlitejdbc)-src.tgz:
git archive --format=tar --prefix=$(sqlitejdbc)/ HEAD | gzip > $@
dist/$(sqlitejdbc)-bin.tgz: dist/$(sqlitejdbc).jar
cp build/mac-universal.lib build/libsqlitejdbc.jnilib
cp build/win-x86.lib build/sqlitejdbc.dll
cp build/linux-x86.lib build/libsqlitejdbc.so
$(MAKE) build/$(sqlitejdbc)-native.jar
cd build; tar cfz ../$@ $(sqlitejdbc)-native.jar \
libsqlitejdbc.jnilib sqlitejdbc.dll libsqlitejdbc.so \
dist/$(sqlitejdbc)-pure.jar:
git push debian:repo/sqlitejdbc
ssh debian "cd repo/sqlitejdbc && make -f Makefile.nested test $@"
scp debian:repo/sqlitejdbc/$@ $@
build/mac-universal.lib:
@mkdir -p dist build/Darwin-universal
$(MAKE) os=Darwin arch=ppc native
$(MAKE) os=Darwin arch=i386 native
$(MAKE) os=Darwin arch=x86_64 native
lipo -create build/Darwin-ppc/$(Darwin_LIBNAME) \
build/Darwin-i386/$(Darwin_LIBNAME) \
build/Darwin-x86_64/$(Darwin_LIBNAME) \
-output $@
build/win-x86.lib:
git push debian:repo/sqlitejdbc
ssh debian "cd repo/sqlitejdbc && make os=Win arch=i586 native"
scp debian:repo/sqlitejdbc/build/Win-i586/$(Win_LIBNAME) $@
build/linux-x86.lib:
git push debian:repo/sqlitejdbc
ssh debian "cd repo/sqlitejdbc && make arch=i386 test"
scp debian:repo/sqlitejdbc/build/Default-i386/$(Default_LIBNAME) $@
build/linux-amd64.lib:
git push debian64:repo/sqlitejdbc
ssh debian64 "cd repo/sqlitejdbc && make arch=amd64 test"
scp debian64:repo/sqlitejdbc/build/Default-amd64/$(Default_LIBNAME) $@