[PATCH] TOOLS: Makefile instead of c (was: Re: [MPlayer-dev-eng] documentation of TOOLS directory)

Diego Biurrun diego at biurrun.de
Wed Aug 4 15:22:53 CEST 2004


Shachar Raindel writes:
> On Tue, 3 Aug 2004 10:44:43 +0200 (CEST), VMiklos <mamajom at axelero.hu> wrote:
> > On Tue, 3 Aug 2004, Shachar Raindel wrote:
> > 
> > > B. IMHO, you want to split fastmemcpybench: target to a large number
> > > of different targets, with the general rule that there should be
> > > target for each file created on the hard disk. This allows make to do
> > > better decisions about what it should recompile, and allows the
> > > programmer who is only interested in the version to his CPU to build
> > > only this version, without wasting the disk-space and time needed to
> > > compile a version for each CPU mplayer is optimized for.
> > 
> > imho it is necessary, see fastmem.sh
> > 
> How about making a target that will require all of these files,
> without build rules, and having a build rule for each of the files?
> This is the way makefiles are suppose to be written - otherwise, you
> won't have correct rebuilds.

Then you should like what is currently in my local tree, I'll probably
commit it later today.

Diego


OBJS = asfinfo avi-fix bios2dump cpuinfo dump_mp4 mem2dump movinfo png2raw subrip fastmemcpybench

all: $(OBJS)

png2raw: png2raw.c
	cc png2raw.c -o png2raw -lpng

subrip: subrip.c
	cc -g -I.. -o subrip subrip.c ../vobsub.o ../spudec.o ../mp_msg.o ../unrarlib.o ../postproc/swscale.o ../postproc/rgb2rgb.o ../postproc/yuv2rgb.o ../libmpcodecs/img_format.o -lm

vivodump: vivodump.c
	cc -I.. -o vivodump vivodump.c ../mp_msg.o ../libmpdemux/libmpdemux.a

fastmemcpybench: fastmemcpybench.c
	cc -g ../libvo/aclib.o -DNAME=\"mmx\"      -DHAVE_MMX fastmemcpybench.c -o fastmem-mmx
	cc -g ../libvo/aclib.o -DNAME=\"k6\ \"     -DHAVE_3DNOW -DHAVE_MMX fastmemcpybench.c -o fastmem-k6
	cc -g ../libvo/aclib.o -DNAME=\"k7\ \"     -DHAVE_MMX2  -DHAVE_3DNOW -DHAVE_MMX fastmemcpybench.c -o fastmem-k7
	cc -g ../libvo/aclib.o -DNAME=\"sse\"      -DHAVE_MMX2  -DHAVE_SSE   -DHAVE_MMX fastmemcpybench.c -o fastmem-sse
	cc -g ../libvo/aclib.o -DNAME=\"mga-mmx\"  -DHAVE_MGA   -DHAVE_MMX fastmemcpybench.c -o fastmem2-mmx
	cc -g ../libvo/aclib.o -DNAME=\"mga-k6\ \" -DHAVE_MGA   -DHAVE_3DNOW -DHAVE_MMX fastmemcpybench.c -o fastmem2-k6
	cc -g ../libvo/aclib.o -DNAME=\"mga-k7\ \" -DHAVE_MGA   -DHAVE_MMX2  -DHAVE_3DNOW -DHAVE_MMX fastmemcpybench.c -o fastmem2-k7
	cc -g ../libvo/aclib.o -DNAME=\"mga-sse\"  -DHAVE_MGA   -DHAVE_MMX2  -DHAVE_SSE   -DHAVE_MMX fastmemcpybench.c -o fastmem2-sse

clean:
	rm -f $(OBJS)
	rm -f fastmem-mmx fastmem-k6 fastmem-k7 fastmem-sse fastmem2-mmx fastmem2-k6 fastmem2-k7 fastmem2-sse




More information about the MPlayer-dev-eng mailing list