Blame project/extras.mk

a9733e
# build info
bb84fe
CFLAGS_COMMON += -I$(PROJECT_DIR)/profiles
2a1a31
CFLAGS_COMMON += -I$(SOURCE_DIR)/Include
50bd76
c3000a
CFLAGS_CONFIG += -DPLATFORM=\"$(PYTHON_PLATFORM)\"
50bd76
CFLAGS_CONFIG += -DVERSION=\"$(PYTHON_VER)\"
50bd76
CFLAGS_CONFIG += -DPREFIX=\"$(PREFIX)\"
50bd76
CFLAGS_CONFIG += -DEXEC_PREFIX=\"$(EXEC_PREFIX)\"
50bd76
CFLAGS_CONFIG += -DVPATH=\"$(SOURCE_DIR)\"
50bd76
CFLAGS_CONFIG += -DPYTHONPATH=\"$(PYTHON_PATH)\"
a9733e
ad6da5
LDFLAGS_DEPS    += -Wl,--as-needed
ad6da5
LDFLAGS_DEPS    += -lm -lpthread -lutil -ldl -lcrypt
ad6da5
LDFLAGS_DEPS    += -Wl,--no-as-needed
ad6da5
ad6da5
LDFLAGS_CONFIG  += $(LDFLAGS_DEPS)
aa8e3c
LDFLAGS_CONFIG  += -Wl,-rpath -Wl,$(LIBDIR)
ad6da5
3d0b33
ifeq ($(ALL_STATIC),yes)
3d0b33
	CFLAGS_STATIC	+= -DPY_ALL_STATIC
3d0b33
860c31
	LDFLAGS_STATIC	+= $(PYEXT_STATIC)
3d0b33
3d0b33
	LDFLAGS_STATIC	+= $(LDFLAGS_PYEXT_STATIC)
3d0b33
3d0b33
	LDFLAGS_STATIC	+= $(LDFLAGS_NCURSES_STATIC)
3d0b33
	LDFLAGS_STATIC	+= $(LDFLAGS_SQLITE_STATIC)
3d0b33
	LDFLAGS_STATIC	+= $(LDFLAGS_EXPAT_STATIC)
3d0b33
	LDFLAGS_STATIC	+= $(LDFLAGS_DBM_STATIC)
3d0b33
3d0b33
	LDFLAGS_STATIC	+= $(LDFLAGS_PYEXT_STATIC)
3d0b33
else
3d0b33
	COMMON_SRCS	+= $(DYNLOAD_SRCS)
3d0b33
	CFLAGS_CONFIG	+= -DHAVE_DYNAMIC_LOADING
3d0b33
endif
a9733e
c96bf6
# extension objects
eee989
pyext/obj/%.lo:	$(SOURCE_DIR)/Modules/%.c $(ALL_HEADERS) host.tag tree.tag config.tag
eee989
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
eee989
eee989
pyext/obj/%.o:	$(SOURCE_DIR)/Modules/%.c $(ALL_HEADERS) host.tag tree.tag config.tag
eee989
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
eee989
a9733e
# dynamically loaded extension module
a9733e
pyext/%$(OS_LIB_SUFFIX): LDFLAGS_SONAME =
a9733e
pyext/%$(OS_LIB_SUFFIX): LDFLAGS_DSOEXT = -Wl,-soname -Wl,$(subst pyext/,,$@)
a9733e
pyext/%$(OS_LIB_SUFFIX): LDFLAGS_DYNEXT = $(LDFLAGS_DSOEXT) $(LDFLAGS_PYEXT)
a9733e
f74581
pyext/%$(OS_LIB_SUFFIX): $(DSO_REF_SOLINK)
ad6da5
	$(CC) -shared -o $@ $^ $(LDFLAGS_SHARED) $(LDFLAGS_DYNEXT) \
ad6da5
		-l$(PACKAGE) $(LDFLAGS_DEPS)
a9733e
2c1f72
# statically linked extensions
a9733e
pyext/%$(OS_ARCHIVE_EXT):
a9733e
	rm -f $@
a9733e
	$(AR) rcs $@ $^
a9733e
a9733e
# build rules for python's extension modules
a9733e
include $(PROJECT_DIR)/project/pyexts.mk
91d171
91d171
# shared extension modules: desired subset
860c31
$(SHARED_APP): $(PYEXT_SHARED)
860c31
$(STATIC_APP): $(PYEXT_STATIC)
7a8b0c
7a8b0c
# pycompile (core native python executable for .pyc generation)
7a8b0c
include $(PROJECT_DIR)/project/pycompile.mk
05a469
05a469
# pydist (python's distributed .py scripts)
05a469
include $(PROJECT_DIR)/project/pydist.mk
92c5a2
92c5a2
# pycgen (python's distributed .pyc objects)
92c5a2
include $(PROJECT_DIR)/project/pycgen.mk
e98fff
e98fff
# pytools (python's {prefix}/bin script-based tools)
e98fff
include $(PROJECT_DIR)/project/pytools.mk
1ff94f
1ff94f
# pyinst  (python's custom install bits)
1ff94f
include $(PROJECT_DIR)/project/pyinst.mk