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