PROJECT_NAME = libvorbis PROJECT_VERSION = 1.3.7 THIRDPARTY_LIBRARY_TARGETS = libvorbis INSTALLED_TARGETS = ${THIRDPARTY_LIBRARY_TARGETS} PLATFORMS_${THIRDPARTY_LIBRARY_TARGETS} = macosx linux windows android iphonesimulator iphoneos THIRDPARTY_LIBRARY_PRISTINE_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS} = libvorbis-1.3.7 #Patterns: BUILT_LIBRARY_LOCATION_${target}, BUILT_LIBRARY_LOCATION_${target}_${platform}; define one or the other, not both. Can be multiple files. BUILT_LIBRARY_LOCATION_${THIRDPARTY_LIBRARY_TARGETS} = \ ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/lib/.libs/libvorbis.a \ ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/lib/.libs/libvorbisenc.a \ ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/lib/.libs/libvorbisfile.a THIRDPARTY_LIBRARY_DEPENDENCIES = libogg/latest/libogg.a LINKFLAGS = INCLUDES = \ ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/include/vorbis/codec.h \ ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/include/vorbis/vorbisenc.h \ ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/include/vorbis/vorbisfile.h LIBOGG_VERSION ?= 1.3.4 define ${THIRDPARTY_LIBRARY_TARGETS}_build_commands_macosx #(arch) cd ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}; \ export CC="${CC_macosx_$1} ${CCFLAGS_macosx}"; \ export LD="${CC_macosx_$1} ${CCFLAGS_macosx}"; \ export AR="${AR_macosx}"; \ export RANLIB="${RANLIB_macosx}"; \ ./configure --with-ogg-libraries="${STEM_SHARED_DIR}/libogg/${LIBOGG_VERSION}/libogg/macosx" --with-ogg-includes="${STEM_SHARED_DIR}/libogg/${LIBOGG_VERSION}/include" && \ ${MAKE} endef define ${THIRDPARTY_LIBRARY_TARGETS}_clean_commands_macosx #(arch) cd ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}; \ ${MAKE} clean endef define ${THIRDPARTY_LIBRARY_TARGETS}_build_commands_windows #(arch) #HACK: libvorbis's configure script appears to be broken for MinGW; tries to use cygpath without cygwin. Replace with echo -n and it seems to work. cp "${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/configure" "${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/configure_original" ruby -e "print STDIN.read.gsub(/cygpath -w/, 'echo -n')" < "${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/configure_original" > "${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/configure" cd ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}; \ export CC="${CC_windows_$1} ${CCFLAGS_windows}"; \ export LD="${LD_windows_$1}"; \ export AR="${AR_windows_$1}"; \ export RANLIB="${RANLIB_windows_$1}"; \ sh configure --host=i686-pc-mingw32 --build=i686-pc-mingw32 --with-ogg-libraries="${STEM_SHARED_DIR}/libogg/${LIBOGG_VERSION}/libogg/windows-$1" --with-ogg-includes="${STEM_SHARED_DIR}/libogg/${LIBOGG_VERSION}/include" && \ ${MAKE} endef define ${THIRDPARTY_LIBRARY_TARGETS}_clean_commands_windows #(arch) cd ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}; \ ${MAKE} clean endef define ${THIRDPARTY_LIBRARY_TARGETS}_build_commands_linux #(arch) cd ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}; \ export CC="${CC_linux_$1} ${CCFLAGS_linux_$1}"; \ export LD="${CC_linux_$1} ${CCFLAGS_linux_$1}"; \ export CFLAGS="-fno-finite-math-only"; \ ./configure --with-ogg-libraries="${STEM_SHARED_DIR}/libogg/${LIBOGG_VERSION}/libogg/linux-$1" --with-ogg-includes="${STEM_SHARED_DIR}/libogg/${LIBOGG_VERSION}/include" && \ ${MAKE} endef define ${THIRDPARTY_LIBRARY_TARGETS}_clean_commands_linux #(arch) cd ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}; \ ${MAKE} clean endef define ${THIRDPARTY_LIBRARY_TARGETS}_build_commands_iphonesimulator #(arch) cd ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}; \ export CC="${CC_iphonesimulator_$1} ${CCFLAGS_iphonesimulator}"; \ export LD="${CC_iphonesimulator_$1} ${CCFLAGS_iphonesimulator}"; \ export AR="${AR_iphonesimulator}"; \ export RANLIB="${RANLIB_iphonesimulator}"; \ ./configure --host=$1-apple-darwin9 --with-ogg-libraries="${STEM_SHARED_DIR}/libogg/${LIBOGG_VERSION}/libogg/iphonesimulator" --with-ogg-includes="${STEM_SHARED_DIR}/libogg/${LIBOGG_VERSION}/include" && \ ${MAKE} endef define ${THIRDPARTY_LIBRARY_TARGETS}_clean_commands_iphonesimulator #(arch) cd ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}; \ ${MAKE} clean endef define ${THIRDPARTY_LIBRARY_TARGETS}_build_commands_iphoneos #(arch) cp "${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/configure" "${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/configure_original" ruby -e "print STDIN.read.gsub(/-force_cpusubtype_ALL/, '')" < "${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/configure_original" > "${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}/configure" cd ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}; \ export CC="${CC_iphoneos_$1} ${CCFLAGS_iphoneos}"; \ export LD="${CC_iphoneos_$1} ${CCFLAGS_iphoneos}"; \ export AR="${AR_iphoneos}"; \ export RANLIB="${RANLIB_iphoneos}"; \ ./configure --host=$1-apple-darwin9 --with-ogg-libraries="${STEM_SHARED_DIR}/libogg/${LIBOGG_VERSION}/libogg/iphoneos" --with-ogg-includes="${STEM_SHARED_DIR}/libogg/${LIBOGG_VERSION}/include" && \ ${MAKE} endef define ${THIRDPARTY_LIBRARY_TARGETS}_clean_commands_iphonesimulator #(arch) cd ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}; \ ${MAKE} clean endef define ${THIRDPARTY_LIBRARY_TARGETS}_build_commands_android #(arch) cd ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}; \ export CC="${CC_android_$1} ${CCFLAGS_android}"; \ export LD="${CC_android_$1} ${CCFLAGS_android}"; \ export AR="${AR_android}"; \ export RANLIB="${RANLIB_android}"; \ ./configure --host=$1-linux-androideabi28 --with-ogg-libraries="${STEM_SHARED_DIR}/libogg/${LIBOGG_VERSION}/libogg/android" --with-ogg-includes="${STEM_SHARED_DIR}/libogg/${LIBOGG_VERSION}/include" && \ ${MAKE} endef define ${THIRDPARTY_LIBRARY_TARGETS}_clean_commands_iphonesimulator #(arch) cd ${THIRDPARTY_LIBRARY_WORKING_SUBDIR_${THIRDPARTY_LIBRARY_TARGETS}}; \ ${MAKE} clean endef # Postamble to invoke stemconfig makefile. Do not modify. UNAME = ${shell uname} ifeq (${UNAME},Linux) STEM_SHARED_DIR ?= /usr/local/stem else ifeq (${UNAME},Darwin) STEM_SHARED_DIR ?= /usr/local/stem else STEM_SHARED_DIR ?= C:/stem endif include ${STEM_SHARED_DIR}/Makefile.global