-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
39 lines (32 loc) · 1.42 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
35
36
37
38
39
OTHER_LDFLAGS := -L./go/tor-static/tor -ltor \
-L./go/tor-static/zlib/dist/lib -lz \
-L./go/tor-static/libevent/dist/lib -levent \
-L./go/tor-static/openssl/dist/lib -lssl -lcrypto \
-L./go/tor-static/xz/dist/lib -llzma
.PHONY: all
all: debug
.PHONY: debug
debug: go/libgost.a
xcodebuild OTHER_LDFLAGS="$(OTHER_LDFLAGS)" -scheme GostX -project GostX.xcodeproj -configuration Debug -derivedDataPath ./build
.PHONY: release
release: go/libgost.a
xcodebuild OTHER_LDFLAGS="$(OTHER_LDFLAGS)" -scheme GostX -project GostX.xcodeproj -configuration Release -derivedDataPath ./build
.PHONY: debug-dmg release-dmg
debug-dmg release-dmg: TARGET = $(subst -dmg,,$@)
debug-dmg release-dmg:
# xcodebuild will create GostX.app under build folder
t="$(TARGET)" && t="`tr '[:lower:]' '[:upper:]' <<< $${t:0:1}`$${t:1}" \
&& rm -rf build/Build/Products/$${t}/GostX/ \
&& mkdir build/Build/Products/$${t}/GostX \
&& cp -r build/Build/Products/$${t}/GostX.app build/Build/Products/$${t}/GostX/ \
&& ln -s /Applications build/Build/Products/$${t}/GostX/Applications \
&& hdiutil create build/Build/Products/$${t}/GostX.dmg -ov -volname "GostX" -fs HFS+ -srcfolder build/Build/Products/$${t}/GostX/ \
&& rm -rf build/Build/Products/$${t}/GostX/
go/libgost.a:
cd go && $(MAKE)
.PHONY: libgost-clean
libgost-clean:
cd go && $(MAKE) clean
.PHONY: clean
clean: libgost-clean
xcodebuild clean -project GostX.xcodeproj -scheme GostX