diff options
Diffstat (limited to 'project')
-rw-r--r-- | project/common.mk | 228 | ||||
-rw-r--r-- | project/pycompile.mk | 46 | ||||
-rw-r--r-- | project/tree.mk | 11 |
3 files changed, 127 insertions, 158 deletions
diff --git a/project/common.mk b/project/common.mk index 3f2a355..ed5797e 100644 --- a/project/common.mk +++ b/project/common.mk @@ -1,144 +1,126 @@ -Modules/config.lo: build/config.c $(ALL_HEADERS) host.tag tree.tag config.tag +core/Modules/config.lo: build/config.c $(ALL_HEADERS) host.tag tree.tag config.tag $(CC) -c -o $@ $< $(CFLAGS_SHARED) -Modules/config.o: build/config.c $(ALL_HEADERS) host.tag tree.tag config.tag +core/Modules/config.o: build/config.c $(ALL_HEADERS) host.tag tree.tag config.tag $(CC) -c -o $@ $< $(CFLAGS_STATIC) -Modules/%.lo: $(SOURCE_DIR)/Modules/%.c $(ALL_HEADERS) host.tag tree.tag config.tag +core/%.lo: $(SOURCE_DIR)/%.c $(ALL_HEADERS) host.tag tree.tag config.tag $(CC) -c -o $@ $< $(CFLAGS_SHARED) -Modules/%.o: $(SOURCE_DIR)/Modules/%.c $(ALL_HEADERS) host.tag tree.tag config.tag - $(CC) -c -o $@ $< $(CFLAGS_STATIC) - -Objects/%.lo: $(SOURCE_DIR)/Objects/%.c $(ALL_HEADERS) host.tag tree.tag config.tag - $(CC) -c -o $@ $< $(CFLAGS_SHARED) - -Objects/%.o: $(SOURCE_DIR)/Objects/%.c $(ALL_HEADERS) host.tag tree.tag config.tag - $(CC) -c -o $@ $< $(CFLAGS_STATIC) - -Parser/%.lo: $(SOURCE_DIR)/Parser/%.c $(ALL_HEADERS) host.tag tree.tag config.tag - $(CC) -c -o $@ $< $(CFLAGS_SHARED) - -Parser/%.o: $(SOURCE_DIR)/Parser/%.c $(ALL_HEADERS) host.tag tree.tag config.tag - $(CC) -c -o $@ $< $(CFLAGS_STATIC) - -Python/%.lo: $(SOURCE_DIR)/Python/%.c $(ALL_HEADERS) host.tag tree.tag config.tag - $(CC) -c -o $@ $< $(CFLAGS_SHARED) - -Python/%.o: $(SOURCE_DIR)/Python/%.c $(ALL_HEADERS) host.tag tree.tag config.tag +core/%.o: $(SOURCE_DIR)/%.c $(ALL_HEADERS) host.tag tree.tag config.tag $(CC) -c -o $@ $< $(CFLAGS_STATIC) MODULE_SRCS = \ - Modules/config.c \ - Modules/gcmodule.c \ - Modules/getbuildinfo.c \ - Modules/getpath.c \ - Modules/main.c \ + core/Modules/config.c \ + core/Modules/gcmodule.c \ + core/Modules/getbuildinfo.c \ + core/Modules/getpath.c \ + core/Modules/main.c \ OBJECT_SRCS = \ - Objects/abstract.c \ - Objects/boolobject.c \ - Objects/bufferobject.c \ - Objects/bytearrayobject.c \ - Objects/bytes_methods.c \ - Objects/capsule.c \ - Objects/cellobject.c \ - Objects/classobject.c \ - Objects/cobject.c \ - Objects/codeobject.c \ - Objects/complexobject.c \ - Objects/descrobject.c \ - Objects/dictobject.c \ - Objects/enumobject.c \ - Objects/exceptions.c \ - Objects/fileobject.c \ - Objects/floatobject.c \ - Objects/frameobject.c \ - Objects/funcobject.c \ - Objects/genobject.c \ - Objects/intobject.c \ - Objects/iterobject.c \ - Objects/listobject.c \ - Objects/longobject.c \ - Objects/memoryobject.c \ - Objects/methodobject.c \ - Objects/moduleobject.c \ - Objects/object.c \ - Objects/obmalloc.c \ - Objects/rangeobject.c \ - Objects/setobject.c \ - Objects/sliceobject.c \ - Objects/stringobject.c \ - Objects/structseq.c \ - Objects/tupleobject.c \ - Objects/typeobject.c \ - Objects/unicodeobject.c \ - Objects/unicodectype.c \ - Objects/weakrefobject.c \ + core/Objects/abstract.c \ + core/Objects/boolobject.c \ + core/Objects/bufferobject.c \ + core/Objects/bytearrayobject.c \ + core/Objects/bytes_methods.c \ + core/Objects/capsule.c \ + core/Objects/cellobject.c \ + core/Objects/classobject.c \ + core/Objects/cobject.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/intobject.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/object.c \ + core/Objects/obmalloc.c \ + core/Objects/rangeobject.c \ + core/Objects/setobject.c \ + core/Objects/sliceobject.c \ + core/Objects/stringobject.c \ + core/Objects/structseq.c \ + core/Objects/tupleobject.c \ + core/Objects/typeobject.c \ + core/Objects/unicodeobject.c \ + core/Objects/unicodectype.c \ + core/Objects/weakrefobject.c \ PARSER_SRCS = \ - Parser/acceler.c \ - Parser/bitset.c \ - Parser/firstsets.c \ - Parser/grammar.c \ - Parser/grammar1.c \ - Parser/listnode.c \ - Parser/metagrammar.c \ - Parser/myreadline.c \ - Parser/node.c \ - Parser/parser.c \ - Parser/parsetok.c \ - Parser/pgen.c \ - Parser/tokenizer.c \ + 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 = \ - Python/Python-ast.c \ - Python/_warnings.c \ - Python/asdl.c \ - Python/ast.c \ - Python/bltinmodule.c \ - Python/ceval.c \ - Python/codecs.c \ - Python/compile.c \ - Python/dtoa.c \ - Python/errors.c \ - Python/formatter_string.c \ - Python/formatter_unicode.c \ - Python/frozen.c \ - Python/frozenmain.c \ - Python/future.c \ - Python/getargs.c \ - Python/getcompiler.c \ - Python/getcopyright.c \ - Python/getopt.c \ - Python/getplatform.c \ - Python/getversion.c \ - Python/graminit.c \ - Python/import.c \ - Python/importdl.c \ - Python/marshal.c \ - Python/modsupport.c \ - Python/mysnprintf.c \ - Python/mystrtoul.c \ - Python/peephole.c \ - Python/pyarena.c \ - Python/pyctype.c \ - Python/pyfpe.c \ - Python/pymath.c \ - Python/pystate.c \ - Python/pystrcmp.c \ - Python/pystrtod.c \ - Python/pythonrun.c \ - Python/random.c \ - Python/structmember.c \ - Python/symtable.c \ - Python/sysmodule.c \ - Python/thread.c \ - Python/traceback.c \ + 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/errors.c \ + core/Python/formatter_string.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/pymath.c \ + core/Python/pystate.c \ + core/Python/pystrcmp.c \ + core/Python/pystrtod.c \ + core/Python/pythonrun.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 = \ - Modules/python.c \ + core/Modules/python.c \ COMMON_SRCS = \ $(CONFIG_SRCS) \ diff --git a/project/pycompile.mk b/project/pycompile.mk index 1cf9333..3c4b811 100644 --- a/project/pycompile.mk +++ b/project/pycompile.mk @@ -29,16 +29,17 @@ PYCOMPILE_LDFLAGS += -lreadline -lm -lutil -lpthread $(PYCOMPILE_DIR)/tree.tag: mkdir -p $(PYCOMPILE_DIR)/bin mkdir -p $(PYCOMPILE_DIR)/lib + mkdir -p $(PYCOMPILE_DIR)/core + mkdir -p $(PYCOMPILE_DIR)/core/Modules + mkdir -p $(PYCOMPILE_DIR)/core/Objects + mkdir -p $(PYCOMPILE_DIR)/core/Parser + mkdir -p $(PYCOMPILE_DIR)/core/Python 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 mkdir -p $(PYCOMPILE_DIR)/build - mkdir -p $(PYCOMPILE_DIR)/Modules - mkdir -p $(PYCOMPILE_DIR)/Objects - mkdir -p $(PYCOMPILE_DIR)/Parser - mkdir -p $(PYCOMPILE_DIR)/Python touch $(PYCOMPILE_DIR)/tree.tag ifeq ($(PYCOMPILE_CFGSTEP),) @@ -61,19 +62,11 @@ endif $(PYCOMPILE_DIR)/build/config.c: $(PYCOMPILE_DIR)/config.tag $(PYCOMPILE_DIR)/build/pyconfig.h: $(PYCOMPILE_DIR)/config.tag -$(PYCOMPILE_DIR)/Modules/config.o: $(PYCOMPILE_DIR)/build/config.c $(ALL_HEADERS) $(PYCOMPILE_TAGS) +$(PYCOMPILE_DIR)/core/Modules/config.o: $(PYCOMPILE_DIR)/build/config.c $(ALL_HEADERS) $(PYCOMPILE_TAGS) $(NATIVE_CC) -c -o $@ $< $(PYCOMPILE_CFLAGS) -$(PYCOMPILE_DIR)/Modules/%.o: $(SOURCE_DIR)/Modules/%.c $(ALL_HEADERS) $(PYCOMPILE_TAGS) +$(PYCOMPILE_DIR)/core/%.o: $(SOURCE_DIR)/%.c $(ALL_HEADERS) $(PYCOMPILE_TAGS) $(NATIVE_CC) -c -o $@ $< $(PYCOMPILE_CFLAGS) - -$(PYCOMPILE_DIR)/Objects/%.o: $(SOURCE_DIR)/Objects/%.c $(ALL_HEADERS) $(PYCOMPILE_TAGS) - $(NATIVE_CC) -c -o $@ $< $(PYCOMPILE_CFLAGS) - -$(PYCOMPILE_DIR)/Parser/%.o: $(SOURCE_DIR)/Parser/%.c $(ALL_HEADERS) $(PYCOMPILE_TAGS) - $(NATIVE_CC) -c -o $@ $< $(PYCOMPILE_CFLAGS) - -$(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) @@ -92,23 +85,16 @@ PYCOMPILE_PYEXT_SRCS = \ $(PYEXT_UNICODEDATA_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_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) \ - $(PYCOMPILE_CONFIG_OBJS) \ - $(PYCOMPILE_MODULE_OBJS) \ - $(PYCOMPILE_OBJECT_OBJS) \ - $(PYCOMPILE_PARSER_OBJS) \ - $(PYCOMPILE_PYTHON_OBJS) \ - $(PYCOMPILE_PYEXT_OBJS) \ +PYCOMPILE_SRCS = \ + $(PYCOMPILE_APP_SRCS) \ + $(PYCOMPILE_CONFIG_SRCS) \ + $(PYCOMPILE_PYEXT_SRCS) \ + $(MODULE_SRCS) \ + $(OBJECT_SRCS) \ + $(PARSER_SRCS) \ + $(PYTHON_SRCS) +PYCOMPILE_OBJS = $(PYCOMPILE_SRCS:%.c=$(PYCOMPILE_DIR)/%.o) ifeq ($(PYCOMPILE_CFGSTEP),) diff --git a/project/tree.mk b/project/tree.mk index 136318e..8239397 100644 --- a/project/tree.mk +++ b/project/tree.mk @@ -1,9 +1,9 @@ tree.tag: - mkdir -p tools - mkdir -p Modules - mkdir -p Objects - mkdir -p Parser - mkdir -p Python + mkdir -p core + mkdir -p core/Modules + mkdir -p core/Objects + mkdir -p core/Parser + mkdir -p core/Python mkdir -p pyext mkdir -p pyext/obj mkdir -p pyext/obj/cjkcodecs @@ -11,4 +11,5 @@ tree.tag: mkdir -p pyext/obj/_io mkdir -p pyext/obj/_multiprocessing mkdir -p pyext/obj/_sqlite + mkdir -p tools touch tree.tag |