changeset 1395:a721a2b91d3d

Added StrongARM crosscompiling support by Maksim Krasnyanskiy <maxk at qualcomm.com> and fixed a --datadir bug in configure.
author atmos4
date Sat, 28 Jul 2001 05:36:45 +0000
parents d9e3f91d6da9
children 3c7f13cb0a8a
files Makefile TOOLS/mpfc/Makefile TVout/fbset/Makefile configure drivers/Makefile
diffstat 5 files changed, 128 insertions(+), 109 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Fri Jul 27 17:25:19 2001 +0000
+++ b/Makefile	Sat Jul 28 05:36:45 2001 +0000
@@ -22,7 +22,10 @@
 A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3 $(ALSA_LIB) $(ESD_LIB)
 VO_LIBS = -Llibvo -lvo $(X_LIBS)
 
+PARTS = mp3lib libac3 libmpeg2 opendivx libavcodec encore libvo libao2 drivers drivers/syncfb
+
 ifeq ($(TARGET_ARCH_X86),yes)
+PARTS += loader loader/DirectShow
 SRCS += dll_init.c
 LOADER_DEP = loader/libloader.a $(DS_DEP)
 LIB_LOADER = -Lloader -lloader $(DS_LIB)
@@ -42,7 +45,7 @@
 .c.o:
 	$(CC) -c $(CFLAGS) -o $@ $<
 
-COMMONLIBS = libvo/libvo.a libao2/libao2.a libac3/libac3.a mp3lib/libMP3.a
+COMMONLIBS = libvo/libvo.a libao2/libao2.a libac3/libac3.a mp3lib/libMP3.a libmpeg2/libmpeg2.a opendivx/libdecore.a encore/libencore.a
 
 loader/libloader.a:
 	$(MAKE) -C loader
@@ -75,10 +78,9 @@
 	$(MAKE) -C encore
 
 
-MPLAYER_DEP = mplayer.o $(OBJS) $(LOADER_DEP) $(AV_DEP) libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
-
+MPLAYER_DEP = mplayer.o $(OBJS) $(LOADER_DEP) $(AV_DEP) $(COMMONLIBS) 
 mplayerwithoutlink: $(MPLAYER_DEP)	
-	@for a in mp3lib libac3 libmpeg2 libvo opendivx libavcodec encore loader/DirectShow ; do $(MAKE) -C $$a all ; done
+	@for a in $(PARTS); do $(MAKE) -C $$a all ; done
 
 $(PRG):	$(MPLAYER_DEP)
 	$(CC) $(CFLAGS) -o $(PRG) mplayer.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) $(LIB_LOADER) $(AV_LIB) -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 $(VO_LIBS) $(CSS_LIB) -Lencore -lencore $(DECORE_LIBS) $(ARCH_LIBS)
@@ -102,7 +104,7 @@
 # finish before be can start builing new object files.
 $(MPLAYER_DEP): version.h
 
