File: Makefile

package info (click to toggle)
node-sqlite3 2.2.0%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,156 kB
  • ctags: 420
  • sloc: sql: 10,062; cpp: 1,881; makefile: 85; python: 8; sh: 1
file content (40 lines) | stat: -rwxr-xr-x 1,481 bytes parent folder | download
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
NODE_WEBKIT_VERSION=0.8.4

all: app.nw

node_modules/sqlite3:
	npm install https://github.com/mapbox/node-sqlite3/tarball/master

node_modules/sqlite3/lib/node_sqlite3.node: node_modules/sqlite3
	cd node_modules/sqlite3 && nw-gyp rebuild --target=$(NODE_WEBKIT_VERSION) && rm -rf build/

node-webkit-v$(NODE_WEBKIT_VERSION)-osx-ia32.zip:
	wget https://s3.amazonaws.com/node-webkit/v$(NODE_WEBKIT_VERSION)/node-webkit-v$(NODE_WEBKIT_VERSION)-osx-ia32.zip

./node-webkit.app: node-webkit-v$(NODE_WEBKIT_VERSION)-osx-ia32.zip
	unzip -o node-webkit-v$(NODE_WEBKIT_VERSION)-osx-ia32.zip

app.nw: ./node-webkit.app Makefile package.json index.html node_modules/sqlite3/lib/node_sqlite3.node
	zip app.nw index.html package.json node_modules

test: ./node-webkit.app app.nw
	./node-webkit.app/Contents/MacOS/node-webkit app.nw

package: ./node-webkit.app Makefile package.json index.html node_modules/sqlite3
	rm -rf node-sqlite-test.app
	cp -r ./node-webkit.app node-sqlite-test.app
	mkdir ./node-sqlite-test.app/Contents/Resources/app.nw/
	cp package.json ./node-sqlite-test.app/Contents/Resources/app.nw/
	cp index.html ./node-sqlite-test.app/Contents/Resources/app.nw/
	cp -r node_modules/ ./node-sqlite-test.app/Contents/Resources/app.nw/
	./node-sqlite-test.app/Contents/MacOS/node-webkit

clean:
	rm -rf ./node_modules/sqlite3/build
	rm -f ./node_modules/sqlite3/lib/node_sqlite3.node
	rm -f ./app.nw
	rm -rf node-sqlite-test.app
	rm -f credits.html
	rm -f nwsnapshot

.PHONY: test