From 3d0b33e464a87705d880a55991f4562a0a16eef9 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 2 Dec 2018 09:37:39 -0500 Subject: project: properly support an all-static python executable. --- project/common.mk | 1 - project/extras.mk | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'project') diff --git a/project/common.mk b/project/common.mk index ba3493c..3f2a355 100644 --- a/project/common.mk +++ b/project/common.mk @@ -141,7 +141,6 @@ APP_SRCS = \ Modules/python.c \ COMMON_SRCS = \ - $(DYNLOAD_SRCS) \ $(CONFIG_SRCS) \ $(MODULE_SRCS) \ $(OBJECT_SRCS) \ diff --git a/project/extras.mk b/project/extras.mk index 94dcde9..6e20198 100644 --- a/project/extras.mk +++ b/project/extras.mk @@ -10,6 +10,24 @@ CFLAGS_CONFIG += -DEXEC_PREFIX=\"$(EXEC_PREFIX)\" CFLAGS_CONFIG += -DVPATH=\"$(SOURCE_DIR)\" CFLAGS_CONFIG += -DPYTHONPATH=\"$(PYTHON_PATH)\" +ifeq ($(ALL_STATIC),yes) + CFLAGS_STATIC += -I$(PROJECT_DIR)/src/static + CFLAGS_STATIC += -DPY_ALL_STATIC + + LDFLAGS_STATIC += $(PYEXT_SUBSET_STATIC) + + LDFLAGS_STATIC += $(LDFLAGS_PYEXT_STATIC) + + LDFLAGS_STATIC += $(LDFLAGS_NCURSES_STATIC) + LDFLAGS_STATIC += $(LDFLAGS_SQLITE_STATIC) + LDFLAGS_STATIC += $(LDFLAGS_EXPAT_STATIC) + LDFLAGS_STATIC += $(LDFLAGS_DBM_STATIC) + + LDFLAGS_STATIC += $(LDFLAGS_PYEXT_STATIC) +else + COMMON_SRCS += $(DYNLOAD_SRCS) + CFLAGS_CONFIG += -DHAVE_DYNAMIC_LOADING +endif # dynamically loaded extension module pyext/%$(OS_LIB_SUFFIX): LDFLAGS_SONAME = -- cgit v1.2.3