Reicher82 / python / sbpython3

Forked from python/sbpython3 3 years ago
Clone

Blame project/pycompile.mk

ca0fc2
PYCOMPILE_DIR		 = build.pycompile
cc78d9
PYCOMPILE_CFGHOST	 = $(NATIVE_CFGHOST)
ca0fc2
PYCOMPILE_PREFIX	 = $(CURDIR)/$(PYCOMPILE_DIR)
ca0fc2
PYCOMPILE_PATH		 =
ca0fc2
PYCOMPILE		 = $(PYCOMPILE_DIR)/bin/pycompile
ca0fc2
ca0fc2
PYCOMPILE_APP_SRCS	 = $(APP_SRCS)
ca0fc2
PYCOMPILE_CONFIG_SRCS	 = $(CONFIG_DEFAULT_SRCS)
ca0fc2
ca0fc2
PYCOMPILE_TAGS		+= $(PYCOMPILE_DIR)/tree.tag
ca0fc2
PYCOMPILE_TAGS		+= $(PYCOMPILE_DIR)/config.tag
ca0fc2
295470
PYCOMPILE_CFLAGS	+= -std=c99
ca0fc2
PYCOMPILE_CFLAGS	+= -I$(PYCOMPILE_DIR)/build
ca0fc2
PYCOMPILE_CFLAGS	+= -I$(PROJECT_DIR)/profiles
feb6bd
PYCOMPILE_CFLAGS	+= -I$(PROJECT_DIR)/project/variants/$(PYTHON_MAJOR).$(PYTHON_MINOR).$(PYTHON_MICRO)
ca0fc2
PYCOMPILE_CFLAGS	+= -I$(SOURCE_DIR)/Include
ca0fc2
PYCOMPILE_CFLAGS	+= -I$(SOURCE_DIR)/Modules/_decimal/libmpdec
ca0fc2
PYCOMPILE_CFLAGS	+= -DPY_FOR_PYCOMPILE
ca0fc2
PYCOMPILE_CFLAGS	+= -DVPATH=\"$(SOURCE_DIR)\"
ca0fc2
PYCOMPILE_CFLAGS	+= -DVERSION=\"$(PYTHON_VER)\"
ca0fc2
PYCOMPILE_CFLAGS	+= -DPLATFORM=\"$(NATIVE_OS)\"
ca0fc2
PYCOMPILE_CFLAGS	+= -DPREFIX=\"$(PYCOMPILE_PREFIX)\"
ca0fc2
PYCOMPILE_CFLAGS	+= -DEXEC_PREFIX=\"$(PYCOMPILE_PREFIX)\"
ca0fc2
PYCOMPILE_CFLAGS	+= -DPYTHONPATH=\"$(PYCOMPILE_PATH)\"
ca0fc2
PYCOMPILE_CFLAGS	+= -DSOABI=\"$(PYTHON_SOABI)\"
b6fc94
PYCOMPILE_CFLAGS	+= -DABIFLAGS=\"$(PYTHON_ABIFL)\"
f623e2
PYCOMPILE_CFLAGS	+= -D_PYTHONFRAMEWORK=\"\"
cc78d9
PYCOMPILE_CFLAGS	+= $(NATIVE_CFLAGS)
ca0fc2
ca0fc2
PYCOMPILE_LDFLAGS	+= -lreadline -lm -lutil -lpthread
cc78d9
PYCOMPILE_LDFLAGS	+= $(NATIVE_LDFLAGS)
ca0fc2
PYCOMPILE_LDFLAGS	+= -lreadline -lm -lutil -lpthread
ca0fc2
ca0fc2
$(PYCOMPILE_DIR)/tree.tag:
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/bin
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/lib
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/core
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/core/Modules
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/core/Modules/_io
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/core/Objects
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/core/Parser
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/core/Python
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/core/Programs
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/pyext
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/pyext/obj
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/pyext/obj/_decimal
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/pyext/obj/_decimal/libmpdec
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/lib/$(NICKNAME)
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/lib/$(NICKNAME)/collections
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/lib/$(NICKNAME)/encodings
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/lib/$(NICKNAME)/importlib
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/lib/$(NICKNAME)/urllib
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/lib/$(NICKNAME)/lib-dynload
ca0fc2
		mkdir -p $(PYCOMPILE_DIR)/build
ca0fc2
		touch $(PYCOMPILE_DIR)/tree.tag
ca0fc2
ca0fc2
ifeq ($(PYCOMPILE_CFGSTEP),)
ca0fc2
ca0fc2
$(PYCOMPILE_DIR)/config.tag:
ca0fc2
	$(MAKE) PYCOMPILE_CFGSTEP=yes                  \
ca0fc2
		PYCOMPILE_CFGHOST=$(PYCOMPILE_CFGHOST) \
ca0fc2
		CFGHOST=$(PYCOMPILE_CFGHOST)           \
ca0fc2
		$(PYCOMPILE_DIR)/config.tag
ca0fc2
else
ca0fc2
ca0fc2
$(PYCOMPILE_DIR)/config.tag:
ca0fc2
	mkdir -p $(PYCOMPILE_DIR)/build
ca0fc2
	cp -p $(PROJECT_DIR)/config/$(CFGHOST)/config.c   $(PYCOMPILE_DIR)/build/
ca0fc2
	cp -p $(PROJECT_DIR)/config/$(CFGHOST)/pyconfig.h $(PYCOMPILE_DIR)/build/
ca0fc2
	touch $(PYCOMPILE_DIR)/config.tag
ca0fc2
	touch $(PYCOMPILE_DIR)/build/config.c
