summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile26
-rw-r--r--TOOLS/mpfc/Makefile4
-rw-r--r--TVout/fbset/Makefile2
-rwxr-xr-xconfigure208
-rw-r--r--drivers/Makefile3
5 files changed, 131 insertions, 112 deletions
diff --git a/Makefile b/Makefile
index a4ae7993bd..9d3a2c4c0d 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,10 @@ CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo $(CSS_INC) $(EXTRA_INC) # -Wall
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 @@ all: $(PRG) $(PRG_FIBMAP)
.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 @@ encore/libencore.a:
$(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 @@ $(PRG_FIBMAP): fibmap_mplayer.o
# 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 @@ clean:
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 @@ endif
ifneq ($(wildcard .depend),)
include .depend
endif
-
-
diff --git a/TOOLS/mpfc/Makefile b/TOOLS/mpfc/Makefile
index f82f9db47f..51cd597603 100644
--- a/TOOLS/mpfc/Makefile
+++ b/TOOLS/mpfc/Makefile
@@ -6,10 +6,10 @@ LIBS=-lgd -lttf -lpng
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)
diff --git a/TVout/fbset/Makefile b/TVout/fbset/Makefile
index 3a71024b01..d2e2ec0d4b 100644
--- a/TVout/fbset/Makefile
+++ b/TVout/fbset/Makefile
@@ -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
diff --git a/configure b/configure
index e351555ea0..4867144cff 100755
--- a/configure
+++ b/configure
@@ -116,6 +116,7 @@ usage: $0 [options]
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 @@ exit 0
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
-
-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
- ;;
-
-*) # 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.
-
- 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
+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
+
+ 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)'
+
+ # 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;;
+ 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 @@ MCONF='config.mak'
# --- 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 @@ fi
_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 @@ sparc)
_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 @@ $_cc $_extraincdir $_extralibdir -o $TMPO -lesd $TMPC 2> /dev/null || { _esd=no;
# 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 @@ do
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 @@ if test "$as_verc_fail" != "yes"; then
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!"
diff --git a/drivers/Makefile b/drivers/Makefile
index 68a1e0ce46..ef4bee4215 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -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 @@ sis_vid.o: sis_vid.c sis_vid.h
mga_vid_test: mga_vid_test.c
$(CC) -g -O -Wall $(INCLUDES) -o $@ $@.c
+dep:
+
clean:
rm -f *.o *~