2002-05-26 00:34:32 +02:00
|
|
|
#
|
|
|
|
# libavformat Makefile
|
2003-09-16 22:29:19 +02:00
|
|
|
# (c) 2000-2003 Fabrice Bellard
|
2002-05-26 00:34:32 +02:00
|
|
|
#
|
2001-07-23 22:06:54 +02:00
|
|
|
include ../config.mak
|
2002-05-19 01:07:57 +02:00
|
|
|
|
2002-11-29 15:56:03 +01:00
|
|
|
VPATH=$(SRC_PATH)/libavformat
|
2002-05-19 01:07:57 +02:00
|
|
|
|
2003-10-18 20:47:06 +02:00
|
|
|
CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2003-09-08 23:20:55 +02:00
|
|
|
OBJS= utils.o cutils.o os_support.o allformats.o
|
2003-02-06 16:09:39 +01:00
|
|
|
PPOBJS=
|
2002-05-20 18:31:13 +02:00
|
|
|
|
|
|
|
# mux and demuxes
|
2004-07-15 20:32:54 +02:00
|
|
|
OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o \
|
2005-07-15 14:50:00 +02:00
|
|
|
avienc.o avidec.o wav.o mmf.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
|
2003-09-05 20:45:32 +02:00
|
|
|
yuv4mpeg.o 4xm.o flvenc.o flvdec.o movenc.o psxstr.o idroq.o ipmovie.o \
|
2004-01-02 05:47:02 +01:00
|
|
|
nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \
|
2005-04-09 17:32:58 +02:00
|
|
|
sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o asf.o asf-enc.o \
|
2005-05-12 00:47:26 +02:00
|
|
|
ogg2.o oggparsevorbis.o oggparsetheora.o oggparseflac.o
|
2004-12-30 00:17:42 +01:00
|
|
|
AMROBJS=
|
2003-10-14 13:36:03 +02:00
|
|
|
ifeq ($(AMR_NB),yes)
|
2004-12-30 00:17:42 +01:00
|
|
|
AMROBJS= amr.o
|
2003-10-14 13:36:03 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(AMR_NB_FIXED),yes)
|
2004-12-30 00:17:42 +01:00
|
|
|
AMROBJS= amr.o
|
2003-10-14 13:36:03 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(AMR_WB),yes)
|
2004-12-30 00:17:42 +01:00
|
|
|
AMROBJS= amr.o
|
2003-06-05 16:30:52 +02:00
|
|
|
endif
|
2004-12-30 00:17:42 +01:00
|
|
|
OBJS+= $(AMROBJS)
|
2003-06-05 16:30:52 +02:00
|
|
|
|
2003-01-11 06:02:14 +01:00
|
|
|
# image formats
|
2004-03-13 18:30:37 +01:00
|
|
|
OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
|
2002-05-20 18:31:13 +02:00
|
|
|
# file I/O
|
|
|
|
OBJS+= avio.o aviobuf.o file.o
|
2003-01-11 06:02:14 +01:00
|
|
|
OBJS+= framehook.o
|
2001-08-13 23:37:10 +02:00
|
|
|
|
2002-05-26 00:34:32 +02:00
|
|
|
ifeq ($(CONFIG_VIDEO4LINUX),yes)
|
|
|
|
OBJS+= grab.o
|
2001-08-13 23:37:10 +02:00
|
|
|
endif
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2005-06-25 11:04:08 +02:00
|
|
|
ifeq ($(CONFIG_BKTR),yes)
|
|
|
|
OBJS+= grab_bktr.o
|
|
|
|
endif
|
|
|
|
|
2003-01-22 23:40:52 +01:00
|
|
|
ifeq ($(CONFIG_DV1394),yes)
|
|
|
|
OBJS+= dv1394.o
|
|
|
|
endif
|
|
|
|
|
2004-10-22 04:04:30 +02:00
|
|
|
ifeq ($(CONFIG_DC1394),yes)
|
|
|
|
OBJS+= dc1394.o
|
|
|
|
endif
|
|
|
|
|
2002-05-26 00:34:32 +02:00
|
|
|
ifeq ($(CONFIG_AUDIO_OSS),yes)
|
|
|
|
OBJS+= audio.o
|
|
|
|
endif
|
|
|
|
|
2002-11-05 01:38:06 +01:00
|
|
|
ifeq ($(CONFIG_AUDIO_BEOS),yes)
|
2003-02-06 16:09:39 +01:00
|
|
|
PPOBJS+= beosaudio.o
|
2003-07-15 15:35:20 +02:00
|
|
|
EXTRALIBS+=-lbe -lmedia
|
2002-11-05 01:38:06 +01:00
|
|
|
endif
|
|
|
|
|
2002-05-26 00:34:32 +02:00
|
|
|
ifeq ($(CONFIG_NETWORK),yes)
|
2002-07-24 20:04:24 +02:00
|
|
|
OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
|
2003-02-06 16:09:39 +01:00
|
|
|
# BeOS and Darwin network stuff
|
2002-11-27 03:45:14 +01:00
|
|
|
ifeq ($(NEED_INET_ATON),yes)
|
2002-11-02 11:35:07 +01:00
|
|
|
OBJS+= barpainet.o
|
|
|
|
endif
|
2001-08-16 00:33:03 +02:00
|
|
|
endif
|
|
|
|
|
2005-02-24 16:18:02 +01:00
|
|
|
ifeq ($(CONFIG_LIBOGG),yes)
|
2002-09-01 20:07:56 +02:00
|
|
|
OBJS+= ogg.o
|
|
|
|
endif
|
|
|
|
|
2004-04-24 17:16:23 +02:00
|
|
|
ifeq ($(TARGET_ARCH_SPARC64),yes)
|
|
|
|
CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
|
|
|
|
endif
|
|
|
|
|
2003-01-11 21:34:38 +01:00
|
|
|
LIB= $(LIBPREF)avformat$(LIBSUF)
|
2003-07-11 23:33:27 +02:00
|
|
|
ifeq ($(BUILD_SHARED),yes)
|
|
|
|
SLIB= $(SLIBPREF)avformat$(SLIBSUF)
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2005-05-08 17:04:59 +02:00
|
|
|
AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec
|
2004-11-21 00:10:07 +01:00
|
|
|
ifeq ($(CONFIG_MP3LAME),yes)
|
2005-03-11 12:34:31 +01:00
|
|
|
AVCLIBS+=-lmp3lame
|
|
|
|
endif
|
2004-11-21 00:10:07 +01:00
|
|
|
endif
|
|
|
|
|
2003-02-06 16:09:39 +01:00
|
|
|
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
|
2003-01-14 16:30:42 +01:00
|
|
|
|
2003-07-11 23:33:27 +02:00
|
|
|
all: $(LIB) $(SLIB)
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2003-02-06 16:09:39 +01:00
|
|
|
$(LIB): $(OBJS) $(PPOBJS)
|
2001-07-22 16:37:44 +02:00
|
|
|
rm -f $@
|
2003-02-06 16:09:39 +01:00
|
|
|
$(AR) rc $@ $(OBJS) $(PPOBJS)
|
2002-09-02 18:48:40 +02:00
|
|
|
$(RANLIB) $@
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2003-07-11 23:33:27 +02:00
|
|
|
$(SLIB): $(OBJS)
|
2003-09-16 00:27:43 +02:00
|
|
|
ifeq ($(CONFIG_WIN32),yes)
|
2005-03-15 13:37:39 +01:00
|
|
|
$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
|
2003-09-04 10:21:27 +02:00
|
|
|
-lib /machine:i386 /def:$(@:.dll=.def)
|
|
|
|
else
|
2005-07-11 02:15:37 +02:00
|
|
|
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
|
2003-09-04 10:21:27 +02:00
|
|
|
endif
|
2003-07-11 23:33:27 +02:00
|
|
|
|
2003-02-01 21:53:07 +01:00
|
|
|
depend: $(SRCS)
|
2003-01-22 10:53:25 +01:00
|
|
|
$(CC) -MM $(CFLAGS) $^ 1>.depend
|
|
|
|
|
2003-07-11 23:33:27 +02:00
|
|
|
ifeq ($(BUILD_SHARED),yes)
|
2003-09-16 00:27:43 +02:00
|
|
|
install: all install-headers
|
|
|
|
ifeq ($(CONFIG_WIN32),yes)
|
2004-10-01 15:32:13 +02:00
|
|
|
install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
|
2003-09-16 00:27:43 +02:00
|
|
|
else
|
2005-03-16 20:11:58 +01:00
|
|
|
install -d $(libdir)
|
|
|
|
install $(INSTALLSTRIP) -m 755 $(SLIB) $(libdir)/libavformat-$(VERSION).so
|
|
|
|
ln -sf libavformat-$(VERSION).so $(libdir)/libavformat.so
|
2005-05-23 01:58:58 +02:00
|
|
|
$(LDCONFIG) || true
|
2003-09-16 00:27:43 +02:00
|
|
|
endif
|
|
|
|
else
|
|
|
|
install:
|
2003-07-11 23:33:27 +02:00
|
|
|
endif
|
|
|
|
|
2003-09-16 00:27:43 +02:00
|
|
|
installlib: all install-headers
|
2005-03-16 20:11:58 +01:00
|
|
|
install -m 644 $(LIB) "$(libdir)"
|
2003-09-16 00:27:43 +02:00
|
|
|
|
|
|
|
install-headers:
|
|
|
|
mkdir -p "$(prefix)/include/ffmpeg"
|
2002-12-30 02:07:47 +01:00
|
|
|
install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
|
|
|
|
$(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
|
|
|
|
$(SRC_PATH)/libavformat/rtspcodes.h \
|
2003-09-16 00:27:43 +02:00
|
|
|
"$(prefix)/include/ffmpeg"
|
2005-05-19 02:17:50 +02:00
|
|
|
install -d $(libdir)/pkgconfig
|
|
|
|
install -m 644 ../libavformat.pc $(libdir)/pkgconfig
|
2002-07-25 18:06:41 +02:00
|
|
|
|
2001-07-22 16:37:44 +02:00
|
|
|
%.o: %.c
|
2005-06-27 02:55:29 +02:00
|
|
|
$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2002-11-05 01:38:06 +01:00
|
|
|
# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
|
|
|
|
%.o: %.cpp
|
|
|
|
g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
|
|
|
|
|
2004-04-12 20:42:23 +02:00
|
|
|
distclean clean:
|
2004-09-16 19:15:58 +02:00
|
|
|
rm -f *.o *.d .depend *~ *.a *.so $(LIB)
|
2003-01-22 10:53:25 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# include dependency files if they exist
|
|
|
|
#
|
|
|
|
ifneq ($(wildcard .depend),)
|
|
|
|
include .depend
|
|
|
|
endif
|