forked from thp/apkenv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.mk
61 lines (46 loc) · 1.12 KB
/
config.mk
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
# Latehooks (experimental)
LATEHOOKS ?= 1
# Deprecated functions
DEPRECATED ?= 0
# Debug build (logging + debug symbols)
DEBUG ?= 0
# Destination directory when installing (used for packaging)
DESTDIR ?= /
# Destination prefix when installing
PREFIX ?= /usr
# Target platform
PLATFORM ?= osmesa
# Set to 1 for verbose compile output
V ?= 0
# Default linker flags
LDFLAGS += -fPIC -rdynamic -pthread -ldl -lz
# Default preprocessor defines
CFLAGS += -D_GNU_SOURCE
# world of goo workaround
ifeq ($(PLATFORM),sailfish)
CFLAGS += -DPLATFORM_SAILFISH
endif
ifeq ($(LATEHOOKS),1)
CFLAGS += -DAPKENV_LATEHOOKS
endif
ifeq ($(DEPRECATED),1)
CFLAGS += -DAPKENV_DEPRECATED
else
CFLAGS += -Wno-deprecated-declarations
endif
ifeq ($(DEBUG),1)
CFLAGS += -g -Wall -DLINKER_DEBUG=1 -DAPKENV_DEBUG -Wformat=0
else
CFLAGS += -O2 -DLINKER_DEBUG=0
endif
ifeq ($(V),1)
SILENTMSG := @true
SILENTCMD :=
else
SILENTMSG := @echo
SILENTCMD := @
endif
# Expose some makefile variables as C macros
CFLAGS += -DAPKENV_PREFIX=\"$(PREFIX)\"
CFLAGS += -DAPKENV_TARGET=\"$(TARGET)\"
CFLAGS += -DAPKENV_PLATFORM=\"$(PLATFORM)\"