Commit a54329d2 authored by Jean-Paul Saman's avatar Jean-Paul Saman

contrib: prepare for ARM linux compilations

parent 87df0e8a
......@@ -257,6 +257,19 @@ case $HOST in
cat src/Distributions/unix.mak >> distro.mak
fi
;;
arm-linux)
echo "HAVE_ARM_LINUX = 1" >> config.mak
EXTRA_CFLAGS="-I\${STAGING}/usr/include -msoft-float"
EXTRA_CPPLAGS="-I\${STAGING}/usr/include"
EXTRA_LDFLAGS="-L\${STAGING}/lib -L\${STAGING}/usr/lib"
echo "PKG_CONFIG_LIBDIR=\${STAGING}/usr/lib/pkgconfig" >> config.mak
echo "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig" >> config.mak
if test ! -z "${DISTRO}"; then
cat src/Distributions/${DISTRO}.mak >> distro.mak
else
cat src/Distributions/unix.mak >> distro.mak
fi
;;
*86_64*linux*)
EXTRA_CFLAGS=" -fPIC"
EXTRA_CPPFLAGS=" -fPIC"
......
# Contrib configuration for TI Davinci based SoC
all: \
.a52 .id3tag .mad .ogg .theora \
.flac .faad .faac .ffmpeg \
.live .png .tremor \
.dvbpsi
......@@ -127,14 +127,19 @@ endif
ifdef HAVE_UCLIBC
ifdef HAVE_BIGENDIAN
FFMPEGCONF+= --arch=armeb --enable-armv5te --enable-iwmmxt
else
else # HAVE UCLIBC
FFMPEGCONF+= --arch=armv4l
endif
endif # not HAVE_BIGENDIAN
FFMPEGCONF+= --enable-small --disable-debug --disable-mpegaudio-hp
FFMPEG_CFLAGS += -DHAVE_LRINTF --std=c99
else
else # HAVE UCLIBC
FFMPEGCONF+= --enable-libmp3lame --enable-libgsm
#--enable-libfaac
endif # not HAVE UCLIBC
ifdef HAVE_ARM_LINUX
#HOSTCONF+=
FFMPEGCONF+= --arch=armv4l
endif
ifdef HAVE_BEOS
......@@ -685,7 +690,11 @@ ifdef HAVE_DARWIN_OS
endif
.mad: libmad
ifdef HAVE_ARM_LINUX
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=${PREFIX} --enable-accuracy --enable-fpm=arm --enable-sso --disable-debugging CFLAGS="-Os" && make && make install)
else
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="-O3" && make && make install)
endif
$(INSTALL_NAME)
touch $@
......@@ -916,6 +925,9 @@ faad2-$(FAAD2_VERSION).tar.gz:
faad2: faad2-$(FAAD2_VERSION).tar.gz
$(EXTRACT_GZ)
(cd $@; sh ./bootstrap)
#ifdef HAVE_ARM_LINUX
(cd $@; sed -e 's/\/\/#define FIXED_POINT/#define FIXED_POINT/' -iorig libfaad/common.h)
#endif
.faad: faad2
(cd $< && $(HOSTCC) ./configure $(HOSTCONF) --disable-shared --prefix=$(PREFIX) CFLAGS="-O3" && sed -i.orig "s/shrext_cmds/shrext/g" libtool && make -C libfaad && make -C libfaad install)
......@@ -1293,9 +1305,13 @@ ifdef HAVE_BIGENDIAN
endif
else
(cd $<; sed -e 's%-D_FILE_OFFSET_BITS=64%-D_FILE_OFFSET_BITS=64\ -fPIC\ -DPIC%' -i.orig config.linux)
ifdef HAVE_ARM_LINUX
(cd $<; ./genMakefiles armlinux && make $(HOSTCC))
else
(cd $<; ./genMakefiles linux && make $(HOSTCC))
endif
endif
endif
endif
mkdir -p $(PREFIX)/lib $(PREFIX)/include
cp $</groupsock/libgroupsock.a $(PREFIX)/lib
......@@ -1912,7 +1928,7 @@ CIPHDIG= --enable-ciphers=aes,des,rfc2268,arcfour --enable-digests=sha1,md5,rmd1
.gcrypt: libgcrypt .gpg-error
ifdef HAVE_WIN32
(cd $<; ./autogen.sh && $(HOSTCC) ./configure $(HOSTCONF) --target=i586-mingw32msvc --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" $(CIPHDIG) --disable-shared --enable-static --disable-nls && make && make install)
(cd $<; ./autogen.sh && $(HOSTCC) ./configure $(HOSTCONF) --target=$(HOST) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" $(CIPHDIG) --disable-shared --enable-static --disable-nls && make && make install)
else
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS) -lgpg-error" $(CIPHDIG) && make && make install)
endif
......@@ -1958,7 +1974,7 @@ endif
.gnutls: gnutls .gcrypt .gpg-error
ifdef HAVE_WIN32
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --target=i586-mingw32msvc --disable-cxx -disable-shared --enable-static --disable-nls --with-included-opencdk --with-included-libtasn1 && cd lgl && make && cd ../gl && make && cd ../lib &&make && make install && cd ../includes && make install)
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --target=$(HOST) --disable-cxx -disable-shared --enable-static --disable-nls --with-included-opencdk --with-included-libtasn1 && cd lgl && make && cd ../gl && make && cd ../lib &&make && make install && cd ../includes && make install)
else
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --disable-cxx --with-included-opencdk --disable-guile && make && make install)
endif
......@@ -2121,8 +2137,8 @@ tiff: tiff-$(TIFF_VERSION).tar.gz
$(EXTRACT_GZ)
.tiff: tiff
ifdef HAVE_WIN32
(cd $<; ./configure --target=i586-mingw32msvc --with-CFLAGS="$(CFLAGS)" --with-JPEG=no --with-ZIP=no --prefix=$(PREFIX) --host=$(HOST) &&make -C port && make -C libtiff && make -C libtiff install)
if defined(HAVE_WIN32) || defined(HAVE_ARM_LINUX)
(cd $<; ./configure --target=$(HOST) --with-CFLAGS="$(CFLAGS)" --with-JPEG=no --with-ZIP=no --prefix=$(PREFIX) --host=$(HOST) &&make -C port && make -C libtiff && make -C libtiff install)
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment