3 # (c) 2000-2003 Fabrice Bellard
7 VPATH
=$(SRC_PATH
)/libavformat
9 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
11 OBJS
= utils.o cutils.o os_support.o allformats.o
15 OBJS
+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o
rm.o \
16 avienc.o avidec.o wav.o mmf.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
17 yuv4mpeg.o
4xm.o flvenc.o flvdec.o movenc.o psxstr.o idroq.o ipmovie.o \
18 nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \
19 sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o asf.o asf-enc.o \
20 ogg2.o oggparsevorbis.o oggparsetheora.o oggparseflac.o daud.o
25 ifeq ($(AMR_NB_FIXED
),yes
)
34 OBJS
+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
36 OBJS
+= avio.o aviobuf.o file.o
39 ifeq ($(CONFIG_VIDEO4LINUX
),yes
)
43 ifeq ($(CONFIG_BKTR
),yes
)
47 ifeq ($(CONFIG_DV1394
),yes
)
51 ifeq ($(CONFIG_DC1394
),yes
)
55 ifeq ($(CONFIG_AUDIO_OSS
),yes
)
59 EXTRALIBS
+= -L..
/libavutil
-lavutil
$(BUILDSUF
)
61 ifeq ($(CONFIG_AUDIO_BEOS
),yes
)
63 EXTRALIBS
+=-lbe
-lmedia
66 ifeq ($(CONFIG_NETWORK
),yes
)
67 OBJS
+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
68 # BeOS and Darwin network stuff
69 ifeq ($(NEED_INET_ATON
),yes
)
74 ifeq ($(CONFIG_LIBOGG
),yes
)
78 ifeq ($(TARGET_ARCH_SPARC64
),yes
)
79 CFLAGS
+= -mcpu
=ultrasparc
-mtune
=ultrasparc
82 LIB
= $(LIBPREF
)avformat
$(LIBSUF
)
83 ifeq ($(BUILD_SHARED
),yes
)
84 SLIBNAME
= $(SLIBPREF
)avformat
$(SLIBSUF
)
85 AVCLIBS
+=-lavcodec
$(BUILDSUF
) -L..
/libavcodec
-lavutil
$(BUILDSUF
) -L..
/libavutil
86 ifeq ($(CONFIG_DARWIN
),yes
)
87 SHFLAGS
+= -Wl
,-install_name
,$(libdir)/$(SLIBNAME
),-current_version
,$(SPPVERSION
),-compatibility_version
,$(SPPVERSION
)
89 ifeq ($(CONFIG_MP3LAME
),yes
)
94 SRCS
:= $(OBJS
:.o
=.c
) $(PPOBJS
:.o
=.
cpp)
96 all: $(LIB
) $(SLIBNAME
)
98 $(LIB
): $(OBJS
) $(PPOBJS
)
100 $(AR
) rc
$@
$(OBJS
) $(PPOBJS
)
104 ifeq ($(CONFIG_WIN32
),yes
)
105 $(CC
) $(SHFLAGS
) -Wl
,--output-def
,$(@
:.dll
=.def
) -o
$@
$(OBJS
) $(PPOBJS
) $(AVCLIBS
) $(EXTRALIBS
)
106 -lib
/machine
:i386
/def
:$(@
:.dll
=.def
)
108 $(CC
) $(SHFLAGS
) $(LDFLAGS
) -o
$@
$(OBJS
) $(PPOBJS
) $(AVCLIBS
) $(EXTRALIBS
)
112 $(CC
) -MM
$(CFLAGS
) $^
1>.depend
114 ifeq ($(BUILD_SHARED
),yes
)
115 install: all install-headers
116 ifeq ($(CONFIG_WIN32
),yes
)
117 install $(INSTALLSTRIP
) -m
755 $(SLIBNAME
) "$(prefix)"
120 install $(INSTALLSTRIP
) -m
755 $(SLIBNAME
) $(libdir)/$(SLIBPREF
)avformat-
$(VERSION
)$(SLIBSUF
)
121 ln
-sf
$(SLIBPREF
)avformat-
$(VERSION
)$(SLIBSUF
) $(libdir)/$(SLIBNAME
)
128 installlib
: all install-headers
129 install -m
644 $(LIB
) "$(libdir)"
132 mkdir
-p
"$(prefix)/include/ffmpeg"
133 install -m
644 $(SRC_PATH
)/libavformat
/avformat.h
$(SRC_PATH
)/libavformat
/avio.h \
134 $(SRC_PATH
)/libavformat
/rtp.h
$(SRC_PATH
)/libavformat
/rtsp.h \
135 $(SRC_PATH
)/libavformat
/rtspcodes.h \
136 "$(prefix)/include/ffmpeg"
137 install -d
$(libdir)/pkgconfig
138 install -m
644 ..
/libavformat.
pc $(libdir)/pkgconfig
141 $(CC
) $(CFLAGS
) $(LIBOBJFLAGS
) -c
-o
$@
$<
143 # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
145 g
++ $(subst -Wall
,,$(CFLAGS
)) -c
-o
$@
$<
148 rm -f
*.o
*.d .depend
*~
*.a
*$(SLIBSUF
) $(LIB
)
151 # include dependency files if they exist
153 ifneq ($(wildcard .depend
),)