summaryrefslogtreecommitdiff
path: root/config/x86_64-linux-musl
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-12-02 17:17:29 -0500
committermidipix <writeonce@midipix.org>2018-12-02 19:51:48 -0500
commit18f499e9b7f486ee4a017d42830fe2b2b6bafc9e (patch)
tree712e0e94db6ac89fb611ed771598c8e227e7071b /config/x86_64-linux-musl
parent860c315d8509c717a5036a554f21e215850faa9d (diff)
downloadsbpython2-18f499e9b7f486ee4a017d42830fe2b2b6bafc9e.tar.bz2
sbpython2-18f499e9b7f486ee4a017d42830fe2b2b6bafc9e.tar.xz
config: x86_64-linux-musl: further refactor config.mk.
Diffstat (limited to 'config/x86_64-linux-musl')
-rw-r--r--config/x86_64-linux-musl/config.mk63
1 files changed, 38 insertions, 25 deletions
diff --git a/config/x86_64-linux-musl/config.mk b/config/x86_64-linux-musl/config.mk
index 9ac2f9d..1226e7e 100644
--- a/config/x86_64-linux-musl/config.mk
+++ b/config/x86_64-linux-musl/config.mk
@@ -1,31 +1,9 @@
-include $(PROJECT_DIR)/profiles/pyexts/subsets.mk
-
+# platform
PYTHON_PATH =
PYTHON_PLATFORM = linux2
-CFLAGS_NCURSES = -I$(SYSROOT)/usr/local/include/ncurses -I$(SYSROOT)/usr/include/ncurses
-LDFLAGS_NCURSES = -Wl,--as-needed -lpanelw -lncursesw -Wl,--no-as-needed
-
-CFLAGS_SQLITE = -I$(SYSROOT)/usr/local/include/sqlite3 -I$(SYSROOT)/usr/include/sqlite3
-CFLAGS_SQLITE += -DMODULE_NAME=\"sqlite3\"
-CFLAGS_SQLITE += -DSQLITE_OMIT_LOAD_EXTENSION
-LDFLAGS_SQLITE = -lsqlite3
-
-CFLAGS_EXPAT = -DXML_DEV_URANDOM
-LDFLAGS_EXPAT = -lexpat
-
-CFLAGS_DBM = -DHAVE_NDBM_H
-LDFLAGS_DBM = -lgdbm_compat
-
-LDFLAGS_PYEXT_STATIC = -lssl -lcrypto -lreadline -lbz2 -lgdbm -lffi -lintl -lz
-LDFLAGS_NCURSES_STATIC = $(LDFLAGS_NCURSES)
-LDFLAGS_SQLITE_STATIC = $(LDFLAGS_SQLITE)
-LDFLAGS_EXPAT_STATIC = $(LDFLAGS_EXPAT)
-LDFLAGS_DBM_STATIC = $(LDFLAGS_DBM)
-
-DYNLOAD_SRCS = \
- Python/dynload_shlib.c \
+# extensions: built-in
CONFIG_SRCS = \
Modules/_codecsmodule.c \
Modules/_sre.c \
@@ -39,7 +17,14 @@ CONFIG_SRCS = \
Modules/xxsubtype.c \
Modules/zipimport.c \
-shared-lib: LDFLAGS_CONFIG += -Wl,-no-undefined
+
+# extensions: dynamic loading
+DYNLOAD_SRCS = \
+ Python/dynload_shlib.c \
+
+
+# extensions: desired subsets
+include $(PROJECT_DIR)/profiles/pyexts/subsets.mk
PYEXT_SHARED = \
$(PYEXT_SUBSET_SHARED_ANYOS_CORE) \
@@ -50,3 +35,31 @@ PYEXT_STATIC = \
$(PYEXT_SUBSET_STATIC_ANYOS_CORE) \
$(PYEXT_SUBSET_STATIC_ANYOS_AUDIO) \
$(PYEXT_SUBSET_STATIC_LINUX_AUDIO) \
+
+
+# shared extensions: dependency switches
+CFLAGS_NCURSES = -I$(SYSROOT)/usr/local/include/ncurses -I$(SYSROOT)/usr/include/ncurses
+LDFLAGS_NCURSES = -Wl,--as-needed -lpanelw -lncursesw -Wl,--no-as-needed
+
+CFLAGS_SQLITE = -I$(SYSROOT)/usr/local/include/sqlite3 -I$(SYSROOT)/usr/include/sqlite3
+CFLAGS_SQLITE += -DMODULE_NAME=\"sqlite3\"
+CFLAGS_SQLITE += -DSQLITE_OMIT_LOAD_EXTENSION
+LDFLAGS_SQLITE = -lsqlite3
+
+CFLAGS_EXPAT = -DXML_DEV_URANDOM
+LDFLAGS_EXPAT = -lexpat
+
+CFLAGS_DBM = -DHAVE_NDBM_H
+LDFLAGS_DBM = -lgdbm_compat
+
+
+# static extensions: dependency switch
+LDFLAGS_PYEXT_STATIC = -lssl -lcrypto -lreadline -lbz2 -lgdbm -lffi -lintl -lz
+LDFLAGS_NCURSES_STATIC = $(LDFLAGS_NCURSES)
+LDFLAGS_SQLITE_STATIC = $(LDFLAGS_SQLITE)
+LDFLAGS_EXPAT_STATIC = $(LDFLAGS_EXPAT)
+LDFLAGS_DBM_STATIC = $(LDFLAGS_DBM)
+
+
+# strict shared object generation
+LDFLAGS_STRICT += -Wl,-no-undefined