Files
ffmpeg/libavformat/Makefile
T

154 lines
3.5 KiB
Makefile
Raw Normal View History

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