TP_ARCHIVE = $(notdir $(TP_URL)) TP_CONFIGURE = $(TP_DIR)/configure TP_PREFIX = $(TP_INSTALL)/$(TP_ARCH) ifndef TP_MAKE_TARGETS TP_MAKE_TARGETS = install endif ifndef TP_EXTRA_CONFIGURE_ARGS TP_EXTRA_CONFIGURE_ARGS = endif ifndef TP_SHARED TP_SHARED_ARGS = --disable-shared --enable-static else TP_SHARED_ARGS = --disable-static --enable-shared endif export TP_CFLAGS = -arch $(TP_ARCH) -isysroot $(TP_SDK_PATH) -mmacosx-version-min=$(TP_MIN_VERSION) $(TP_PREFIX)/lib/$(TP_LIB): $(TP_CONFIGURE) mkdir -p build/$(TP_ARCH) && \ cd build/$(TP_ARCH) && \ ../../$(TP_CONFIGURE) \ --prefix=$(TP_PREFIX) \ --host=$(TP_HOST) \ CC=$(TP_CC) \ CPP='$(TP_CC) -E $(TP_CFLAGS)' \ CXX=$(TP_CXX) \ CXXCPP='$(TP_CXX) -E $(TP_CFLAGS)' \ CFLAGS='$(TP_CFLAGS)' \ $(TP_SHARED_ARGS) \ $(TP_EXTRA_CONFIGURE_ARGS) && \ make $(TP_MAKE_TARGETS) $(TP_CONFIGURE): $(TP_ARCHIVE) ifeq ($(findstring bz, $(suffix $(TP_ARCHIVE))), bz) tar xjmf $< else tar xzmf $< endif ifdef TP_PATCH cd $(TP_DIR) && gunzip --stdout ../$(TP_PATCH) | patch -p1 endif ifdef TP_POSTPATCH cd $(TP_DIR) && $(TP_POSTPATCH) endif %.tar: %.tar.bz2 bunzip2 --force --keep $< %.tar: %.tar.gz gunzip --stdout $< > $@ %.tar: %.tgz gunzip --stdout $< > $@ $(TP_ARCHIVE): curl -C - -O $(TP_URL) clean: rm -rf $(TP_DIR) build cleandl: rm -f $(TP_ARCHIVE) $(basename $(TP_ARCHIVE))