ca0fc2
	touch $(PYCOMPILE_DIR)/build/pyconfig.h
ca0fc2
ca0fc2
endif
ca0fc2
ca0fc2
$(PYCOMPILE_DIR)/core/%.o:		PYCOMPILE_CFLAGS += -DPy_BUILD_CORE
ca0fc2
ca0fc2
$(PYCOMPILE_DIR)/build/config.c:	$(PYCOMPILE_DIR)/config.tag
ca0fc2
$(PYCOMPILE_DIR)/build/pyconfig.h:	$(PYCOMPILE_DIR)/config.tag
ca0fc2
ca0fc2
$(PYCOMPILE_DIR)/core/Modules/config.o:	$(PYCOMPILE_DIR)/build/config.c $(ALL_HEADERS) $(PYCOMPILE_TAGS)
ca0fc2
					$(NATIVE_CC) -c -o $@ $< $(PYCOMPILE_CFLAGS)
ca0fc2
ca0fc2
$(PYCOMPILE_DIR)/core/%.o:	$(SOURCE_DIR)/%.c $(ALL_HEADERS) $(PYCOMPILE_TAGS)
ca0fc2
				$(NATIVE_CC) -c -o $@ $< $(PYCOMPILE_CFLAGS)
ca0fc2
ca0fc2
$(PYCOMPILE_DIR)/pyext/obj/%.o:	$(SOURCE_DIR)/Modules/%.c $(ALL_HEADERS) $(PYCOMPILE_TAGS)
ca0fc2
				$(NATIVE_CC) -c -o $@ $< $(PYCOMPILE_CFLAGS)
ca0fc2
cc78d9
$(PYCOMPILE_DIR)/pyext/obj/_decimal/%.o: NATIVE_CFLAGS += -DUNIVERSAL
a4a46b
ca0fc2
ca0fc2
PYCOMPILE_PYEXT_SRCS = \
ca0fc2
	$(PYEXT_DECIMAL_SRCS)	        \
ca0fc2
	$(PYEXT_ELEMENTTREE_SRCS)       \
ca0fc2
	$(PYEXT_HEAPQ_SRCS)             \
ca0fc2
	$(PYEXT_POSIXSUBPROCESS_SRCS)   \
ca0fc2
	$(PYEXT_MATH_SRCS)              \
ca0fc2
	$(PYEXT_READLINE_SRCS)          \
ca0fc2
	$(PYEXT_SELECT_SRCS)            \
ca0fc2
	$(PYEXT_TERMIOS_SRCS)           \
ca0fc2
ca0fc2
ca0fc2
PYCOMPILE_SRCS =                    \
ca0fc2
	$(PYCOMPILE_APP_SRCS)       \
ca0fc2
	$(PYCOMPILE_CONFIG_SRCS)    \
ca0fc2
	$(PYCOMPILE_PYEXT_SRCS)     \
ca0fc2
	$(MODULE_SRCS)              \
ca0fc2
	$(OBJECT_SRCS)              \
ca0fc2
	$(PARSER_SRCS)              \
ca0fc2
	$(PYTHON_SRCS)
ca0fc2
ca0fc2
PYCOMPILE_OBJS = $(PYCOMPILE_SRCS:%.c=$(PYCOMPILE_DIR)/%.o)
ca0fc2
ca0fc2
ifeq ($(PYCOMPILE_CFGSTEP),)
ca0fc2
ca0fc2
$(PYCOMPILE):	$(PYCOMPILE_OBJS)
ca0fc2
	$(MAKE) PYCOMPILE_CFGSTEP=yes                  \
ca0fc2
		PYCOMPILE_CFGHOST=$(PYCOMPILE_CFGHOST) \
ca0fc2
		CFGHOST=$(PYCOMPILE_CFGHOST)           \
ca0fc2
		pycompile
ca0fc2
else
ca0fc2
ca0fc2
$(PYCOMPILE):	$(PYCOMPILE_OBJS)
ca0fc2
		$(NATIVE_CC) -o $@ $^ $(PYCOMPILE_LDFLAGS)
ca0fc2
ca0fc2
endif
ca0fc2
ca0fc2
ca0fc2
pycompile:	$(PYCOMPILE)
ca0fc2
ca0fc2
pycompile-objs:	$(PYCOMPILE_OBJS)
ca0fc2
ca0fc2
pycompile-clean-config:
ca0fc2
	rm -f $(PYCOMPILE_DIR)/tree.tag
ca0fc2
	rm -f $(PYCOMPILE_DIR)/config.tag
ca0fc2
	rm -f $(PYCOMPILE_DIR)/build/config.c
ca0fc2
	rm -f $(PYCOMPILE_DIR)/build/pyconfig.h
ca0fc2
ca0fc2
pycompile-clean-objs:
ca0fc2
	rm -f $(PYCOMPILE_OBJS)
ca0fc2
ca0fc2
pycompile-clean-pycompile:
ca0fc2
	rm -f $(PYCOMPILE)
ca0fc2
ca0fc2
pycompile-clean:pycompile-clean-objs
ca0fc2
pycompile-clean:pycompile-clean-config
ca0fc2
pycompile-clean:pycompile-clean-pycompile
ca0fc2
ca0fc2
clean:		pycompile-clean-objs
ca0fc2
clean:		pycompile-clean-config
ca0fc2
clean:		pycompile-clean-pycompile
ca0fc2
ca0fc2
.PHONY:		pycompile               pycompile-objs
ca0fc2
		pycompile-clean         pycompile-clean-objs
ca0fc2
		pycompile-clean-config  pycompile-clean-pycompile