-$(PRG_CFG):        version.h codec-cfg.c codec-cfg.h
+$(PRG_CFG): version.h codec-cfg.c codec-cfg.h
 	$(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DCODECS2HTML
 
 install: $(PRG) $(PRG_FIBMAP)
@@ -120,23 +122,15 @@
 	rm -f *.o *~ $(OBJS)
 
 distclean:
-	@for a in mp3lib libac3 libmpeg2 opendivx libavcodec encore libvo libao2 loader loader/DirectShow drivers drivers/syncfb ; do \
-		if [ -d $$a ] ;  then \
-			$(MAKE) -C $$a distclean ; \
-		fi; \
-	done
 	rm -f *~ $(PRG) $(PRG_FIBMAP) $(PRG_HQ) $(PRG_AVIP) $(PRG_TV) $(OBJS) *.o *.a .depend
+	@for a in $(PARTS); do $(MAKE) -C $$a distclean; done
 
 dep:	depend
 
 depend:
 	./version.sh
 	$(CC) -MM $(CFLAGS) mplayer.c $(SRCS) 1>.depend
-	@for a in mp3lib libac3 libmpeg2 libvo libao2 opendivx libavcodec encore loader/DirectShow ; do \
-		if [ -d $$a ] ; then \
-			$(MAKE) -C $$a dep ; \
-		fi ; \
-	done
+	@for a in $(PARTS); do $(MAKE) -C $$a dep; done
 
 # ./configure must be run if it changed in CVS
 config.h: configure
@@ -162,5 +156,3 @@
 ifneq ($(wildcard .depend),)
 include .depend
 endif
-
-
--- a/TOOLS/mpfc/Makefile	Fri Jul 27 17:25:19 2001 +0000
+++ b/TOOLS/mpfc/Makefile	Sat Jul 28 05:36:45 2001 +0000
@@ -6,10 +6,10 @@
 all: $(TARGET)
 
 mpfc-ce: mpfc-ce.c
-	gcc -Wall -O2 -o $@ $< $(LIBS)
+	$(CC) -Wall -O2 -o $@ $< $(LIBS)
 
 mpfc-kr: mpfc-kr.c
-	gcc -Wall -O2 -o $@ $< $(LIBS)
+	$(CC) -Wall -O2 -o $@ $< $(LIBS)
 
 clean:
 	-rm -f $(TARGET)
--- a/TVout/fbset/Makefile	Fri Jul 27 17:25:19 2001 +0000
+++ b/TVout/fbset/Makefile	Sat Jul 28 05:36:45 2001 +0000
@@ -2,7 +2,7 @@
 # Linux Frame Buffer Device Configuration
 #
 
-CC =		gcc -Wall -O2 -I.
+CC =		$(CC) -Wall -O2 -I.
 BISON =		bison -d
 FLEX =		flex
 INSTALL =	install
--- a/configure	Fri Jul 27 17:25:19 2001 +0000
+++ b/configure	Sat Jul 28 05:36:45 2001 +0000
@@ -116,6 +116,7 @@
 
 params:
         --cc                    use this C compiler to build MPlayer [gcc]
+	--target=PLATFORM       target platform (i386-linux, arm-linux, etc)
 	--prefix=DIR		use this prefix for installing mplayer [/usr/local]
 	--datadir=DIR           use this prefix for installing machine independent
 				data [/usr/local/share/mplayer] 
@@ -181,41 +182,96 @@
 fi
 done # for parm in ...
 
+if [ "$CC" != "" ]; then
+  _cc=$CC
+else
+  _cc=gcc
+fi
+
+_as=auto
+_x11=auto
+
+for ac_option; do
+ case "$ac_option" in
+  --target=*)
+        _target=`echo $ac_option | cut -d '=' -f 2`
+        ;;
+  --cc=*)
+        _cc=`echo $ac_option | cut -d '=' -f 2`
+        ;;
+  --as=*)
+        _as=`echo $ac_option | cut -d '=' -f 2`
+        ;;
+  --disable-gcc-checking)
+        _skip_cc_check=yes
+	;;
+  --disable-as-checking)
+        _skip_as_check=yes
+	;;
+  --with-x11libdir=*)
+        _x11libdir=-L`echo $ac_option | cut -d '=' -f 2`
+        ;;
+  --with-x11incdir=*)
+        _x11incdir=-I`echo $ac_option | cut -d '=' -f 2`
+        ;;
+  --enable-x11)
+        _x11=yes
+        ;;
+  --disable-x11)
+        _x11=no
+        ;;
+  --with-sdl-config=*)
+        _sdlconfig=`echo $ac_option | cut -d '=' -f 2`
+        ;;
+  --with-extralibdir=*)
+        _extralibdir=-L`echo $ac_option | cut -d '=' -f 2`
+        ;;
+  --with-extraincdir=*)
+        _extraincdir=-I`echo $ac_option | cut -d '=' -f 2`
+        ;;
+ esac
+done
 
 # LGB: Some inital help
 
 echo "You can get detailed help on configure with: $0 --help"
 echo "Please wait while ./configure discovers your software and hardware environment!"
 
