view TOOLS/Makefile @ 23978:ef6e50c3c172

Revert setting audio output channel count for FFmpeg The FFmpeg API needs to be fixed before this can be done sanely. ffdca wants the desired output channel count to be set in avctx->channels. Unfortunately it also completely fails if the requested number of channels is not available rather than returning a different amount (if 6 channels are requested we'd probably rather use stereo than fail completely). ffvorbis ignores caller-set values in avctx->channels. It writes the channel count there once during init. This means the caller can only set the count before init because later there would be no indication whether the channel count in avctx reflects real output. ffwma requires the caller to supply the encoded channel count in avctx->channels during init or it fails. So it is not possible to set a different number of desired output channels there before init either.
author uau
date Thu, 02 Aug 2007 21:54:14 +0000
parents d8cfd3a1300e
children f579fc609048
line wrap: on
line source

include ../config.mak

CFLAGS = -I..

OBJS = alaw-gen$(EXESUF) \
	asfinfo$(EXESUF) \
	avi-fix$(EXESUF) \
	avisubdump$(EXESUF) \
	dump_mp4$(EXESUF) \
	movinfo$(EXESUF) \
	subrip$(EXESUF) \
#	vivodump$(EXESUF) \

all: $(OBJS)

subrip$(EXESUF): subrip.c
	$(CC) $(CFLAGS) -g -o $@ $< ../vobsub.o ../spudec.o ../mp_msg.o \
          ../unrarlib.o ../libswscale/libswscale.a ../libavutil/libavutil.a \
          ../libmpcodecs/img_format.o ../osdep/getch2.o -ltermcap -lm

#FIXME: Linking is broken, help welcome.
vivodump$(EXESUF): vivodump.c
	$(CC) $(CFLAGS) -o $@ $< ../mp_msg.o ../libmpdemux/libmpdemux.a \
           ../stream/stream.a ../osdep/getch2.o -ltermcap -lm

fastmemcpybench: fastmemcpybench.c
	$(CC) $(CFLAGS) -g $< -o fastmem-mmx$(EXESUF)  ../libvo/aclib.o -DNAME=\"mmx\"      -DHAVE_MMX
	$(CC) $(CFLAGS) -g $< -o fastmem-k6$(EXESUF)   ../libvo/aclib.o -DNAME=\"k6\ \"     -DHAVE_MMX -DHAVE_3DNOW
	$(CC) $(CFLAGS) -g $< -o fastmem-k7$(EXESUF)   ../libvo/aclib.o -DNAME=\"k7\ \"     -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
	$(CC) $(CFLAGS) -g $< -o fastmem-sse$(EXESUF)  ../libvo/aclib.o -DNAME=\"sse\"      -DHAVE_MMX -DHAVE_SSE   -DHAVE_MMX2
	$(CC) $(CFLAGS) -g $< -o fastmem2-mmx$(EXESUF) ../libvo/aclib.o -DNAME=\"mga-mmx\"  -DHAVE_MGA -DHAVE_MMX
	$(CC) $(CFLAGS) -g $< -o fastmem2-k6$(EXESUF)  ../libvo/aclib.o -DNAME=\"mga-k6\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW
	$(CC) $(CFLAGS) -g $< -o fastmem2-k7$(EXESUF)  ../libvo/aclib.o -DNAME=\"mga-k7\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
	$(CC) $(CFLAGS) -g $< -o fastmem2-sse$(EXESUF) ../libvo/aclib.o -DNAME=\"mga-sse\"  -DHAVE_MGA -DHAVE_MMX -DHAVE_SSE   -DHAVE_MMX2

bmovl-test$(EXESUF): bmovl-test.c
	$(CC) -O3 $(EXTRA_INC) -o $@ $< -lSDL_image

vfw2menc$(EXESUF): vfw2menc.c
	$(CC) $< -o $@ -lwinmm -lole32

REAL_SRCS    = $(wildcard realcodecs/*.c)
REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0)

realcodecs: $(REAL_TARGETS)
realcodecs: CFLAGS += -g

%.so.6.0: %.o
	ld -shared -o $@ $< -ldl -lc

# FIXME: netstream linking is a mess that should be fixed properly some day.
# It does not work with either GUI, LIVE555, libavformat, cdparanoia enabled.
NETSTREAM_DEPS = ../libmpdemux/libmpdemux.a \
                 ../stream/stream.a \
                 ../dvdread/libdvdread.a \
                 ../libdvdcss/libdvdcss.a \
                 ../libavutil/libavutil.a \
                 ../m_option.o \
                 ../m_struct.o \
                 ../mp_msg.o \
                 ../osdep/libosdep.a \
                 -ltermcap -lm \

ifeq ($(TARGET_WIN32),yes)
NETSTREAM_DEPS += -lwsock32
endif

netstream: netstream.o $(NETSTREAM_DEPS)
	$(CC) -o $@ $^

clean distclean:
	rm -f *.o *~ $(OBJS)
	rm -f fastmem-* fastmem2-* fastmemcpybench netstream
	rm -f bmovl-test$(EXESUF) vfw2menc$(EXESUF)
	rm -f $(REAL_TARGETS)