summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.project2
-rw-r--r--project/common.mk167
-rw-r--r--project/extras.mk10
-rw-r--r--project/headers.mk103
-rw-r--r--project/tree.mk9
5 files changed, 290 insertions, 1 deletions
diff --git a/config.project b/config.project
index 694f201..82c54f7 100644
--- a/config.project
+++ b/config.project
@@ -69,7 +69,7 @@ mb_all_static=
mb_all_shared=yes
mb_disable_frontend=yes
mb_disable_static=yes
-mb_disable_shared=yes
+mb_disable_shared=no
mb_use_custom_cfgdefs=yes
mb_use_custom_usrdefs=no
diff --git a/project/common.mk b/project/common.mk
index e69de29..b68c998 100644
--- a/project/common.mk
+++ b/project/common.mk
@@ -0,0 +1,167 @@
+core/%.lo: CFLAGS_SHARED += -DPy_BUILD_CORE
+core/%.o: CFLAGS_STATIC += -DPy_BUILD_CORE
+
+core/Modules/config.lo: build/config.c $(ALL_HEADERS) host.tag tree.tag config.tag
+ $(CC) -c -o $@ $< $(CFLAGS_SHARED)
+
+core/Modules/config.o: build/config.c $(ALL_HEADERS) host.tag tree.tag config.tag
+ $(CC) -c -o $@ $< $(CFLAGS_STATIC)
+
+core/%.lo: $(SOURCE_DIR)/%.c $(ALL_HEADERS) host.tag tree.tag config.tag
+ $(CC) -c -o $@ $< $(CFLAGS_SHARED)
+
+core/%.o: $(SOURCE_DIR)/%.c $(ALL_HEADERS) host.tag tree.tag config.tag
+ $(CC) -c -o $@ $< $(CFLAGS_STATIC)
+
+
+MODULE_SRCS = \
+ core/Modules/_codecsmodule.c \
+ core/Modules/_collectionsmodule.c \
+ core/Modules/_functoolsmodule.c \
+ core/Modules/_localemodule.c \
+ core/Modules/_operator.c \
+ core/Modules/_sre.c \
+ core/Modules/_stat.c \
+ core/Modules/_threadmodule.c \
+ core/Modules/_tracemalloc.c \
+ core/Modules/_weakref.c \
+ core/Modules/atexitmodule.c \
+ core/Modules/config.c \
+ core/Modules/errnomodule.c \
+ core/Modules/faulthandler.c \
+ core/Modules/gcmodule.c \
+ core/Modules/getbuildinfo.c \
+ core/Modules/getpath.c \
+ core/Modules/hashtable.c \
+ core/Modules/itertoolsmodule.c \
+ core/Modules/main.c \
+ core/Modules/posixmodule.c \
+ core/Modules/pwdmodule.c \
+ core/Modules/signalmodule.c \
+ core/Modules/symtablemodule.c \
+ core/Modules/timemodule.c \
+ core/Modules/xxsubtype.c \
+ core/Modules/zipimport.c \
+ core/Modules/_io/_iomodule.c \
+ core/Modules/_io/bufferedio.c \
+ core/Modules/_io/bytesio.c \
+ core/Modules/_io/fileio.c \
+ core/Modules/_io/iobase.c \
+ core/Modules/_io/stringio.c \
+ core/Modules/_io/textio.c \
+
+OBJECT_SRCS = \
+ core/Objects/abstract.c \
+ core/Objects/accu.c \
+ core/Objects/boolobject.c \
+ core/Objects/bytearrayobject.c \
+ core/Objects/bytes_methods.c \
+ core/Objects/bytesobject.c \
+ core/Objects/capsule.c \
+ core/Objects/cellobject.c \
+ core/Objects/classobject.c \
+ core/Objects/codeobject.c \
+ core/Objects/complexobject.c \
+ core/Objects/descrobject.c \
+ core/Objects/dictobject.c \
+ core/Objects/enumobject.c \
+ core/Objects/exceptions.c \
+ core/Objects/fileobject.c \
+ core/Objects/floatobject.c \
+ core/Objects/frameobject.c \
+ core/Objects/funcobject.c \
+ core/Objects/genobject.c \
+ core/Objects/iterobject.c \
+ core/Objects/listobject.c \
+ core/Objects/longobject.c \
+ core/Objects/memoryobject.c \
+ core/Objects/methodobject.c \
+ core/Objects/moduleobject.c \
+ core/Objects/namespaceobject.c \
+ core/Objects/object.c \
+ core/Objects/obmalloc.c \
+ core/Objects/odictobject.c \
+ core/Objects/rangeobject.c \
+ core/Objects/setobject.c \
+ core/Objects/sliceobject.c \
+ core/Objects/structseq.c \
+ core/Objects/tupleobject.c \
+ core/Objects/typeobject.c \
+ core/Objects/unicodectype.c \
+ core/Objects/unicodeobject.c \
+ core/Objects/weakrefobject.c \
+
+PARSER_SRCS = \
+ core/Parser/acceler.c \
+ core/Parser/bitset.c \
+ core/Parser/firstsets.c \
+ core/Parser/grammar.c \
+ core/Parser/grammar1.c \
+ core/Parser/listnode.c \
+ core/Parser/metagrammar.c \
+ core/Parser/myreadline.c \
+ core/Parser/node.c \
+ core/Parser/parser.c \
+ core/Parser/parsetok.c \
+ core/Parser/pgen.c \
+ core/Parser/tokenizer.c \
+
+PYTHON_SRCS = \
+ core/Python/Python-ast.c \
+ core/Python/_warnings.c \
+ core/Python/asdl.c \
+ core/Python/ast.c \
+ core/Python/bltinmodule.c \
+ core/Python/ceval.c \
+ core/Python/codecs.c \
+ core/Python/compile.c \
+ core/Python/dtoa.c \
+ core/Python/dynamic_annotations.c \
+ core/Python/errors.c \
+ core/Python/fileutils.c \
+ core/Python/formatter_unicode.c \
+ core/Python/frozen.c \
+ core/Python/frozenmain.c \
+ core/Python/future.c \
+ core/Python/getargs.c \
+ core/Python/getcompiler.c \
+ core/Python/getcopyright.c \
+ core/Python/getopt.c \
+ core/Python/getplatform.c \
+ core/Python/getversion.c \
+ core/Python/graminit.c \
+ core/Python/import.c \
+ core/Python/importdl.c \
+ core/Python/marshal.c \
+ core/Python/modsupport.c \
+ core/Python/mysnprintf.c \
+ core/Python/mystrtoul.c \
+ core/Python/peephole.c \
+ core/Python/pyarena.c \
+ core/Python/pyctype.c \
+ core/Python/pyfpe.c \
+ core/Python/pyhash.c \
+ core/Python/pylifecycle.c \
+ core/Python/pymath.c \
+ core/Python/pystate.c \
+ core/Python/pystrcmp.c \
+ core/Python/pystrhex.c \
+ core/Python/pystrtod.c \
+ core/Python/pythonrun.c \
+ core/Python/pytime.c \
+ core/Python/random.c \
+ core/Python/structmember.c \
+ core/Python/symtable.c \
+ core/Python/sysmodule.c \
+ core/Python/thread.c \
+ core/Python/traceback.c \
+
+APP_SRCS = \
+ core/Programs/python.c \
+
+COMMON_SRCS = \
+ $(CONFIG_SRCS) \
+ $(MODULE_SRCS) \
+ $(OBJECT_SRCS) \
+ $(PARSER_SRCS) \
+ $(PYTHON_SRCS) \
diff --git a/project/extras.mk b/project/extras.mk
index e69de29..e76c55d 100644
--- a/project/extras.mk
+++ b/project/extras.mk
@@ -0,0 +1,10 @@
+# build info
+CFLAGS_COMMON += -I$(PROJECT_DIR)/profiles
+CFLAGS_COMMON += -I$(SOURCE_DIR)/Include
+
+CFLAGS_CONFIG += -DPLATFORM=\"$(PYTHON_PLATFORM)\"
+CFLAGS_CONFIG += -DVERSION=\"$(PYTHON_VER)\"
+CFLAGS_CONFIG += -DPREFIX=\"$(PREFIX)\"
+CFLAGS_CONFIG += -DEXEC_PREFIX=\"$(EXEC_PREFIX)\"
+CFLAGS_CONFIG += -DVPATH=\"$(SOURCE_DIR)\"
+CFLAGS_CONFIG += -DPYTHONPATH=\"$(PYTHON_PATH)\"
diff --git a/project/headers.mk b/project/headers.mk
index e69de29..67865bc 100644
--- a/project/headers.mk
+++ b/project/headers.mk
@@ -0,0 +1,103 @@
+API_HEADERS = \
+ build/pyconfig.h \
+ $(SOURCE_DIR)/Include/Python-ast.h \
+ $(SOURCE_DIR)/Include/Python.h \
+ $(SOURCE_DIR)/Include/abstract.h \
+ $(SOURCE_DIR)/Include/accu.h \
+ $(SOURCE_DIR)/Include/asdl.h \
+ $(SOURCE_DIR)/Include/ast.h \
+ $(SOURCE_DIR)/Include/bitset.h \
+ $(SOURCE_DIR)/Include/bltinmodule.h \
+ $(SOURCE_DIR)/Include/boolobject.h \
+ $(SOURCE_DIR)/Include/bytearrayobject.h \
+ $(SOURCE_DIR)/Include/bytes_methods.h \
+ $(SOURCE_DIR)/Include/bytesobject.h \
+ $(SOURCE_DIR)/Include/cellobject.h \
+ $(SOURCE_DIR)/Include/ceval.h \
+ $(SOURCE_DIR)/Include/classobject.h \
+ $(SOURCE_DIR)/Include/code.h \
+ $(SOURCE_DIR)/Include/codecs.h \
+ $(SOURCE_DIR)/Include/compile.h \
+ $(SOURCE_DIR)/Include/complexobject.h \
+ $(SOURCE_DIR)/Include/datetime.h \
+ $(SOURCE_DIR)/Include/descrobject.h \
+ $(SOURCE_DIR)/Include/dictobject.h \
+ $(SOURCE_DIR)/Include/dtoa.h \
+ $(SOURCE_DIR)/Include/dynamic_annotations.h \
+ $(SOURCE_DIR)/Include/enumobject.h \
+ $(SOURCE_DIR)/Include/errcode.h \
+ $(SOURCE_DIR)/Include/eval.h \
+ $(SOURCE_DIR)/Include/fileobject.h \
+ $(SOURCE_DIR)/Include/fileutils.h \
+ $(SOURCE_DIR)/Include/floatobject.h \
+ $(SOURCE_DIR)/Include/frameobject.h \
+ $(SOURCE_DIR)/Include/funcobject.h \
+ $(SOURCE_DIR)/Include/genobject.h \
+ $(SOURCE_DIR)/Include/graminit.h \
+ $(SOURCE_DIR)/Include/grammar.h \
+ $(SOURCE_DIR)/Include/import.h \
+ $(SOURCE_DIR)/Include/intrcheck.h \
+ $(SOURCE_DIR)/Include/iterobject.h \
+ $(SOURCE_DIR)/Include/listobject.h \
+ $(SOURCE_DIR)/Include/longintrepr.h \
+ $(SOURCE_DIR)/Include/longobject.h \
+ $(SOURCE_DIR)/Include/marshal.h \
+ $(SOURCE_DIR)/Include/memoryobject.h \
+ $(SOURCE_DIR)/Include/metagrammar.h \
+ $(SOURCE_DIR)/Include/methodobject.h \
+ $(SOURCE_DIR)/Include/modsupport.h \
+ $(SOURCE_DIR)/Include/moduleobject.h \
+ $(SOURCE_DIR)/Include/namespaceobject.h \
+ $(SOURCE_DIR)/Include/node.h \
+ $(SOURCE_DIR)/Include/object.h \
+ $(SOURCE_DIR)/Include/objimpl.h \
+ $(SOURCE_DIR)/Include/odictobject.h \
+ $(SOURCE_DIR)/Include/opcode.h \
+ $(SOURCE_DIR)/Include/osdefs.h \
+ $(SOURCE_DIR)/Include/osmodule.h \
+ $(SOURCE_DIR)/Include/parsetok.h \
+ $(SOURCE_DIR)/Include/patchlevel.h \
+ $(SOURCE_DIR)/Include/pgen.h \
+ $(SOURCE_DIR)/Include/pgenheaders.h \
+ $(SOURCE_DIR)/Include/py_curses.h \
+ $(SOURCE_DIR)/Include/pyarena.h \
+ $(SOURCE_DIR)/Include/pyatomic.h \
+ $(SOURCE_DIR)/Include/pycapsule.h \
+ $(SOURCE_DIR)/Include/pyctype.h \
+ $(SOURCE_DIR)/Include/pydebug.h \
+ $(SOURCE_DIR)/Include/pydtrace.h \
+ $(SOURCE_DIR)/Include/pyerrors.h \
+ $(SOURCE_DIR)/Include/pyexpat.h \
+ $(SOURCE_DIR)/Include/pyfpe.h \
+ $(SOURCE_DIR)/Include/pygetopt.h \
+ $(SOURCE_DIR)/Include/pyhash.h \
+ $(SOURCE_DIR)/Include/pylifecycle.h \
+ $(SOURCE_DIR)/Include/pymacconfig.h \
+ $(SOURCE_DIR)/Include/pymacro.h \
+ $(SOURCE_DIR)/Include/pymath.h \
+ $(SOURCE_DIR)/Include/pymem.h \
+ $(SOURCE_DIR)/Include/pyport.h \
+ $(SOURCE_DIR)/Include/pystate.h \
+ $(SOURCE_DIR)/Include/pystrcmp.h \
+ $(SOURCE_DIR)/Include/pystrhex.h \
+ $(SOURCE_DIR)/Include/pystrtod.h \
+ $(SOURCE_DIR)/Include/pythonrun.h \
+ $(SOURCE_DIR)/Include/pythread.h \
+ $(SOURCE_DIR)/Include/pytime.h \
+ $(SOURCE_DIR)/Include/rangeobject.h \
+ $(SOURCE_DIR)/Include/setobject.h \
+ $(SOURCE_DIR)/Include/sliceobject.h \
+ $(SOURCE_DIR)/Include/structmember.h \
+ $(SOURCE_DIR)/Include/structseq.h \
+ $(SOURCE_DIR)/Include/symtable.h \
+ $(SOURCE_DIR)/Include/sysmodule.h \
+ $(SOURCE_DIR)/Include/token.h \
+ $(SOURCE_DIR)/Include/traceback.h \
+ $(SOURCE_DIR)/Include/tupleobject.h \
+ $(SOURCE_DIR)/Include/typeslots.h \
+ $(SOURCE_DIR)/Include/ucnhash.h \
+ $(SOURCE_DIR)/Include/unicodeobject.h \
+ $(SOURCE_DIR)/Include/warnings.h \
+ $(SOURCE_DIR)/Include/weakrefobject.h \
+
+ALL_HEADERS = $(API_HEADERS) $(INTERNAL_HEADERS)
diff --git a/project/tree.mk b/project/tree.mk
index e69de29..4ec38c4 100644
--- a/project/tree.mk
+++ b/project/tree.mk
@@ -0,0 +1,9 @@
+tree.tag:
+ mkdir -p core
+ mkdir -p core/Modules
+ mkdir -p core/Modules/_io
+ mkdir -p core/Objects
+ mkdir -p core/Parser
+ mkdir -p core/Programs
+ mkdir -p core/Python
+ touch tree.tag