Independed compilation of SUBDIRS

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2445 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nick 2001-10-24 07:34:41 +00:00
parent afc0724236
commit 8e91467d3a
4 changed files with 103 additions and 5 deletions

View File

@ -16,13 +16,16 @@ PRG_CFG = codec-cfg
#prefix = /usr/local
BINDIR = ${prefix}/bin
# BINDIR = /usr/local/bin
SRCS = ima4.c xacodec.c cpudetect.c postproc/swscale.c postproc/postprocess.c mp_msg.c ac3-iec958.c find_sub.c dec_audio.c dec_video.c codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c xa/rle8.c lirc_mp.c cfgparser.c mixer.c spudec.c
SRCS = ima4.c xacodec.c cpudetect.c mp_msg.c ac3-iec958.c find_sub.c dec_audio.c dec_video.c codec-cfg.c subreader.c lirc_mp.c cfgparser.c mixer.c spudec.c
OBJS = $(SRCS:.c=.o)
CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(CSS_INC) $(EXTRA_INC) $(MADLIB_INC) # -Wall
A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3 $(ALSA_LIB) $(ESD_LIB) $(MADLIB_LIB)
VO_LIBS = -Llibvo -lvo $(MLIB_LIB) $(X_LIBS)
OSDEP_LIBS = -Llinux -losdep
PP_LIBS = -Lpostproc -lpostproc
XA_LIBS = -Lxa -lxa
PARTS = libmpdemux mp3lib libac3 libmpeg2 opendivx libavcodec encore libvo libao2 drivers drivers/syncfb
PARTS = libmpdemux mp3lib libac3 libmpeg2 opendivx libavcodec encore libvo libao2 drivers drivers/syncfb linux postproc xa
ifeq ($(GUI),yes)
PARTS += Gui
endif
@ -50,7 +53,7 @@ all: $(ALL_PRG)
.c.o:
$(CC) -c $(CFLAGS) -o $@ $<
COMMONLIBS = libmpdemux/libmpdemux.a libvo/libvo.a libao2/libao2.a libac3/libac3.a mp3lib/libMP3.a libmpeg2/libmpeg2.a opendivx/libdecore.a encore/libencore.a
COMMONLIBS = libmpdemux/libmpdemux.a libvo/libvo.a libao2/libao2.a libac3/libac3.a mp3lib/libMP3.a libmpeg2/libmpeg2.a opendivx/libdecore.a encore/libencore.a linux/libosdep.a postproc/libpostproc.a xa/libxa.a
loader/libloader.a:
$(MAKE) -C loader
@ -88,6 +91,15 @@ encore/libencore.a:
Gui/libgui.a:
$(MAKE) -C Gui
linux/libosdep.a:
$(MAKE) -C linux
postproc/libpostproc.a:
$(MAKE) -C postproc
xa/libxa.a:
$(MAKE) -C xa
MPLAYER_DEP = mplayer.o $(OBJS) $(LOADER_DEP) $(AV_DEP) $(COMMONLIBS)
ifeq ($(GUI),yes)
MPLAYER_DEP += Gui/libgui.a
@ -96,7 +108,7 @@ mplayerwithoutlink: $(MPLAYER_DEP)
@for a in $(PARTS); do $(MAKE) -C $$a all ; done
$(PRG): $(MPLAYER_DEP)
$(CC) -rdynamic $(CFLAGS) -o $(PRG) mplayer.o -Llibmpdemux -lmpdemux $(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) $(GUI_LIBS) $(ARCH_LIBS)
$(CC) -rdynamic $(CFLAGS) -o $(PRG) mplayer.o -Llibmpdemux -lmpdemux $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) $(LIB_LOADER) $(AV_LIB) -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 $(VO_LIBS) $(CSS_LIB) -Lencore -lencore $(GUI_LIBS) $(ARCH_LIBS) $(OSDEP_LIBS) $(PP_LIBS) $(XA_LIBS) $(DECORE_LIBS)
$(PRG_FIBMAP): fibmap_mplayer.o
$(CC) -o $(PRG_FIBMAP) fibmap_mplayer.o

View File

@ -9,7 +9,7 @@ OBJS=$(SRCS:.c=.o)
ifeq ($(TARGET_ARCH_X86),yes)
SRCS += rgb15to16mmx.c yuv2rgb_mmx.c
ifeq ($(TARGET_OS),Linux)
SRCS += vo_vesa.c ../linux/lrmi.c ../linux/vbelib.c
SRCS += vo_vesa.c
endif
endif

46
linux/Makefile Normal file
View File

@ -0,0 +1,46 @@
include ../config.mak
LIBNAME = libosdep.a
SRCS=getch2.c timer-lx.c shmem.c
OBJS=$(SRCS:.c=.o)
ifeq ($(TARGET_ARCH_X86),yes)
ifeq ($(TARGET_OS),Linux)
SRCS += lrmi.c vbelib.c
endif
endif
CFLAGS = $(OPTFLAGS) -I. -I.. -Wall
# -I/usr/X11R6/include/
.SUFFIXES: .c .o
# .PHONY: all clean
.c.o:
$(CC) -c $(CFLAGS) -o $@ $<
$(LIBNAME): $(OBJS)
$(AR) r $(LIBNAME) $(OBJS)
all: $(LIBNAME)
clean:
rm -f *.o *.a *~
distclean:
rm -f Makefile.bak *.o *.a *~ .depend
dep: depend
depend:
$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
#
# include dependency files if they exist
#
ifneq ($(wildcard .depend),)
include .depend
endif

40
postproc/Makefile Normal file
View File

@ -0,0 +1,40 @@
include ../config.mak
LIBNAME = libpostproc.a
SRCS=postprocess.c swscale.c
OBJS=$(SRCS:.c=.o)
CFLAGS = $(OPTFLAGS) -I. -I.. -Wall
# -I/usr/X11R6/include/
.SUFFIXES: .c .o
# .PHONY: all clean
.c.o:
$(CC) -c $(CFLAGS) -o $@ $<
$(LIBNAME): $(OBJS)
$(AR) r $(LIBNAME) $(OBJS)
all: $(LIBNAME)
clean:
rm -f *.o *.a *~
distclean:
rm -f Makefile.bak *.o *.a *~ .depend
dep: depend
depend:
$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
#
# include dependency files if they exist
#
ifneq ($(wildcard .depend),)
include .depend
endif