-
 # Determine our OS name and CPU architecture
+if [ "$_target" == "" ]; then
+   system_name=`uname -s 2>&1` # name of operating system: Linux, FreeBSD, NetBSD, SunOS
+   host_arch=`uname -p 2>&1`   # host's instruction set or processor type
 
-system_name=`uname -s 2>&1` # name of operating system: Linux, FreeBSD, NetBSD, SunOS
-host_arch=`uname -p 2>&1`   # host's instruction set or processor type
-case "$host_arch" in
-i386|sparc|ppc|alpha)
-    # fine, uname -p output looks good, it has returned
-    # something this configure script recognizes
-    ;;
+   case "$host_arch" in
+   i386|sparc|ppc|alpha|arm)
+       # fine, uname -p output looks good, it has returned
+       # something this configure script recognizes
+       ;;
 
-*)  # uname -p on Linux returns 'unknown' for the processor type,
-    # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
+   *)  # uname -p on Linux returns 'unknown' for the processor type,
+       # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
+
+       # Maybe uname -m (machine hardware name) returns something we
+       # recognize.
 
-    # Maybe uname -m (machine hardware name) returns something we
-    # recognize.
-
-    case "`uname -m 2>&1`" in
-    i[3-9]86)
-	host_arch=i386;;
-    ppc)
-	host_arch=ppc;;
-    alpha)
-	host_arch=alpha;;
-    sparc64)
-	host_arch=sparc;;
-    esac
-    ;;
-esac
+       case "`uname -m 2>&1`" in
+       i[3-9]86)
+           host_arch=i386;;
+       ppc)
+           host_arch=ppc;;
+       alpha)
+           host_arch=alpha;;
+       sparc*)
+           host_arch=sparc;;
+       arm*)
+           host_arch=arm;;
+       esac
+       ;;
+   esac
+else
+   system_name=`echo $_target | cut -d '-' -f 2`
+   host_arch=`echo $_target | cut -d '-' -f 1`
+fi
 
 # Determine OS dependent libs
 
@@ -257,26 +313,24 @@
 
 # ---  Check for C compiler:
 
-_cc=gcc
-_as=auto
-_x11=auto
-
-_x11libdir=
-if [ -d /usr/X11R6 ]; then
- _x11libdir=-L/usr/X11R6/lib
-else
- if [ -d /usr/X11 ]; then
-  _x11libdir=-L/usr/X11/lib
- fi
+if [ "$_x11libdir" = "" ]; then
+   if [ -d /usr/X11R6 ]; then
+      _x11libdir=-L/usr/X11R6/lib
+   else
+      if [ -d /usr/X11 ]; then
+         _x11libdir=-L/usr/X11/lib
+      fi
+   fi
 fi
 
-_x11incdir=
-if [ -d /usr/include/X11 ]; then
- _x11incdir=
-elif [ -d /usr/X11R6 ]; then
- _x11incdir=-I/usr/X11R6/include
-elif [ -d /usr/X11 ]; then
- _x11incdir=-I/usr/X11/include
+if [ "$_x11incdir" = "" ]; then
+   if [ -d /usr/include/X11 ]; then
+      _x11incdir=
+   elif [ -d /usr/X11R6 ]; then
+      _x11incdir=-I/usr/X11R6/include
+   elif [ -d /usr/X11 ]; then
+      _x11incdir=-I/usr/X11/include
+   fi
 fi
 
 # Lots of stuff are installed under /usr/local
@@ -284,53 +338,12 @@
 _extralibdir=-L/usr/local/lib
 _extraincdir=-I/usr/local/include
 
