rm -f config.mak
echo -e "# Automatically generated by bootstrap.\n# Make changes if you know what you're doing.\n" > config.mak
-echo "BUILD = $BUILD" >> config.mak
-echo "HOST = $HOST" >> config.mak
-
-echo "PREFIX = `pwd`" >> config.mak
-
if test "$HOST" != "$BUILD"; then
CC="${HOST}-gcc"
CXX="${HOST}-g++"
;;
i686-pc-cygwin)
echo "HAVE_WIN32 = 1" >> config.mak
- CC="gcc -mno-cygwin"
- CXX="g++ -mno-cygwin"
- EXTRA_CFLAGS=" -mno-cygwin"
- EXTRA_CPPFLAGS=" -mno-cygwin"
+ CC="gcc -mno-cygwin -isystem /usr/include/mingw"
+ CXX="g++ -mno-cygwin -isystem /usr/include/mingw"
+ HOST=`$CC -dumpmachine`
+ EXTRA_CFLAGS=" -mno-cygwin -isystem /usr/include/mingw"
+ EXTRA_CPPFLAGS=" -mno-cygwin -isystem /usr/include/mingw"
EXTRA_LDFLAGS=" -mno-cygwin"
echo "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig" >> config.mak
;;
;;
esac
+echo "BUILD = $BUILD" >> config.mak
+echo "HOST = $HOST" >> config.mak
+
+echo "PREFIX = `pwd`" >> config.mak
+
echo "CC = ${CC}" >> config.mak
echo "CXX = ${CXX}" >> config.mak
echo "LD = ${LD}" >> config.mak
# Felix Kühne <fkuehne@users.sourceforge.net>
# Christophe Mutricy <xtophe AT xtelevision.com>
# Gildas Bazin <gbazin at videolan dot org>
+# Damien Fouilleul <damienf at videolan dot org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
HOSTCC2=$(HOSTCC)
endif
-ifneq ($(BUILD),$(HOST))
-# We are cross compiling
-HOSTCONF=--host=$(HOST) --build=$(BUILD)
-FFMPEGCONF=--cross-prefix=$(HOST)-
-X264CONF=--crosscompile=$(HOST)
-else
- ifneq ($(CC),)
- FFMPEGCONF=--cc="$(CC)"
- endif
+#
+# compiling for MinGW under Cygwin could be detected as cross compiling
+# unfortunately there isn't a complete separate GCC toolchain for MinGW under cygwin
+#
+ifeq (,$(findstring cygwin,$(BUILD)),)
+ ifneq ($(BUILD),$(HOST))
+ # We are cross compiling
+ HOSTCONF=--host=$(HOST) --build=$(BUILD)
+ FFMPEGCONF=--cross-prefix=$(HOST)-
+ X264CONF=--crosscompile=$(HOST)
+ else
+ ifneq ($(CC),)
+ FFMPEGCONF=--cc="$(CC)"
+ endif
+ endif
endif
#
# ***************************************************************************
define EXTRACT_GZ
- tar xzf $<
+ rm -rf $@ || true
+ tar xzf $< --exclude='[*?:<>\|]'
mv $(patsubst %.tar.gz,%,$(patsubst %.tgz,%,$(notdir $<))) $@ || true
touch $@
endef
define EXTRACT_BZ2
- bunzip2 -c $< | tar xf -
+ rm -rf $@ || true
+ bunzip2 -c $< | tar xf - --exclude='[*?:<>\|]'
mv $(patsubst %.tar.bz2,%,$(notdir $<)) $@ || true
touch $@
endef
+define EXTRACT_ZIP
+ rm -rf $@ || true
+ unzip $<
+ mv $(patsubst %.zip,%,$(notdir $<)) $@ || true
+ touch $@
+endef
+
### Darwin-specific ###
# These macros prepare the dynamic libraries for inclusion in the Mac OS X
# bundle. For instance if you're building a library named libtoto.dylib,
touch $@
CLEAN_FILE += .faad
-CLEAN_PKG += faad2
+CLEAN_PKG += faad
DISTCLEAN_PKG += faad2-$(FAAD2_VERSION).tar.bz2
# ***************************************************************************
ifeq ($(HOST),i686-apple-darwin8)
(cd $<; ./autogen.sh)
endif
- (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-nls --disable-shared && make && make install)
+# MinGW host is not properly detected when building on cygwin
+ (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --host=$(HOST) --prefix=$(PREFIX) --disable-nls --disable-shared && make && make install)
# $(INSTALL_NAME)
touch $@
rm -rf $(DISTCLEAN_PKG)
distclean: clean-src
+