Statistics
| Branch: | Revision:

ffmpeg / libavformat / Makefile @ a283db39

History | View | Annotate | Download (3.86 KB)

1 19720f15 Fabrice Bellard
#
2
# libavformat Makefile
3 165f74ff Fabrice Bellard
# (c) 2000-2003 Fabrice Bellard
4 19720f15 Fabrice Bellard
#
5 980fc7b8 Fabrice Bellard
include ../config.mak
6 f57a4535 Fabrice Bellard
7 a382b927 Fabrice Bellard
VPATH=$(SRC_PATH)/libavformat
8 f57a4535 Fabrice Bellard
9 c11c2bc2 Alexander Strasser
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
10 85f07f22 Fabrice Bellard
11 c0af3840 Diego Biurrun
#FIXME: This should be in configure/config.mak
12
ifeq ($(CONFIG_WIN32),yes)
13 320d060a Diego Biurrun
    LDFLAGS=-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a)
14 c0af3840 Diego Biurrun
endif
15
16 f71869a4 Fabrice Bellard
OBJS= utils.o cutils.o os_support.o allformats.o
17 cc0799e5 François Revol
PPOBJS=
18 c9a65ca8 Fabrice Bellard
19 04f46ced Gildas Bazin
# demuxers
20 03cfe134 Michael Niedermayer
OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o \
21 93a23627 Vidar Madsen
      avienc.o avidec.o wav.o mmf.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
22 04f46ced Gildas Bazin
      yuv4mpeg.o 4xm.o flvdec.o psxstr.o idroq.o ipmovie.o \
23 a7eb3c8d Mike Melanson
      nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \
24 04f46ced Gildas Bazin
      sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o asf.o \
25 ea395e8c Aurelien Jacobs
      ogg2.o oggparsevorbis.o oggparsetheora.o oggparseflac.o daud.o aiff.o \
26
      voc.o
27 04f46ced Gildas Bazin
28
# muxers
29
ifeq ($(CONFIG_MUXERS),yes)
30 a283db39 Måns Rullgård
OBJS+= flvenc.o movenc.o asf-enc.o adtsenc.o
31 04f46ced Gildas Bazin
endif
32
33
34 4d4bb927 Roberto Togni
AMROBJS=
35 485bc05d Alex Beregszaszi
ifeq ($(AMR_NB),yes)
36 4d4bb927 Roberto Togni
AMROBJS= amr.o
37 485bc05d Alex Beregszaszi
endif
38
ifeq ($(AMR_NB_FIXED),yes)
39 4d4bb927 Roberto Togni
AMROBJS= amr.o
40 485bc05d Alex Beregszaszi
endif
41
ifeq ($(AMR_WB),yes)
42 4d4bb927 Roberto Togni
AMROBJS= amr.o
43 bc634f6f Zdenek Kabelac
endif
44 4d4bb927 Roberto Togni
OBJS+= $(AMROBJS)
45 bc634f6f Zdenek Kabelac
46 87a0a681 Fabrice Bellard
# image formats
47 6a91ec51 Mike Melanson
OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
48 115329f1 Diego Biurrun
OBJS+= framehook.o
49 8be1c656 Fabrice Bellard
50 19720f15 Fabrice Bellard
ifeq ($(CONFIG_VIDEO4LINUX),yes)
51
OBJS+= grab.o
52 8be1c656 Fabrice Bellard
endif
53 85f07f22 Fabrice Bellard
54 0a7b514f Luca Abeni
ifeq ($(CONFIG_VIDEO4LINUX2),yes)
55
OBJS+= v4l2.o
56
endif
57
58 6beefa40 Michael Niedermayer
ifeq ($(CONFIG_BKTR),yes)
59
OBJS+= grab_bktr.o
60
endif
61
62 8aa3ee32 Max Krasnyansky
ifeq ($(CONFIG_DV1394),yes)
63
OBJS+= dv1394.o
64
endif
65
66 f02be79d Roman Shaposhnik
ifeq ($(CONFIG_DC1394),yes)
67
OBJS+= dc1394.o
68
endif
69
70 19720f15 Fabrice Bellard
ifeq ($(CONFIG_AUDIO_OSS),yes)
71 115329f1 Diego Biurrun
OBJS+= audio.o
72 19720f15 Fabrice Bellard
endif
73
74 a71a1dfc Måns Rullgård
EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
75 dbbcfd6b Alexander Strasser
76 dfdfa47c François Revol
ifeq ($(CONFIG_AUDIO_BEOS),yes)
77 cc0799e5 François Revol
PPOBJS+= beosaudio.o
78 dfdfa47c François Revol
endif
79
80 04f46ced Gildas Bazin
# protocols I/O
81
OBJS+= avio.o aviobuf.o
82
83
ifeq ($(CONFIG_PROTOCOLS),yes)
84
OBJS+= file.o
85 19720f15 Fabrice Bellard
ifeq ($(CONFIG_NETWORK),yes)
86 bdd7d518 Fabrice Bellard
OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
87 cc0799e5 François Revol
# BeOS and Darwin network stuff
88 4baca069 Philip Gladstone
ifeq ($(NEED_INET_ATON),yes)
89 9ddd71fc François Revol
OBJS+= barpainet.o
90
endif
91 a74127c0 Fabrice Bellard
endif
92 04f46ced Gildas Bazin
endif
93 a74127c0 Fabrice Bellard
94 5c5dea3f Nilesh Bansal
ifeq ($(CONFIG_LIBOGG),yes)
95 81e0d0b4 Mark Hills
OBJS+= ogg.o
96
endif
97
98 bb476ff3 James Morrison
ifeq ($(TARGET_ARCH_SPARC64),yes)
99
CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
100
endif
101
102 4bdd05e7 Diego Biurrun
NAME=avformat
103 6bc114b2 Tim Allen
ifeq ($(BUILD_SHARED),yes)
104 f3b60109 Diego Biurrun
LIBVERSION=$(LAVFVERSION)
105
LIBMAJOR=$(LAVFMAJOR)
106 4e159595 Diego Biurrun
AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
107 27d5f18f François Revol
endif
108
109 cc0799e5 François Revol
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
110 77b71ddc Philip Gladstone
111 4e159595 Diego Biurrun
all: $(LIB) $(SLIBNAME)
112 85f07f22 Fabrice Bellard
113 cc0799e5 François Revol
$(LIB): $(OBJS) $(PPOBJS)
114 85f07f22 Fabrice Bellard
	rm -f $@
