summaryrefslogtreecommitdiff
path: root/project/extras.mk
blob: 8962e1bfa8e30f4436ec78b1bb3b059f452adaf6 (plain)
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
# build info
CFLAGS_COMMON += -I$(PROJECT_DIR)/profiles
CFLAGS_COMMON += -I$(SOURCE_DIR)/Include

CFLAGS_CONFIG += -DPLATFORM=\"$(PYTHON_PLATFORM)\"
CFLAGS_CONFIG += -DVERSION=\"$(PYTHON_VER)\"
CFLAGS_CONFIG += -DPREFIX=\"$(PREFIX)\"
CFLAGS_CONFIG += -DEXEC_PREFIX=\"$(EXEC_PREFIX)\"
CFLAGS_CONFIG += -DVPATH=\"$(SOURCE_DIR)\"
CFLAGS_CONFIG += -DPYTHONPATH=\"$(PYTHON_PATH)\"

# python's front-end utility
LDFLAGS_DEPS    += -Wl,--as-needed
LDFLAGS_DEPS    += -lm -lpthread -lutil -ldl -lcrypt
LDFLAGS_DEPS    += -Wl,--no-as-needed

LDFLAGS_CONFIG  += $(LDFLAGS_DEPS)
LDFLAGS_CONFIG  += -Wl,-rpath -Wl,$(LIBDIR)

ifeq ($(ALL_STATIC),yes)
	CFLAGS_STATIC	+= -DPY_ALL_STATIC
else
	COMMON_SRCS	+= $(DYNLOAD_SRCS)
	CFLAGS_CONFIG	+= -DHAVE_DYNAMIC_LOADING -DSOABI=\"$(PYTHON_SOABI)\"
endif