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 = diff --git a/src/static/static.h b/src/static/static.h new file mode 100644 index 0000000..0108f81 --- /dev/null +++ b/src/static/static.h @@ -0,0 +1,62 @@ +PY_INIT_FUNC(init_bisect); +PY_INIT_FUNC(init_codecs_cn); +PY_INIT_FUNC(init_codecs_hk); +PY_INIT_FUNC(init_codecs_iso2022); +PY_INIT_FUNC(init_codecs_jp); +PY_INIT_FUNC(init_codecs_kr); +PY_INIT_FUNC(init_codecs_tw); +PY_INIT_FUNC(init_collections); +PY_INIT_FUNC(init_csv); +PY_INIT_FUNC(init_ctypes); +PY_INIT_FUNC(init_ctypes_test); +PY_INIT_FUNC(init_curses); +PY_INIT_FUNC(init_curses_panel); +PY_INIT_FUNC(init_elementtree); +PY_INIT_FUNC(init_functools); +PY_INIT_FUNC(init_hashlib); +PY_INIT_FUNC(init_heapq); +PY_INIT_FUNC(init_hotshot); +PY_INIT_FUNC(init_io); +PY_INIT_FUNC(init_json); +PY_INIT_FUNC(init_locale); +PY_INIT_FUNC(init_lsprof); +PY_INIT_FUNC(init_multibytecodec); +PY_INIT_FUNC(init_multiprocessing); +PY_INIT_FUNC(init_random); +PY_INIT_FUNC(init_socket); +PY_INIT_FUNC(init_sqlite3); +PY_INIT_FUNC(init_ssl); +PY_INIT_FUNC(init_struct); +PY_INIT_FUNC(init_testcapi); +PY_INIT_FUNC(initarray); +PY_INIT_FUNC(initaudioop); +PY_INIT_FUNC(initbinascii); +PY_INIT_FUNC(initbz2); +PY_INIT_FUNC(initcPickle); +PY_INIT_FUNC(initcStringIO); +PY_INIT_FUNC(initcmath); +PY_INIT_FUNC(initcrypt); +PY_INIT_FUNC(initdatetime); +PY_INIT_FUNC(initdbm); +PY_INIT_FUNC(initfcntl); +PY_INIT_FUNC(initfuture_builtins); +PY_INIT_FUNC(initgdbm); +PY_INIT_FUNC(initgrp); +PY_INIT_FUNC(inititertools); +PY_INIT_FUNC(initlinuxaudiodev); +PY_INIT_FUNC(initmath); +PY_INIT_FUNC(initmmap); +PY_INIT_FUNC(initoperator); +PY_INIT_FUNC(initossaudiodev); +PY_INIT_FUNC(initparser); +PY_INIT_FUNC(initpyexpat); +PY_INIT_FUNC(initreadline); +PY_INIT_FUNC(initresource); +PY_INIT_FUNC(initselect); +PY_INIT_FUNC(initspwd); +PY_INIT_FUNC(initstrop); +PY_INIT_FUNC(initsyslog); +PY_INIT_FUNC(inittermios); +PY_INIT_FUNC(inittime); +PY_INIT_FUNC(initunicodedata); +PY_INIT_FUNC(initzlib);