115 cc0799e5 François Revol
	$(AR) rc $@ $(OBJS) $(PPOBJS)
116 be7109c1 Michael Niedermayer
	$(RANLIB) $@
117 85f07f22 Fabrice Bellard
118 4e159595 Diego Biurrun
$(SLIBNAME): $(OBJS)
119 c0af3840 Diego Biurrun
	$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
120 cb728d79 Fabrice Bellard
ifeq ($(CONFIG_WIN32),yes)
121 a17236c5 Michael Niedermayer
	-lib /machine:i386 /def:$(@:.dll=.def)
122
endif
123 6bc114b2 Tim Allen
124 f8d7b5f5 Fabrice Bellard
depend: $(SRCS)
125 7c235fe2 Fabrice Bellard
	$(CC) -MM $(CFLAGS) $^ 1>.depend
126
127 6bc114b2 Tim Allen
ifeq ($(BUILD_SHARED),yes)
128 cb728d79 Fabrice Bellard
install: all install-headers
129
ifeq ($(CONFIG_WIN32),yes)
130 4e159595 Diego Biurrun
	install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
131 cb728d79 Fabrice Bellard
else
132 cc973ecb Luca Barbato
	install -d $(libdir)
133 f3b60109 Diego Biurrun
	install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
134
		$(libdir)/$(SLIBNAME_WITH_VERSION)
135
	ln -sf $(SLIBNAME_WITH_VERSION) \
136
		$(libdir)/$(SLIBNAME_WITH_MAJOR)
137
	ln -sf $(SLIBNAME_WITH_VERSION) \
138
		$(libdir)/$(SLIBNAME)
139 f39e56a8 Jacob Meuser
	$(LDCONFIG) || true
140 cb728d79 Fabrice Bellard
endif
141
else
142
install:
143 6bc114b2 Tim Allen
endif
144
145 cb728d79 Fabrice Bellard
installlib: all install-headers
146 cc973ecb Luca Barbato
	install -m 644 $(LIB) "$(libdir)"
147 cb728d79 Fabrice Bellard
148
install-headers:
149
	mkdir -p "$(prefix)/include/ffmpeg"
150 f60f0df1 Thomas Jarosch
	install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
151
                $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
152
                $(SRC_PATH)/libavformat/rtspcodes.h \
153 cb728d79 Fabrice Bellard
                "$(prefix)/include/ffmpeg"
154 25f8db58 Fredrik Orderud
	install -d "$(libdir)/pkgconfig"
155
	install -m 644 ../libavformat.pc "$(libdir)/pkgconfig"
156 910fdd21 Fabrice Bellard
157 85f07f22 Fabrice Bellard
%.o: %.c
158 115329f1 Diego Biurrun
	$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
159 85f07f22 Fabrice Bellard
160 dfdfa47c François Revol
# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
161
%.o: %.cpp
162 115329f1 Diego Biurrun
	g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
163 dfdfa47c François Revol
164 98013cc1 Diego Biurrun
clean:
165 320d060a Diego Biurrun
	rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \
166
	      *.lib *.def *.dll.a *.exp
167 98013cc1 Diego Biurrun
168
distclean: clean
169 04c07634 Diego Biurrun
	rm -f .depend
170 7c235fe2 Fabrice Bellard
171
#
172
# include dependency files if they exist
173
#
174
ifneq ($(wildcard .depend),)
175
include .depend
176
endif