forked from TelegramMessenger/Telegram-iOS
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Utils.makefile
40 lines (33 loc) · 1.05 KB
/
Utils.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
40
export BUCK_DEBUG_OPTIONS=\
--config custom.other_cflags="-O0 -D DEBUG" \
--config custom.other_cxxflags="-O0 -D DEBUG" \
--config custom.optimization="-Onone" \
--config custom.config_swift_compiler_flags="-DDEBUG"
export BUCK_RELEASE_OPTIONS=\
--config custom.other_cflags="-Os" \
--config custom.other_cxxflags="-Os" \
--config custom.optimization="-Osize" \
--config custom.config_swift_compiler_flags="-whole-module-optimization"
export BUCK_THREADS_OPTIONS=--config build.threads=$(shell sysctl -n hw.logicalcpu)
ifneq ($(BUCK_HTTP_CACHE),)
ifeq ($(BUCK_CACHE_MODE),)
BUCK_CACHE_MODE=readwrite
endif
export BUCK_CACHE_OPTIONS=\
--config cache.mode=http \
--config cache.http_url="$(BUCK_HTTP_CACHE)" \
--config cache.http_mode="$(BUCK_CACHE_MODE)"
endif
ifneq ($(BUCK_DIR_CACHE),)
export BUCK_CACHE_OPTIONS=\
--config cache.mode=dir \
--config cache.dir="$(BUCK_DIR_CACHE)" \
--config cache.dir_mode="readwrite"
endif
check_env:
ifndef BUCK
$(error BUCK is not set)
endif
sh check_env.sh
kill_xcode:
killall Xcode || true