2002-05-26 01:34:32 +03:00
|
|
|
#
|
|
|
|
# libavformat Makefile
|
|
|
|
# (c) 2000, 2001, 2002 Fabrice Bellard
|
|
|
|
#
|
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
|
|
|
|
2003-08-12 21:20:29 +03:00
|
|
|
CFLAGS= $(OPTFLAGS) -Wall -g -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 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
|
2003-06-13 17:28:45 +03:00
|
|
|
OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o raw.o rm.o \
|
2003-08-28 22:53:47 +03:00
|
|
|
avienc.o avidec.o wav.o swf.o au.o gif.o mov.o mpjpeg.o dvcore.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 \
|
2003-09-08 07:14:34 +03:00
|
|
|
nut.o wc3movie.o
|
2003-01-29 14:00:11 +02:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_RISKY),yes)
|
|
|
|
OBJS+= asf.o
|
|
|
|
endif
|
|
|
|
|
2003-06-05 17:30:52 +03:00
|
|
|
ifeq ($(AMR_NB),yes)
|
|
|
|
OBJS+= amr.o
|
|
|
|
endif
|
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
# image formats
|
2003-02-05 01:44:26 +02:00
|
|
|
OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o
|
2002-05-20 19:31:13 +03:00
|
|
|
# file I/O
|
|
|
|
OBJS+= avio.o aviobuf.o file.o
|
2003-01-11 07:02:14 +02:00
|
|
|
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
|
|
|
|
2003-01-23 00:40:52 +02:00
|
|
|
ifeq ($(CONFIG_DV1394),yes)
|
|
|
|
OBJS+= dv1394.o
|
|
|
|
endif
|
|
|
|
|
2002-05-26 01:34:32 +03:00
|
|
|
ifeq ($(CONFIG_AUDIO_OSS),yes)
|
|
|
|
OBJS+= audio.o
|
|
|
|
endif
|
|
|
|
|
2002-11-05 02:38:06 +02:00
|
|
|
ifeq ($(CONFIG_AUDIO_BEOS),yes)
|
2003-02-06 17:09:39 +02:00
|
|
|
PPOBJS+= beosaudio.o
|
2003-07-15 16:35:20 +03:00
|
|
|
EXTRALIBS+=-lbe -lmedia
|
|
|
|
# this should be the default !
|
|
|
|
EXTRALIBS+=-lavcodec -L../libavcodec
|
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
|
|
|
|
|
2002-09-01 21:07:56 +03:00
|
|
|
ifeq ($(CONFIG_VORBIS),yes)
|
|
|
|
OBJS+= ogg.o
|
|
|
|
endif
|
|
|
|
|
2003-01-11 22:34:38 +02:00
|
|
|
LIB= $(LIBPREF)avformat$(LIBSUF)
|
2003-07-12 00:33:27 +03:00
|
|
|
ifeq ($(BUILD_SHARED),yes)
|
|
|
|
SLIB= $(SLIBPREF)avformat$(SLIBSUF)
|
|
|
|
endif
|
2001-07-22 17:37:44 +03:00
|
|
|
|
2003-02-06 17:09:39 +02:00
|
|
|
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
|
2003-01-14 17:30:42 +02:00
|
|
|
|
2003-07-12 00:33:27 +03:00
|
|
|
all: $(LIB) $(SLIB)
|
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
|
|
|
|
2003-07-12 00:33:27 +03:00
|
|
|
$(SLIB): $(OBJS)
|
2003-09-04 11:21:27 +03:00
|
|
|
ifeq ($(TARGET_MINGW32),yes)
|
|
|
|
$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(AMREXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
|
|
|
|
-lib /machine:i386 /def:$(@:.dll=.def)
|
|
|
|
else
|
|
|
|
$(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(AMREXTRALIBS)
|
|
|
|
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
|
|
|
install: all
|
|
|
|
ifeq ($(BUILD_SHARED),yes)
|
|
|
|
install -d $(prefix)/lib
|
|
|
|
install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
|
|
|
|
ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
|
|
|
|
ldconfig || true
|
|
|
|
mkdir -p $(prefix)/include/ffmpeg
|
|
|
|
install -m 644 $(VPATH)/avformat.h $(prefix)/include/ffmpeg/avformat.h
|
|
|
|
install -m 644 $(VPATH)/avio.h $(prefix)/include/ffmpeg/avio.h
|
|
|
|
install -m 644 $(VPATH)/rtp.h $(prefix)/include/ffmpeg/rtp.h
|
|
|
|
install -m 644 $(VPATH)/rtsp.h $(prefix)/include/ffmpeg/rtsp.h
|
|
|
|
install -m 644 $(VPATH)/rtspcodes.h $(prefix)/include/ffmpeg/rtspcodes.h
|
|
|
|
endif
|
|
|
|
|
2002-07-25 19:06:41 +03:00
|
|
|
installlib: all
|
|
|
|
install -m 644 $(LIB) $(prefix)/lib
|
|
|
|
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 \
|
2002-07-25 19:06:41 +03:00
|
|
|
$(prefix)/include/ffmpeg
|
|
|
|
|
2001-07-22 17:37:44 +03:00
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2002-11-05 02:38:06 +02:00
|
|
|
# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
|
|
|
|
%.o: %.cpp
|
|
|
|
g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
|
|
|
|
|
2001-07-22 17:37:44 +03:00
|
|
|
clean:
|
2003-01-22 11:53:25 +02:00
|
|
|
rm -f *.o *.d .depend *~ *.a $(LIB)
|
|
|
|
|
|
|
|
#
|
|
|
|
# include dependency files if they exist
|
|
|
|
#
|
|
|
|
ifneq ($(wildcard .depend),)
|
|
|
|
include .depend
|
|
|
|
endif
|