#***************************************************************************
# src/Makefile : Dearchive and compile all files necessary
# ***************************************************************************
-# Copyright (C) 2003 - 2006 the VideoLAN team
+# Copyright (C) 2003 - 2007 the VideoLAN team
# $Id$
#
# Authors: Christophe Massiot <massiot@via.ecp.fr>
#
# cross compiling
#
-HOSTCONF=--target=$(HOST) --host=$(HOST) --build=$(BUILD)
+#This should be inside the if block but some config scripts are buggy
+HOSTCONF=--target=$(HOST) --host=$(HOST) --build=$(BUILD) --program-prefix=""
ifneq ($(BUILD),$(HOST))
#
# Compiling for MinGW under Cygwin could be deemed as cross compiling
# We are REALLY cross compiling
FFMPEGCONF=--cross-prefix=$(HOST)-
X264CONF=--crosscompile=$(HOST)
+ PTHREADSCONF="CROSS=$(HOST)-"
+ else
+ # We are compiling for MinGW on Cygwin
+ PTHREADSCONF=$(HOSTCC)
endif
endif
ifdef HAVE_DARWIN_OS
all: .autoconf .automake .libtool .intl .pkgcfg .freetype .fribidi \
- .a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
- .FLAC .speex .shout .faad .faac .lame .twolame .ebml .matroska .ffmpeg \
- .dvdcss .dvdnav .dvdread .dvbpsi .live .caca .mod \
- .png .gpg-error .gcrypt .gnutls .opendaap .cddb .cdio .vcdimager .SDL_image \
- .glib .libidl .gecko .mpcdec .dirac_encoder .dirac_decoder .aclocal \
- .libdca .tag .x264 .goom2k4
+ .a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
+ .FLAC .speex .shout .faad .faac .lame .twolame .ebml .matroska .ffmpeg \
+ .dvdcss .dvdnav .dvdread .dvbpsi .live .caca .mod \
+ .png .gpg-error .gcrypt .gnutls .opendaap .cddb .cdio .vcdimager \
+ .SDL_image .glib .libidl .gecko .mpcdec .dirac_encoder .dirac_decoder \
+ .libdca .tag .x264 .goom2k4 .aclocal
# .expat .clinkcc don't work with SDK yet
# .glib .libidl .gecko are required to build the mozilla plugin
# .mozilla will build an entire mozilla. it can be used if we need to create a new .gecko package
endif
endif
+ifdef HAVE_WIN32
+.x264: x264 .pthreads
+ (cd $<; ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
+else
.x264: x264
(cd $<; ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
+endif
touch $@
CLEAN_FILE += .x264
ifdef HAVE_BEOS
patch -p0 < Patches/twolame-BeOS.patch
endif
+ifdef HAVE_DARWIN_OS
+ patch -p0 < Patches/twolame-osx.patch
+endif
.twolame: twolame
- (cd twolame; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
+ifdef HAVE_WIN32
+ (cd twolame/win32; wget "http://twolame.svn.sourceforge.net/viewvc/*checkout*/twolame/trunk/win32/winutil.h")
+endif
+ (cd twolame; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && cd libtwolame && make && make install)
$(INSTALL_NAME)
touch $@
.gcrypt: libgcrypt .gpg-error
ifdef HAVE_WIN32
- (cd $<; ./autogen.sh && $(HOSTCC) ./configure $(HOSTCONF) --target=i586-mingw32msvc --prefix=$(PREFIX) --program-prefix="" CFLAGS="$(CFLAGS)" && sed -i 46s@sys/times.h@sys/time.h@ cipher/random.c && make && make install)
+ (cd $<; ./autogen.sh && $(HOSTCC) ./configure $(HOSTCONF) --target=i586-mingw32msvc --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" && sed -i 46s@sys/times.h@sys/time.h@ cipher/random.c && make && make install)
else
ifeq ($(HOST),i686-apple-darwin8)
(cd $<; $(HOSTCC) ./configure --host=$(HOST) --build=$(BUILD) --prefix=$(PREFIX) --disable-asm CFLAGS="$(CFLAGS)" && make && make install)
.gnutls: gnutls .gcrypt .gpg-error
ifdef HAVE_WIN32
- (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --target=i586-mingw32msvc --program-prefix="" && cd gl && make && cd ../lib &&make && make install && cd ../includes && make install)
+ (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --target=i586-mingw32msvc && cd gl && make && cd ../lib &&make && make install && cd ../includes && make install)
else
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" && cd gl && make && cd ../lib &&make && make install && cd ../includes && make install)
endif
else
(cd $<; ./configure --with-CFLAGS="$(CFLAGS)" --with-JPEG=no --with-ZIP=no --prefix=$(PREFIX) && make -C port &&make -C libtiff && make -C libtiff install)
endif
+ $(INSTALL_NAME)
touch $@
CLEAN_FILE += .tiff
$(INSTALL_NAME)
touch $@
+
+pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz:
+ $(WGET) $(PTHREADS_URL)
+
+pthreads: pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz
+ $(EXTRACT_GZ)
+
+.pthreads: pthreads
+ (cd $<; $(HOSTCC) make $(PTHREADSCONF) GC-inlined; cp pthread.h ../../include/; cp *.dll *.a ../../lib/)
+ $(INSTALL_NAME)
+ touch $@
+
+
# ***************************************************************************
# Some cleansing
# ***************************************************************************