changeset 866:91087aaea5c7

using gcc -MM instead of makedepend, make OBJS from SRCS where possible
author arpi_esp
date Thu, 24 May 2001 21:09:13 +0000
parents 83919c1b9924
children d2d534253395
files Makefile libmpeg2/Makefile libvo/Makefile loader/dshow/Makefile mp3lib/Makefile
diffstat 5 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu May 24 20:48:45 2001 +0000
+++ b/Makefile	Thu May 24 21:09:13 2001 +0000
@@ -21,9 +21,7 @@
 BINDIR = ${prefix}/bin
 # BINDIR = /usr/local/bin
 SRCS = asf_streaming.c find_sub.c aviprint.c dll_init.c dec_audio.c aviwrite.c aviheader.c asfheader.c demux_avi.c demux_asf.c demux_mpg.c demuxer.c stream.c codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c lirc_mp.c cfgparser.c mixer.c dvdauth.c spudec.c
-#BB: IMHO It's simplier to use the following rule:
-#OBJS = $(SRCS:.c=.o)
-OBJS = asf_streaming.o find_sub.o aviprint.o dll_init.o dec_audio.o aviwrite.o aviheader.o asfheader.o demux_avi.o demux_asf.o demux_mpg.o demuxer.o stream.o codec-cfg.o subreader.o linux/getch2.o linux/timer-lx.o linux/shmem.o xa/xa_gsm.o lirc_mp.o cfgparser.o mixer.o dvdauth.o spudec.o
+OBJS = $(SRCS:.c=.o)
 CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo $(CSS_INC) # -Wall
 A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3
 VO_LIBS = -Llibvo -lvo $(X_LIBS)
@@ -99,7 +97,7 @@
 	@for a in mp3lib libac3 libmpeg2 libvo opendivx encore loader/DirectShow ; do $(MAKE) -C $$a dep ; done
 
 .depend: Makefile config.mak config.h
-	makedepend -f- -- $(CFLAGS) -- mplayer.c mplayerHQ.c aviparse.c tvision.c $(SRCS) 1>.depend 2>/dev/null
+	$(CC) -MM $(CFLAGS) mplayer.c $(SRCS) 1>.depend
 
 # ./configure must be run if it changed in CVS
 config.h: configure
--- a/libmpeg2/Makefile	Thu May 24 20:48:45 2001 +0000
+++ b/libmpeg2/Makefile	Thu May 24 21:09:13 2001 +0000
@@ -4,7 +4,7 @@
 include ../config.mak
 
 SRCS	= header.c idct.c idct_mmx.c motion_comp.c motion_comp_mmx.c slice.c stats.c decode.c
-OBJS	= header.o idct.o idct_mmx.o motion_comp.o motion_comp_mmx.o slice.o stats.o decode.o
+OBJS	= $(SRCS:.c=.o)
 INCLUDE = -I. -I../libvo -I..
 CFLAGS  = $(OPTFLAGS) $(INCLUDE) -DMPG12PLAY
 
@@ -30,7 +30,7 @@
 depend: .depend
 
 .depend: Makefile ../config.mak ../config.h
-	makedepend -f- -- $(CFLAGS) -- $(SRCS) 1>.depend 2>/dev/null
+	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
 
 #
 # include dependency files if they exist
--- a/libvo/Makefile	Thu May 24 20:48:45 2001 +0000
+++ b/libvo/Makefile	Thu May 24 21:09:13 2001 +0000
@@ -4,7 +4,7 @@
 LIBNAME = libvo.a
 
 SRCS=aclib.c osd.c font_load.c rgb15to16mmx.c yuv2rgb_mmx.c yuv2rgb.c video_out.c vo_null.c vo_pgm.c vo_md5.c vo_odivx.c x11_common.c $(OPTIONAL_SRCS)
-OBJS=aclib.o osd.o font_load.o rgb15to16mmx.o yuv2rgb_mmx.o yuv2rgb.o video_out.o vo_null.o vo_pgm.o vo_md5.o vo_odivx.o x11_common.o $(OPTIONAL_OBJS)
+OBJS=$(SRCS:.c=.o)
 
 CFLAGS  = $(OPTFLAGS) -I. -I.. -DMPG12PLAY
 # -I/usr/X11R6/include/
@@ -31,7 +31,7 @@
 depend: .depend
 
 .depend: Makefile config.mak ../config.mak ../config.h
-	makedepend -f- -- $(CFLAGS) -- $(SRCS) 1>.depend 2>/dev/null
+	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
 
 #
 # include dependency files if they exist
--- a/loader/dshow/Makefile	Thu May 24 20:48:45 2001 +0000
+++ b/loader/dshow/Makefile	Thu May 24 21:09:13 2001 +0000
@@ -4,7 +4,9 @@
 include ../../config.mak
 
 SRCS	= DS_AudioDec.cpp DS_VideoDec.cpp DS_Filter.cpp allocator.cpp cmediasample.cpp guids.cpp inputpin.cpp outputpin.cpp
-OBJS	= DS_AudioDec.o DS_VideoDec.o DS_Filter.o allocator.o cmediasample.o guids.o inputpin.o outputpin.o
+OBJS = $(SRCS:.cpp=.o)
+
+# OBJS	= DS_AudioDec.o DS_VideoDec.o DS_Filter.o allocator.o cmediasample.o guids.o inputpin.o outputpin.o
 
 INCLUDE = -I. -I.. -I../wine
 CFLAGS  = $(OPTFLAGS) $(INCLUDE)
@@ -34,7 +36,7 @@
 depend: .depend
 
 .depend: Makefile ../../config.mak
-	makedepend -f- -- $(CFLAGS) -- $(SRCS) 1>.depend 2>/dev/null
+	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
 
 #
 # include dependency files if they exist
--- a/mp3lib/Makefile	Thu May 24 20:48:45 2001 +0000
+++ b/mp3lib/Makefile	Thu May 24 21:09:13 2001 +0000
@@ -3,6 +3,7 @@
 
 SRCS = sr1.c d_cpu.s decode_i586.s $(OPTIONAL_SRCS)
 OBJS = sr1.o d_cpu.o decode_i586.o $(OPTIONAL_OBJS)
+# OBJS = $(SRCS:.c,.s=.o)
 CFLAGS  = $(OPTFLAGS)
 
 .SUFFIXES: .c .o
@@ -36,7 +37,7 @@
 depend: .depend
 
 .depend: Makefile config.mak ../config.mak ../config.h
-	makedepend -f- -- $(CFLAGS) -- $(SRCS) 1>.depend 2>/dev/null
+	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
 
 #
 # include dependency files if they exist