forked from shadowsocks/ShadowsocksX-NG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (27 loc) · 1.09 KB
/
Makefile
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
VERSION ?= 0.0.0
.PHONY: all
all: debug
.PHONY: debug
debug: deps/dist set-version
xcodebuild -workspace ShadowsocksX-NG.xcworkspace -scheme ShadowsocksX-NG -configuration Debug SYMROOT=$${PWD}/build
.PHONY: release
release: deps/dist set-version
xcodebuild -workspace ShadowsocksX-NG.xcworkspace -scheme ShadowsocksX-NG -configuration Release SYMROOT=$${PWD}/build
.PHONY: debug-dmg release-dmg
debug-dmg release-dmg: TARGET = $(subst -dmg,,$@)
debug-dmg release-dmg:
t="$(TARGET)" && t="`tr '[:lower:]' '[:upper:]' <<< $${t:0:1}`$${t:1}" \
&& rm -rf build/$${t}/ShadowsocksX-NG/ \
&& mkdir build/$${t}/ShadowsocksX-NG \
&& cp -r build/$${t}/ShadowsocksX-NG.app build/$${t}/ShadowsocksX-NG/ \
&& ln -s /Applications build/$${t}/ShadowsocksX-NG/Applications \
&& hdiutil create build/$${t}/ShadowsocksX-NG.dmg -ov -volname "ShadowsocksX-NG" -fs HFS+ -srcfolder build/$${t}/ShadowsocksX-NG/ \
&& rm -rf build/$${t}/ShadowsocksX-NG/
.PHONY: set-version
set-version:
agvtool new-marketing-version $(VERSION)
deps/dist:
$(MAKE) -C deps
.PHONY: clean
clean:
$(MAKE) -C deps clean