diff options
author | midipix <writeonce@midipix.org> | 2019-02-25 01:27:37 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2019-02-25 01:27:37 -0500 |
commit | ac584a4c61259908bf5c047691137f51f71faa95 (patch) | |
tree | 9cc0431026e44cac57f7d412ab8838d8eb201cc4 /project | |
parent | 8e6e57c1b3c8efd162eb80f36bbd83a16a771c8f (diff) | |
download | sbpython3-ac584a4c61259908bf5c047691137f51f71faa95.tar.bz2 sbpython3-ac584a4c61259908bf5c047691137f51f71faa95.tar.xz |
project: static linking: dlfake: initial commit.
Diffstat (limited to 'project')
-rw-r--r-- | project/extras.mk | 11 | ||||
-rw-r--r-- | project/headers.mk | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/project/extras.mk b/project/extras.mk index 12fe21f..978dc74 100644 --- a/project/extras.mk +++ b/project/extras.mk @@ -23,6 +23,13 @@ LDFLAGS_CONFIG += -Wl,-rpath -Wl,$(LIBDIR) ifeq ($(ALL_STATIC),yes) CFLAGS_STATIC += -DPY_ALL_STATIC + CFLAGS_STATIC += -I$(PROJECT_DIR)/wrappers/dlfcn + CFLAGS_STATIC += --include=dlfake.h + + DLFAKE_SRCS += $(PROJECT_DIR)/wrappers/dlfcn/dlfake.c + DLFAKE_OBJS += core/Objects/dlfake.o + STATIC_OBJS += $(DLFAKE_OBJS) + LDFLAGS_STATIC += $(PYEXT_STATIC) LDFLAGS_STATIC += $(LDFLAGS_PYEXT_STATIC) @@ -38,6 +45,10 @@ else CFLAGS_CONFIG += -DHAVE_DYNAMIC_LOADING -DSOABI=\"$(PYTHON_SOABI)\" endif +# dlfake +core/Objects/dlfake.o: $(DLFAKE_SRCS) $(ALL_HEADERS) host.tag tree.tag config.tag + $(CC) -c -o $@ $< $(CFLAGS_STATIC) + # extension objects pyext/obj/%.lo: $(SOURCE_DIR)/Modules/%.c $(ALL_HEADERS) host.tag tree.tag config.tag $(CC) -c -o $@ $< $(CFLAGS_SHARED) diff --git a/project/headers.mk b/project/headers.mk index a275e50..7078ecf 100644 --- a/project/headers.mk +++ b/project/headers.mk @@ -1,3 +1,5 @@ ifneq ($(PYTHON_MAJOR),) include $(PROJECT_DIR)/project/variants/$(PYTHON_MAJOR).$(PYTHON_MINOR).$(PYTHON_MICRO)/headers.mk endif + +INTERNAL_HEADERS += $(PROJECT_DIR)/wrappers/dlfcn/dlfake.h |