-_skip_cc_check=no
-_skip_as_check=no
 if [ "$system_name" = "FreeBSD" ]; then
 _sdlconfig='sdl11-config'
 else
 _sdlconfig='sdl-config'
 fi
 
-for ac_option
-do
- case "$ac_option" in
-  --cc=*)
-        _cc=`echo $ac_option | cut -d '=' -f 2`
-        ;;
-  --as=*)
-        _as=`echo $ac_option | cut -d '=' -f 2`
-        ;;
-  --disable-gcc-checking)
-        _skip_cc_check=yes
-	;;
-  --disable-as-checking)
-        _skip_as_check=yes
-	;;
-  --with-x11libdir=*)
-        _x11libdir=-L`echo $ac_option | cut -d '=' -f 2`
-        ;;
-  --with-x11incdir=*)
-        _x11incdir=-I`echo $ac_option | cut -d '=' -f 2`
-        ;;
-  --enable-x11)
-        _x11=yes
-        ;;
-  --disable-x11)
-        _x11=no
-        ;;
-  --with-sdl-config=*)
-        _sdlconfig=`echo $ac_option | cut -d '=' -f 2`
-        ;;
-  --with-extralibdir=*)
-        _extralibdir=-L`echo $ac_option | cut -d '=' -f 2`
-        ;;
-  --with-extraincdir=*)
-        _extraincdir=-I`echo $ac_option | cut -d '=' -f 2`
-        ;;
- esac
-done
-
 # ---
 
 # Checking CC version...
@@ -645,6 +658,16 @@
     _mcpu="-mcpu=$proc"
     ;;
 
+arm)
+    _arch="#define ARCH_ARM 1"
+    _target_arch="TARGET_ARCH_ARM=yes"
+    _words_endian="#undef WORDS_BIGENDIAN"
+    iproc=arm
+    proc=
+    _march=""
+    _mcpu=""
+    ;;
+
 # Untested:
 #ppc)
 #    _arch="#define ARCH_PPC 1"
@@ -919,10 +942,8 @@
 # check for the parameters.
 
 _prefix="/usr/local"
-_datadir=$_prefix"/share/mplayer"
 
-for ac_option
-do
+for ac_option; do
  case "$ac_option" in
   --enable-profile)
   	_profile='-p'
@@ -1156,6 +1177,11 @@
  esac
 done
 
+# Atmos: moved this here, to be correct, if --prefix is specified
+if test x"$_datadir" = x; then
+	_datadir=$_prefix"/share/mplayer"
+fi
+
 # Checking assembler (_as) compatibility...
 as_version=`$_as --version 2>&1 | sed -n 's/^.*assembler \([0-9.]*\).*$/\1/p'`
 echo $_echo_n "Checking assembler ($_as) ... $as_version, $_echo_c"
@@ -1218,7 +1244,7 @@
 else
   echo "failed"
   echo "Please upgrade(downgrade) binutils to "$_pref_as_version"..."
-  if [ $_skip_as_check = 'no' ]; then
+  if [ "$_skip_as_check" != "yes" ]; then
     exit
   else
     echo "YOU'VE SELECTED '--disable-as-checking'. PLEASE DON'T SEND US ANY BUGREPORTS!"
--- a/drivers/Makefile	Fri Jul 27 17:25:19 2001 +0000
+++ b/drivers/Makefile	Sat Jul 28 05:36:45 2001 +0000
@@ -1,5 +1,4 @@
 
-CC = gcc
 KERNEL_INCLUDES = /usr/src/linux/include
 INCLUDES = -I$(KERNEL_INCLUDES)
 CFLAGS = -g -O2  -Wall -D__KERNEL__  -DMODULE  	 -include $(KERNEL_INCLUDES)/linux/modversions.h
@@ -16,6 +15,8 @@
 mga_vid_test: mga_vid_test.c
 	$(CC) -g -O -Wall $(INCLUDES) -o $@ $@.c
 
+dep:
+
 clean: 
 	rm -f *.o *~