From eee989154ee703f8984feba1422206bc2f4975d6 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 15 Dec 2018 05:57:59 -0500 Subject: project: generate extension objects under pyext/obj rather than Modules subdir. --- project/extras.mk | 7 +++ project/pycompile.mk | 7 ++- project/pyexts.c | 2 +- project/pyexts.mk | 174 +++++++++++++++++++++++++-------------------------- project/tree.mk | 14 ++--- 5 files changed, 108 insertions(+), 96 deletions(-) (limited to 'project') diff --git a/project/extras.mk b/project/extras.mk index 4a62747..dc30cb0 100644 --- a/project/extras.mk +++ b/project/extras.mk @@ -37,6 +37,13 @@ else CFLAGS_CONFIG += -DHAVE_DYNAMIC_LOADING endif +# top-level extension objects +pyext/obj/%.lo: $(SOURCE_DIR)/Modules/%.c $(ALL_HEADERS) host.tag tree.tag config.tag + $(CC) -c -o $@ $< $(CFLAGS_SHARED) + +pyext/obj/%.o: $(SOURCE_DIR)/Modules/%.c $(ALL_HEADERS) host.tag tree.tag config.tag + $(CC) -c -o $@ $< $(CFLAGS_STATIC) + # dynamically loaded extension module pyext/%$(OS_LIB_SUFFIX): LDFLAGS_SONAME = pyext/%$(OS_LIB_SUFFIX): LDFLAGS_DSOEXT = -Wl,-soname -Wl,$(subst pyext/,,$@) diff --git a/project/pycompile.mk b/project/pycompile.mk index fedcf80..1cf9333 100644 --- a/project/pycompile.mk +++ b/project/pycompile.mk @@ -29,6 +29,8 @@ PYCOMPILE_LDFLAGS += -lreadline -lm -lutil -lpthread $(PYCOMPILE_DIR)/tree.tag: mkdir -p $(PYCOMPILE_DIR)/bin mkdir -p $(PYCOMPILE_DIR)/lib + mkdir -p $(PYCOMPILE_DIR)/pyext + mkdir -p $(PYCOMPILE_DIR)/pyext/obj mkdir -p $(PYCOMPILE_DIR)/lib/$(NICKNAME) mkdir -p $(PYCOMPILE_DIR)/lib/$(NICKNAME)/encodings mkdir -p $(PYCOMPILE_DIR)/lib/$(NICKNAME)/lib-dynload @@ -74,6 +76,9 @@ $(PYCOMPILE_DIR)/Parser/%.o: $(SOURCE_DIR)/Parser/%.c $(ALL_HEADERS) $(PYCOMPILE $(PYCOMPILE_DIR)/Python/%.o: $(SOURCE_DIR)/Python/%.c $(ALL_HEADERS) $(PYCOMPILE_TAGS) $(NATIVE_CC) -c -o $@ $< $(PYCOMPILE_CFLAGS) +$(PYCOMPILE_DIR)/pyext/obj/%.o: $(SOURCE_DIR)/Modules/%.c $(ALL_HEADERS) $(PYCOMPILE_TAGS) + $(NATIVE_CC) -c -o $@ $< $(PYCOMPILE_CFLAGS) + PYCOMPILE_PYEXT_SRCS = \ $(PYEXT_COLLECTIONS_SRCS) \ @@ -89,11 +94,11 @@ PYCOMPILE_PYEXT_SRCS = \ PYCOMPILE_APP_OBJS = $(PYCOMPILE_APP_SRCS:Modules/%.c=$(PYCOMPILE_DIR)/Modules/%.o) PYCOMPILE_CONFIG_OBJS = $(PYCOMPILE_CONFIG_SRCS:Modules/%.c=$(PYCOMPILE_DIR)/Modules/%.o) -PYCOMPILE_PYEXT_OBJS = $(PYCOMPILE_PYEXT_SRCS:Modules/%.c=$(PYCOMPILE_DIR)/Modules/%.o) PYCOMPILE_MODULE_OBJS = $(MODULE_SRCS:Modules/%.c=$(PYCOMPILE_DIR)/Modules/%.o) PYCOMPILE_OBJECT_OBJS = $(OBJECT_SRCS:Objects/%.c=$(PYCOMPILE_DIR)/Objects/%.o) PYCOMPILE_PARSER_OBJS = $(PARSER_SRCS:Parser/%.c=$(PYCOMPILE_DIR)/Parser/%.o) PYCOMPILE_PYTHON_OBJS = $(PYTHON_SRCS:Python/%.c=$(PYCOMPILE_DIR)/Python/%.o) +PYCOMPILE_PYEXT_OBJS = $(PYCOMPILE_PYEXT_SRCS:%.c=$(PYCOMPILE_DIR)/%.o) PYCOMPILE_OBJS = \ $(PYCOMPILE_APP_OBJS) \ diff --git a/project/pyexts.c b/project/pyexts.c index 5048ffe..be4329b 100644 --- a/project/pyexts.c +++ b/project/pyexts.c @@ -249,7 +249,7 @@ int main(int argc, char ** argv) for (parg=p->srcs; *parg; parg++) printf("PYEXT_%s_SRCS%s+= " - "Modules/%s.c\n", + "pyext/obj/%s.c\n", uname,dtab,*parg); printf("\n"); diff --git a/project/pyexts.mk b/project/pyexts.mk index 3802de9..36eb6a5 100644 --- a/project/pyexts.mk +++ b/project/pyexts.mk @@ -1,5 +1,5 @@ # _multibytecodec -PYEXT_MULTIBYTECODEC_SRCS += Modules/cjkcodecs/multibytecodec.c +PYEXT_MULTIBYTECODEC_SRCS += pyext/obj/cjkcodecs/multibytecodec.c PYEXT_MULTIBYTECODEC_LOBJS = $(PYEXT_MULTIBYTECODEC_SRCS:.c=.lo) PYEXT_MULTIBYTECODEC_OBJS = $(PYEXT_MULTIBYTECODEC_SRCS:.c=.o) @@ -27,7 +27,7 @@ clean: pyext-multibytecodec-clean # _codecs_cn -PYEXT_CODECS_CN_SRCS += Modules/cjkcodecs/_codecs_cn.c +PYEXT_CODECS_CN_SRCS += pyext/obj/cjkcodecs/_codecs_cn.c PYEXT_CODECS_CN_LOBJS = $(PYEXT_CODECS_CN_SRCS:.c=.lo) PYEXT_CODECS_CN_OBJS = $(PYEXT_CODECS_CN_SRCS:.c=.o) @@ -55,7 +55,7 @@ clean: pyext-codecs_cn-clean # _codecs_hk -PYEXT_CODECS_HK_SRCS += Modules/cjkcodecs/_codecs_hk.c +PYEXT_CODECS_HK_SRCS += pyext/obj/cjkcodecs/_codecs_hk.c PYEXT_CODECS_HK_LOBJS = $(PYEXT_CODECS_HK_SRCS:.c=.lo) PYEXT_CODECS_HK_OBJS = $(PYEXT_CODECS_HK_SRCS:.c=.o) @@ -83,7 +83,7 @@ clean: pyext-codecs_hk-clean # _codecs_jp -PYEXT_CODECS_JP_SRCS += Modules/cjkcodecs/_codecs_jp.c +PYEXT_CODECS_JP_SRCS += pyext/obj/cjkcodecs/_codecs_jp.c PYEXT_CODECS_JP_LOBJS = $(PYEXT_CODECS_JP_SRCS:.c=.lo) PYEXT_CODECS_JP_OBJS = $(PYEXT_CODECS_JP_SRCS:.c=.o) @@ -111,7 +111,7 @@ clean: pyext-codecs_jp-clean # _codecs_kr -PYEXT_CODECS_KR_SRCS += Modules/cjkcodecs/_codecs_kr.c +PYEXT_CODECS_KR_SRCS += pyext/obj/cjkcodecs/_codecs_kr.c PYEXT_CODECS_KR_LOBJS = $(PYEXT_CODECS_KR_SRCS:.c=.lo) PYEXT_CODECS_KR_OBJS = $(PYEXT_CODECS_KR_SRCS:.c=.o) @@ -139,7 +139,7 @@ clean: pyext-codecs_kr-clean # _codecs_tw -PYEXT_CODECS_TW_SRCS += Modules/cjkcodecs/_codecs_tw.c +PYEXT_CODECS_TW_SRCS += pyext/obj/cjkcodecs/_codecs_tw.c PYEXT_CODECS_TW_LOBJS = $(PYEXT_CODECS_TW_SRCS:.c=.lo) PYEXT_CODECS_TW_OBJS = $(PYEXT_CODECS_TW_SRCS:.c=.o) @@ -167,7 +167,7 @@ clean: pyext-codecs_tw-clean # _codecs_iso2022 -PYEXT_CODECS_ISO2022_SRCS += Modules/cjkcodecs/_codecs_iso2022.c +PYEXT_CODECS_ISO2022_SRCS += pyext/obj/cjkcodecs/_codecs_iso2022.c PYEXT_CODECS_ISO2022_LOBJS = $(PYEXT_CODECS_ISO2022_SRCS:.c=.lo) PYEXT_CODECS_ISO2022_OBJS = $(PYEXT_CODECS_ISO2022_SRCS:.c=.o) @@ -195,7 +195,7 @@ clean: pyext-codecs_iso2022-clean # _bisect -PYEXT_BISECT_SRCS += Modules/_bisectmodule.c +PYEXT_BISECT_SRCS += pyext/obj/_bisectmodule.c PYEXT_BISECT_LOBJS = $(PYEXT_BISECT_SRCS:.c=.lo) PYEXT_BISECT_OBJS = $(PYEXT_BISECT_SRCS:.c=.o) @@ -223,7 +223,7 @@ clean: pyext-bisect-clean # _collections -PYEXT_COLLECTIONS_SRCS += Modules/_collectionsmodule.c +PYEXT_COLLECTIONS_SRCS += pyext/obj/_collectionsmodule.c PYEXT_COLLECTIONS_LOBJS = $(PYEXT_COLLECTIONS_SRCS:.c=.lo) PYEXT_COLLECTIONS_OBJS = $(PYEXT_COLLECTIONS_SRCS:.c=.o) @@ -251,7 +251,7 @@ clean: pyext-collections-clean # _csv -PYEXT_CSV_SRCS += Modules/_csv.c +PYEXT_CSV_SRCS += pyext/obj/_csv.c PYEXT_CSV_LOBJS = $(PYEXT_CSV_SRCS:.c=.lo) PYEXT_CSV_OBJS = $(PYEXT_CSV_SRCS:.c=.o) @@ -279,7 +279,7 @@ clean: pyext-csv-clean # _ctypes_test -PYEXT_CTYPES_TEST_SRCS += Modules/_ctypes/_ctypes_test.c +PYEXT_CTYPES_TEST_SRCS += pyext/obj/_ctypes/_ctypes_test.c PYEXT_CTYPES_TEST_LOBJS = $(PYEXT_CTYPES_TEST_SRCS:.c=.lo) PYEXT_CTYPES_TEST_OBJS = $(PYEXT_CTYPES_TEST_SRCS:.c=.o) @@ -307,7 +307,7 @@ clean: pyext-ctypes_test-clean # _functools -PYEXT_FUNCTOOLS_SRCS += Modules/_functoolsmodule.c +PYEXT_FUNCTOOLS_SRCS += pyext/obj/_functoolsmodule.c PYEXT_FUNCTOOLS_LOBJS = $(PYEXT_FUNCTOOLS_SRCS:.c=.lo) PYEXT_FUNCTOOLS_OBJS = $(PYEXT_FUNCTOOLS_SRCS:.c=.o) @@ -335,7 +335,7 @@ clean: pyext-functools-clean # _heapq -PYEXT_HEAPQ_SRCS += Modules/_heapqmodule.c +PYEXT_HEAPQ_SRCS += pyext/obj/_heapqmodule.c PYEXT_HEAPQ_LOBJS = $(PYEXT_HEAPQ_SRCS:.c=.lo) PYEXT_HEAPQ_OBJS = $(PYEXT_HEAPQ_SRCS:.c=.o) @@ -363,7 +363,7 @@ clean: pyext-heapq-clean # _hotshot -PYEXT_HOTSHOT_SRCS += Modules/_hotshot.c +PYEXT_HOTSHOT_SRCS += pyext/obj/_hotshot.c PYEXT_HOTSHOT_LOBJS = $(PYEXT_HOTSHOT_SRCS:.c=.lo) PYEXT_HOTSHOT_OBJS = $(PYEXT_HOTSHOT_SRCS:.c=.o) @@ -391,7 +391,7 @@ clean: pyext-hotshot-clean # _json -PYEXT_JSON_SRCS += Modules/_json.c +PYEXT_JSON_SRCS += pyext/obj/_json.c PYEXT_JSON_LOBJS = $(PYEXT_JSON_SRCS:.c=.lo) PYEXT_JSON_OBJS = $(PYEXT_JSON_SRCS:.c=.o) @@ -419,7 +419,7 @@ clean: pyext-json-clean # _locale -PYEXT_LOCALE_SRCS += Modules/_localemodule.c +PYEXT_LOCALE_SRCS += pyext/obj/_localemodule.c PYEXT_LOCALE_LOBJS = $(PYEXT_LOCALE_SRCS:.c=.lo) PYEXT_LOCALE_OBJS = $(PYEXT_LOCALE_SRCS:.c=.o) @@ -447,8 +447,8 @@ clean: pyext-locale-clean # _lsprof -PYEXT_LSPROF_SRCS += Modules/_lsprof.c -PYEXT_LSPROF_SRCS += Modules/rotatingtree.c +PYEXT_LSPROF_SRCS += pyext/obj/_lsprof.c +PYEXT_LSPROF_SRCS += pyext/obj/rotatingtree.c PYEXT_LSPROF_LOBJS = $(PYEXT_LSPROF_SRCS:.c=.lo) PYEXT_LSPROF_OBJS = $(PYEXT_LSPROF_SRCS:.c=.o) @@ -476,7 +476,7 @@ clean: pyext-lsprof-clean # _random -PYEXT_RANDOM_SRCS += Modules/_randommodule.c +PYEXT_RANDOM_SRCS += pyext/obj/_randommodule.c PYEXT_RANDOM_LOBJS = $(PYEXT_RANDOM_SRCS:.c=.lo) PYEXT_RANDOM_OBJS = $(PYEXT_RANDOM_SRCS:.c=.o) @@ -504,8 +504,8 @@ clean: pyext-random-clean # _socket -PYEXT_SOCKET_SRCS += Modules/socketmodule.c -PYEXT_SOCKET_SRCS += Modules/timemodule.c +PYEXT_SOCKET_SRCS += pyext/obj/socketmodule.c +PYEXT_SOCKET_SRCS += pyext/obj/timemodule.c PYEXT_SOCKET_LOBJS = $(PYEXT_SOCKET_SRCS:.c=.lo) PYEXT_SOCKET_OBJS = $(PYEXT_SOCKET_SRCS:.c=.o) @@ -533,7 +533,7 @@ clean: pyext-socket-clean # _struct -PYEXT_STRUCT_SRCS += Modules/_struct.c +PYEXT_STRUCT_SRCS += pyext/obj/_struct.c PYEXT_STRUCT_LOBJS = $(PYEXT_STRUCT_SRCS:.c=.lo) PYEXT_STRUCT_OBJS = $(PYEXT_STRUCT_SRCS:.c=.o) @@ -561,7 +561,7 @@ clean: pyext-struct-clean # _testcapi -PYEXT_TESTCAPI_SRCS += Modules/_testcapimodule.c +PYEXT_TESTCAPI_SRCS += pyext/obj/_testcapimodule.c PYEXT_TESTCAPI_LOBJS = $(PYEXT_TESTCAPI_SRCS:.c=.lo) PYEXT_TESTCAPI_OBJS = $(PYEXT_TESTCAPI_SRCS:.c=.o) @@ -589,7 +589,7 @@ clean: pyext-testcapi-clean # array -PYEXT_ARRAY_SRCS += Modules/arraymodule.c +PYEXT_ARRAY_SRCS += pyext/obj/arraymodule.c PYEXT_ARRAY_LOBJS = $(PYEXT_ARRAY_SRCS:.c=.lo) PYEXT_ARRAY_OBJS = $(PYEXT_ARRAY_SRCS:.c=.o) @@ -617,7 +617,7 @@ clean: pyext-array-clean # audioop -PYEXT_AUDIOOP_SRCS += Modules/audioop.c +PYEXT_AUDIOOP_SRCS += pyext/obj/audioop.c PYEXT_AUDIOOP_LOBJS = $(PYEXT_AUDIOOP_SRCS:.c=.lo) PYEXT_AUDIOOP_OBJS = $(PYEXT_AUDIOOP_SRCS:.c=.o) @@ -645,7 +645,7 @@ clean: pyext-audioop-clean # binascii -PYEXT_BINASCII_SRCS += Modules/binascii.c +PYEXT_BINASCII_SRCS += pyext/obj/binascii.c PYEXT_BINASCII_LOBJS = $(PYEXT_BINASCII_SRCS:.c=.lo) PYEXT_BINASCII_OBJS = $(PYEXT_BINASCII_SRCS:.c=.o) @@ -673,7 +673,7 @@ clean: pyext-binascii-clean # cPickle -PYEXT_CPICKLE_SRCS += Modules/cPickle.c +PYEXT_CPICKLE_SRCS += pyext/obj/cPickle.c PYEXT_CPICKLE_LOBJS = $(PYEXT_CPICKLE_SRCS:.c=.lo) PYEXT_CPICKLE_OBJS = $(PYEXT_CPICKLE_SRCS:.c=.o) @@ -701,7 +701,7 @@ clean: pyext-cPickle-clean # cStringIO -PYEXT_CSTRINGIO_SRCS += Modules/cStringIO.c +PYEXT_CSTRINGIO_SRCS += pyext/obj/cStringIO.c PYEXT_CSTRINGIO_LOBJS = $(PYEXT_CSTRINGIO_SRCS:.c=.lo) PYEXT_CSTRINGIO_OBJS = $(PYEXT_CSTRINGIO_SRCS:.c=.o) @@ -729,8 +729,8 @@ clean: pyext-cStringIO-clean # cmath -PYEXT_CMATH_SRCS += Modules/cmathmodule.c -PYEXT_CMATH_SRCS += Modules/_math.c +PYEXT_CMATH_SRCS += pyext/obj/cmathmodule.c +PYEXT_CMATH_SRCS += pyext/obj/_math.c PYEXT_CMATH_LOBJS = $(PYEXT_CMATH_SRCS:.c=.lo) PYEXT_CMATH_OBJS = $(PYEXT_CMATH_SRCS:.c=.o) @@ -758,7 +758,7 @@ clean: pyext-cmath-clean # crypt -PYEXT_CRYPT_SRCS += Modules/cryptmodule.c +PYEXT_CRYPT_SRCS += pyext/obj/cryptmodule.c PYEXT_CRYPT_LOBJS = $(PYEXT_CRYPT_SRCS:.c=.lo) PYEXT_CRYPT_OBJS = $(PYEXT_CRYPT_SRCS:.c=.o) @@ -786,8 +786,8 @@ clean: pyext-crypt-clean # datetime -PYEXT_DATETIME_SRCS += Modules/datetimemodule.c -PYEXT_DATETIME_SRCS += Modules/timemodule.c +PYEXT_DATETIME_SRCS += pyext/obj/datetimemodule.c +PYEXT_DATETIME_SRCS += pyext/obj/timemodule.c PYEXT_DATETIME_LOBJS = $(PYEXT_DATETIME_SRCS:.c=.lo) PYEXT_DATETIME_OBJS = $(PYEXT_DATETIME_SRCS:.c=.o) @@ -815,7 +815,7 @@ clean: pyext-datetime-clean # fcntl -PYEXT_FCNTL_SRCS += Modules/fcntlmodule.c +PYEXT_FCNTL_SRCS += pyext/obj/fcntlmodule.c PYEXT_FCNTL_LOBJS = $(PYEXT_FCNTL_SRCS:.c=.lo) PYEXT_FCNTL_OBJS = $(PYEXT_FCNTL_SRCS:.c=.o) @@ -843,7 +843,7 @@ clean: pyext-fcntl-clean # future_builtins -PYEXT_FUTURE_BUILTINS_SRCS += Modules/future_builtins.c +PYEXT_FUTURE_BUILTINS_SRCS += pyext/obj/future_builtins.c PYEXT_FUTURE_BUILTINS_LOBJS = $(PYEXT_FUTURE_BUILTINS_SRCS:.c=.lo) PYEXT_FUTURE_BUILTINS_OBJS = $(PYEXT_FUTURE_BUILTINS_SRCS:.c=.o) @@ -871,7 +871,7 @@ clean: pyext-future_builtins-clean # grp -PYEXT_GRP_SRCS += Modules/grpmodule.c +PYEXT_GRP_SRCS += pyext/obj/grpmodule.c PYEXT_GRP_LOBJS = $(PYEXT_GRP_SRCS:.c=.lo) PYEXT_GRP_OBJS = $(PYEXT_GRP_SRCS:.c=.o) @@ -899,7 +899,7 @@ clean: pyext-grp-clean # itertools -PYEXT_ITERTOOLS_SRCS += Modules/itertoolsmodule.c +PYEXT_ITERTOOLS_SRCS += pyext/obj/itertoolsmodule.c PYEXT_ITERTOOLS_LOBJS = $(PYEXT_ITERTOOLS_SRCS:.c=.lo) PYEXT_ITERTOOLS_OBJS = $(PYEXT_ITERTOOLS_SRCS:.c=.o) @@ -927,8 +927,8 @@ clean: pyext-itertools-clean # math -PYEXT_MATH_SRCS += Modules/mathmodule.c -PYEXT_MATH_SRCS += Modules/_math.c +PYEXT_MATH_SRCS += pyext/obj/mathmodule.c +PYEXT_MATH_SRCS += pyext/obj/_math.c PYEXT_MATH_LOBJS = $(PYEXT_MATH_SRCS:.c=.lo) PYEXT_MATH_OBJS = $(PYEXT_MATH_SRCS:.c=.o) @@ -956,7 +956,7 @@ clean: pyext-math-clean # mmap -PYEXT_MMAP_SRCS += Modules/mmapmodule.c +PYEXT_MMAP_SRCS += pyext/obj/mmapmodule.c PYEXT_MMAP_LOBJS = $(PYEXT_MMAP_SRCS:.c=.lo) PYEXT_MMAP_OBJS = $(PYEXT_MMAP_SRCS:.c=.o) @@ -984,7 +984,7 @@ clean: pyext-mmap-clean # operator -PYEXT_OPERATOR_SRCS += Modules/operator.c +PYEXT_OPERATOR_SRCS += pyext/obj/operator.c PYEXT_OPERATOR_LOBJS = $(PYEXT_OPERATOR_SRCS:.c=.lo) PYEXT_OPERATOR_OBJS = $(PYEXT_OPERATOR_SRCS:.c=.o) @@ -1012,7 +1012,7 @@ clean: pyext-operator-clean # ossaudiodev -PYEXT_OSSAUDIODEV_SRCS += Modules/ossaudiodev.c +PYEXT_OSSAUDIODEV_SRCS += pyext/obj/ossaudiodev.c PYEXT_OSSAUDIODEV_LOBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.lo) PYEXT_OSSAUDIODEV_OBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.o) @@ -1040,7 +1040,7 @@ clean: pyext-ossaudiodev-clean # parser -PYEXT_PARSER_SRCS += Modules/parsermodule.c +PYEXT_PARSER_SRCS += pyext/obj/parsermodule.c PYEXT_PARSER_LOBJS = $(PYEXT_PARSER_SRCS:.c=.lo) PYEXT_PARSER_OBJS = $(PYEXT_PARSER_SRCS:.c=.o) @@ -1068,7 +1068,7 @@ clean: pyext-parser-clean # resource -PYEXT_RESOURCE_SRCS += Modules/resource.c +PYEXT_RESOURCE_SRCS += pyext/obj/resource.c PYEXT_RESOURCE_LOBJS = $(PYEXT_RESOURCE_SRCS:.c=.lo) PYEXT_RESOURCE_OBJS = $(PYEXT_RESOURCE_SRCS:.c=.o) @@ -1096,7 +1096,7 @@ clean: pyext-resource-clean # select -PYEXT_SELECT_SRCS += Modules/selectmodule.c +PYEXT_SELECT_SRCS += pyext/obj/selectmodule.c PYEXT_SELECT_LOBJS = $(PYEXT_SELECT_SRCS:.c=.lo) PYEXT_SELECT_OBJS = $(PYEXT_SELECT_SRCS:.c=.o) @@ -1124,7 +1124,7 @@ clean: pyext-select-clean # spwd -PYEXT_SPWD_SRCS += Modules/spwdmodule.c +PYEXT_SPWD_SRCS += pyext/obj/spwdmodule.c PYEXT_SPWD_LOBJS = $(PYEXT_SPWD_SRCS:.c=.lo) PYEXT_SPWD_OBJS = $(PYEXT_SPWD_SRCS:.c=.o) @@ -1152,7 +1152,7 @@ clean: pyext-spwd-clean # strop -PYEXT_STROP_SRCS += Modules/stropmodule.c +PYEXT_STROP_SRCS += pyext/obj/stropmodule.c PYEXT_STROP_LOBJS = $(PYEXT_STROP_SRCS:.c=.lo) PYEXT_STROP_OBJS = $(PYEXT_STROP_SRCS:.c=.o) @@ -1180,7 +1180,7 @@ clean: pyext-strop-clean # syslog -PYEXT_SYSLOG_SRCS += Modules/syslogmodule.c +PYEXT_SYSLOG_SRCS += pyext/obj/syslogmodule.c PYEXT_SYSLOG_LOBJS = $(PYEXT_SYSLOG_SRCS:.c=.lo) PYEXT_SYSLOG_OBJS = $(PYEXT_SYSLOG_SRCS:.c=.o) @@ -1208,7 +1208,7 @@ clean: pyext-syslog-clean # termios -PYEXT_TERMIOS_SRCS += Modules/termios.c +PYEXT_TERMIOS_SRCS += pyext/obj/termios.c PYEXT_TERMIOS_LOBJS = $(PYEXT_TERMIOS_SRCS:.c=.lo) PYEXT_TERMIOS_OBJS = $(PYEXT_TERMIOS_SRCS:.c=.o) @@ -1236,7 +1236,7 @@ clean: pyext-termios-clean # time -PYEXT_TIME_SRCS += Modules/timemodule.c +PYEXT_TIME_SRCS += pyext/obj/timemodule.c PYEXT_TIME_LOBJS = $(PYEXT_TIME_SRCS:.c=.lo) PYEXT_TIME_OBJS = $(PYEXT_TIME_SRCS:.c=.o) @@ -1264,7 +1264,7 @@ clean: pyext-time-clean # unicodedata -PYEXT_UNICODEDATA_SRCS += Modules/unicodedata.c +PYEXT_UNICODEDATA_SRCS += pyext/obj/unicodedata.c PYEXT_UNICODEDATA_LOBJS = $(PYEXT_UNICODEDATA_SRCS:.c=.lo) PYEXT_UNICODEDATA_OBJS = $(PYEXT_UNICODEDATA_SRCS:.c=.o) @@ -1292,7 +1292,7 @@ clean: pyext-unicodedata-clean # _curses -PYEXT_CURSES_SRCS += Modules/_cursesmodule.c +PYEXT_CURSES_SRCS += pyext/obj/_cursesmodule.c PYEXT_CURSES_LOBJS = $(PYEXT_CURSES_SRCS:.c=.lo) PYEXT_CURSES_OBJS = $(PYEXT_CURSES_SRCS:.c=.o) @@ -1324,7 +1324,7 @@ clean: pyext-curses-clean # _curses_panel -PYEXT_CURSES_PANEL_SRCS += Modules/_curses_panel.c +PYEXT_CURSES_PANEL_SRCS += pyext/obj/_curses_panel.c PYEXT_CURSES_PANEL_LOBJS = $(PYEXT_CURSES_PANEL_SRCS:.c=.lo) PYEXT_CURSES_PANEL_OBJS = $(PYEXT_CURSES_PANEL_SRCS:.c=.o) @@ -1356,7 +1356,7 @@ clean: pyext-curses_panel-clean # _elementtree -PYEXT_ELEMENTTREE_SRCS += Modules/_elementtree.c +PYEXT_ELEMENTTREE_SRCS += pyext/obj/_elementtree.c PYEXT_ELEMENTTREE_LOBJS = $(PYEXT_ELEMENTTREE_SRCS:.c=.lo) PYEXT_ELEMENTTREE_OBJS = $(PYEXT_ELEMENTTREE_SRCS:.c=.o) @@ -1388,7 +1388,7 @@ clean: pyext-elementtree-clean # _hashlib -PYEXT_HASHLIB_SRCS += Modules/_hashopenssl.c +PYEXT_HASHLIB_SRCS += pyext/obj/_hashopenssl.c PYEXT_HASHLIB_LOBJS = $(PYEXT_HASHLIB_SRCS:.c=.lo) PYEXT_HASHLIB_OBJS = $(PYEXT_HASHLIB_SRCS:.c=.o) @@ -1418,7 +1418,7 @@ clean: pyext-hashlib-clean # _ssl -PYEXT_SSL_SRCS += Modules/_ssl.c +PYEXT_SSL_SRCS += pyext/obj/_ssl.c PYEXT_SSL_LOBJS = $(PYEXT_SSL_SRCS:.c=.lo) PYEXT_SSL_OBJS = $(PYEXT_SSL_SRCS:.c=.o) @@ -1448,7 +1448,7 @@ clean: pyext-ssl-clean # bz2 -PYEXT_BZ2_SRCS += Modules/bz2module.c +PYEXT_BZ2_SRCS += pyext/obj/bz2module.c PYEXT_BZ2_LOBJS = $(PYEXT_BZ2_SRCS:.c=.lo) PYEXT_BZ2_OBJS = $(PYEXT_BZ2_SRCS:.c=.o) @@ -1478,7 +1478,7 @@ clean: pyext-bz2-clean # gdbm -PYEXT_GDBM_SRCS += Modules/gdbmmodule.c +PYEXT_GDBM_SRCS += pyext/obj/gdbmmodule.c PYEXT_GDBM_LOBJS = $(PYEXT_GDBM_SRCS:.c=.lo) PYEXT_GDBM_OBJS = $(PYEXT_GDBM_SRCS:.c=.o) @@ -1508,7 +1508,7 @@ clean: pyext-gdbm-clean # readline -PYEXT_READLINE_SRCS += Modules/readline.c +PYEXT_READLINE_SRCS += pyext/obj/readline.c PYEXT_READLINE_LOBJS = $(PYEXT_READLINE_SRCS:.c=.lo) PYEXT_READLINE_OBJS = $(PYEXT_READLINE_SRCS:.c=.o) @@ -1538,7 +1538,7 @@ clean: pyext-readline-clean # pyexpat -PYEXT_PYEXPAT_SRCS += Modules/pyexpat.c +PYEXT_PYEXPAT_SRCS += pyext/obj/pyexpat.c PYEXT_PYEXPAT_LOBJS = $(PYEXT_PYEXPAT_SRCS:.c=.lo) PYEXT_PYEXPAT_OBJS = $(PYEXT_PYEXPAT_SRCS:.c=.o) @@ -1568,7 +1568,7 @@ clean: pyext-pyexpat-clean # zlib -PYEXT_ZLIB_SRCS += Modules/zlibmodule.c +PYEXT_ZLIB_SRCS += pyext/obj/zlibmodule.c PYEXT_ZLIB_LOBJS = $(PYEXT_ZLIB_SRCS:.c=.lo) PYEXT_ZLIB_OBJS = $(PYEXT_ZLIB_SRCS:.c=.o) @@ -1598,11 +1598,11 @@ clean: pyext-zlib-clean # _ctypes -PYEXT_CTYPES_SRCS += Modules/_ctypes/_ctypes.c -PYEXT_CTYPES_SRCS += Modules/_ctypes/callbacks.c -PYEXT_CTYPES_SRCS += Modules/_ctypes/callproc.c -PYEXT_CTYPES_SRCS += Modules/_ctypes/stgdict.c -PYEXT_CTYPES_SRCS += Modules/_ctypes/cfield.c +PYEXT_CTYPES_SRCS += pyext/obj/_ctypes/_ctypes.c +PYEXT_CTYPES_SRCS += pyext/obj/_ctypes/callbacks.c +PYEXT_CTYPES_SRCS += pyext/obj/_ctypes/callproc.c +PYEXT_CTYPES_SRCS += pyext/obj/_ctypes/stgdict.c +PYEXT_CTYPES_SRCS += pyext/obj/_ctypes/cfield.c PYEXT_CTYPES_LOBJS = $(PYEXT_CTYPES_SRCS:.c=.lo) PYEXT_CTYPES_OBJS = $(PYEXT_CTYPES_SRCS:.c=.o) @@ -1632,13 +1632,13 @@ clean: pyext-ctypes-clean # _io -PYEXT_IO_SRCS += Modules/_io/bufferedio.c -PYEXT_IO_SRCS += Modules/_io/bytesio.c -PYEXT_IO_SRCS += Modules/_io/fileio.c -PYEXT_IO_SRCS += Modules/_io/iobase.c -PYEXT_IO_SRCS += Modules/_io/_iomodule.c -PYEXT_IO_SRCS += Modules/_io/stringio.c -PYEXT_IO_SRCS += Modules/_io/textio.c +PYEXT_IO_SRCS += pyext/obj/_io/bufferedio.c +PYEXT_IO_SRCS += pyext/obj/_io/bytesio.c +PYEXT_IO_SRCS += pyext/obj/_io/fileio.c +PYEXT_IO_SRCS += pyext/obj/_io/iobase.c +PYEXT_IO_SRCS += pyext/obj/_io/_iomodule.c +PYEXT_IO_SRCS += pyext/obj/_io/stringio.c +PYEXT_IO_SRCS += pyext/obj/_io/textio.c PYEXT_IO_LOBJS = $(PYEXT_IO_SRCS:.c=.lo) PYEXT_IO_OBJS = $(PYEXT_IO_SRCS:.c=.o) @@ -1667,9 +1667,9 @@ clean: pyext-io-clean # _multiprocessing -PYEXT_MULTIPROCESSING_SRCS += Modules/_multiprocessing/multiprocessing.c -PYEXT_MULTIPROCESSING_SRCS += Modules/_multiprocessing/socket_connection.c -PYEXT_MULTIPROCESSING_SRCS += Modules/_multiprocessing/semaphore.c +PYEXT_MULTIPROCESSING_SRCS += pyext/obj/_multiprocessing/multiprocessing.c +PYEXT_MULTIPROCESSING_SRCS += pyext/obj/_multiprocessing/socket_connection.c +PYEXT_MULTIPROCESSING_SRCS += pyext/obj/_multiprocessing/semaphore.c PYEXT_MULTIPROCESSING_LOBJS = $(PYEXT_MULTIPROCESSING_SRCS:.c=.lo) PYEXT_MULTIPROCESSING_OBJS = $(PYEXT_MULTIPROCESSING_SRCS:.c=.o) @@ -1698,15 +1698,15 @@ clean: pyext-multiprocessing-clean # _sqlite3 -PYEXT_SQLITE3_SRCS += Modules/_sqlite/cache.c -PYEXT_SQLITE3_SRCS += Modules/_sqlite/connection.c -PYEXT_SQLITE3_SRCS += Modules/_sqlite/cursor.c -PYEXT_SQLITE3_SRCS += Modules/_sqlite/microprotocols.c -PYEXT_SQLITE3_SRCS += Modules/_sqlite/module.c -PYEXT_SQLITE3_SRCS += Modules/_sqlite/prepare_protocol.c -PYEXT_SQLITE3_SRCS += Modules/_sqlite/row.c -PYEXT_SQLITE3_SRCS += Modules/_sqlite/statement.c -PYEXT_SQLITE3_SRCS += Modules/_sqlite/util.c +PYEXT_SQLITE3_SRCS += pyext/obj/_sqlite/cache.c +PYEXT_SQLITE3_SRCS += pyext/obj/_sqlite/connection.c +PYEXT_SQLITE3_SRCS += pyext/obj/_sqlite/cursor.c +PYEXT_SQLITE3_SRCS += pyext/obj/_sqlite/microprotocols.c +PYEXT_SQLITE3_SRCS += pyext/obj/_sqlite/module.c +PYEXT_SQLITE3_SRCS += pyext/obj/_sqlite/prepare_protocol.c +PYEXT_SQLITE3_SRCS += pyext/obj/_sqlite/row.c +PYEXT_SQLITE3_SRCS += pyext/obj/_sqlite/statement.c +PYEXT_SQLITE3_SRCS += pyext/obj/_sqlite/util.c PYEXT_SQLITE3_LOBJS = $(PYEXT_SQLITE3_SRCS:.c=.lo) PYEXT_SQLITE3_OBJS = $(PYEXT_SQLITE3_SRCS:.c=.o) @@ -1738,7 +1738,7 @@ clean: pyext-sqlite3-clean # dbm -PYEXT_DBM_SRCS += Modules/dbmmodule.c +PYEXT_DBM_SRCS += pyext/obj/dbmmodule.c PYEXT_DBM_LOBJS = $(PYEXT_DBM_SRCS:.c=.lo) PYEXT_DBM_OBJS = $(PYEXT_DBM_SRCS:.c=.o) @@ -1770,7 +1770,7 @@ clean: pyext-dbm-clean # linuxaudiodev -PYEXT_LINUXAUDIODEV_SRCS += Modules/linuxaudiodev.c +PYEXT_LINUXAUDIODEV_SRCS += pyext/obj/linuxaudiodev.c PYEXT_LINUXAUDIODEV_LOBJS = $(PYEXT_LINUXAUDIODEV_SRCS:.c=.lo) PYEXT_LINUXAUDIODEV_OBJS = $(PYEXT_LINUXAUDIODEV_SRCS:.c=.o) diff --git a/project/tree.mk b/project/tree.mk index 5544bfe..136318e 100644 --- a/project/tree.mk +++ b/project/tree.mk @@ -1,14 +1,14 @@ tree.tag: - mkdir -p pyext mkdir -p tools mkdir -p Modules - mkdir -p Modules/cjkcodecs - mkdir -p Modules/zlib - mkdir -p Modules/_ctypes - mkdir -p Modules/_io - mkdir -p Modules/_multiprocessing - mkdir -p Modules/_sqlite mkdir -p Objects mkdir -p Parser mkdir -p Python + mkdir -p pyext + mkdir -p pyext/obj + mkdir -p pyext/obj/cjkcodecs + mkdir -p pyext/obj/_ctypes + mkdir -p pyext/obj/_io + mkdir -p pyext/obj/_multiprocessing + mkdir -p pyext/obj/_sqlite touch tree.tag -- cgit v1.2.3