Statistics
| Branch: | Revision:

ffmpeg / libavformat / Makefile @ 25f8db58

History | View | Annotate | Download (3.69 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 f71869a4 Fabrice Bellard
OBJS= utils.o cutils.o os_support.o allformats.o
12 cc0799e5 François Revol
PPOBJS=
13 c9a65ca8 Fabrice Bellard
14
# mux and demuxes
15 03cfe134 Michael Niedermayer
OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o \
16 93a23627 Vidar Madsen
      avienc.o avidec.o wav.o mmf.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
17 3aa180b8 Alex Beregszaszi
      yuv4mpeg.o 4xm.o flvenc.o flvdec.o movenc.o psxstr.o idroq.o ipmovie.o \
18 a7eb3c8d Mike Melanson
      nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \
19 9146ca37 Måns Rullgård
      sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o asf.o asf-enc.o \
20 b93f738f Reimar Döffinger
      ogg2.o oggparsevorbis.o oggparsetheora.o oggparseflac.o daud.o
21 4d4bb927 Roberto Togni
AMROBJS=
22 485bc05d Alex Beregszaszi
ifeq ($(AMR_NB),yes)
23 4d4bb927 Roberto Togni
AMROBJS= amr.o
24 485bc05d Alex Beregszaszi
endif
25
ifeq ($(AMR_NB_FIXED),yes)
26 4d4bb927 Roberto Togni
AMROBJS= amr.o
27 485bc05d Alex Beregszaszi
endif
28
ifeq ($(AMR_WB),yes)
29 4d4bb927 Roberto Togni
AMROBJS= amr.o
30 bc634f6f Zdenek Kabelac
endif
31 4d4bb927 Roberto Togni
OBJS+= $(AMROBJS)
32 bc634f6f Zdenek Kabelac
33 87a0a681 Fabrice Bellard
# image formats
34 6a91ec51 Mike Melanson
OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
35 c9a65ca8 Fabrice Bellard
# file I/O
36
OBJS+= avio.o aviobuf.o file.o 
37 87a0a681 Fabrice Bellard
OBJS+= framehook.o 
38 8be1c656 Fabrice Bellard
39 19720f15 Fabrice Bellard
ifeq ($(CONFIG_VIDEO4LINUX),yes)
40
OBJS+= grab.o
41 8be1c656 Fabrice Bellard
endif
42 85f07f22 Fabrice Bellard
43 6beefa40 Michael Niedermayer
ifeq ($(CONFIG_BKTR),yes)
44
OBJS+= grab_bktr.o
45
endif
46
47 8aa3ee32 Max Krasnyansky
ifeq ($(CONFIG_DV1394),yes)
48
OBJS+= dv1394.o
49
endif
50
51 f02be79d Roman Shaposhnik
ifeq ($(CONFIG_DC1394),yes)
52
OBJS+= dc1394.o
53
endif
54
55 19720f15 Fabrice Bellard
ifeq ($(CONFIG_AUDIO_OSS),yes)
56
OBJS+= audio.o 
57
endif
58
59 a71a1dfc Måns Rullgård
EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
60 dbbcfd6b Alexander Strasser
61 dfdfa47c François Revol
ifeq ($(CONFIG_AUDIO_BEOS),yes)
62 cc0799e5 François Revol
PPOBJS+= beosaudio.o
63 dfdfa47c François Revol
endif
64
65 19720f15 Fabrice Bellard
ifeq ($(CONFIG_NETWORK),yes)
66 bdd7d518 Fabrice Bellard
OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
67 cc0799e5 François Revol
# BeOS and Darwin network stuff
68 4baca069 Philip Gladstone
ifeq ($(NEED_INET_ATON),yes)
69 9ddd71fc François Revol
OBJS+= barpainet.o
70
endif
71 a74127c0 Fabrice Bellard
endif
72
73 5c5dea3f Nilesh Bansal
ifeq ($(CONFIG_LIBOGG),yes)
74 81e0d0b4 Mark Hills
OBJS+= ogg.o
75
endif
76
77 bb476ff3 James Morrison
ifeq ($(TARGET_ARCH_SPARC64),yes)
78
CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
79
endif
80
81 f3ec2d46 Slavik Gnatenko
LIB= $(LIBPREF)avformat$(LIBSUF)
82 6bc114b2 Tim Allen
ifeq ($(BUILD_SHARED),yes)
83 4e159595 Diego Biurrun
SLIBNAME= $(SLIBPREF)avformat$(SLIBSUF)
84
AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
85
ifeq ($(CONFIG_DARWIN),yes)
86
SHFLAGS += -Wl,-install_name,$(libdir)/$(SLIBNAME),-current_version,$(SPPVERSION),-compatibility_version,$(SPPVERSION)
87
endif
88 27d5f18f François Revol
endif
89
90 cc0799e5 François Revol
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
91 77b71ddc Philip Gladstone
92 4e159595 Diego Biurrun
all: $(LIB) $(SLIBNAME)
93 85f07f22 Fabrice Bellard
94 cc0799e5 François Revol
$(LIB): $(OBJS) $(PPOBJS)
95 85f07f22 Fabrice Bellard
	rm -f $@
96 cc0799e5 François Revol
	$(AR) rc $@ $(OBJS) $(PPOBJS)
97 be7109c1 Michael Niedermayer
	$(RANLIB) $@
98 85f07f22 Fabrice Bellard
99 4e159595 Diego Biurrun
$(SLIBNAME): $(OBJS)
100 cb728d79 Fabrice Bellard
ifeq ($(CONFIG_WIN32),yes)
101 1f8f50ef Michael Niedermayer
	$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
102 a17236c5 Michael Niedermayer
	-lib /machine:i386 /def:$(@:.dll=.def)
103
else
104 56b04ceb Niki W. Waibel
	$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
105 a17236c5 Michael Niedermayer
endif
106 6bc114b2 Tim Allen
107 f8d7b5f5 Fabrice Bellard
depend: $(SRCS)
108 7c235fe2 Fabrice Bellard
	$(CC) -MM $(CFLAGS) $^ 1>.depend
109
110 6bc114b2 Tim Allen
ifeq ($(BUILD_SHARED),yes)
111 cb728d79 Fabrice Bellard
install: all install-headers
112
ifeq ($(CONFIG_WIN32),yes)
113 4e159595 Diego Biurrun
	install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
114 cb728d79 Fabrice Bellard
else
115 cc973ecb Luca Barbato
	install -d $(libdir)
116 4e159595 Diego Biurrun
	install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/$(SLIBPREF)avformat-$(VERSION)$(SLIBSUF)
117
	ln -sf $(SLIBPREF)avformat-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME)
118 f39e56a8 Jacob Meuser
	$(LDCONFIG) || true
119 cb728d79 Fabrice Bellard
endif
120
else
121
install:
122 6bc114b2 Tim Allen
endif
123
124 cb728d79 Fabrice Bellard
installlib: all install-headers
125 cc973ecb Luca Barbato
	install -m 644 $(LIB) "$(libdir)"
126 cb728d79 Fabrice Bellard
127
install-headers:
128
	mkdir -p "$(prefix)/include/ffmpeg"
129 f60f0df1 Thomas Jarosch
	install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
130
                $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
131
                $(SRC_PATH)/libavformat/rtspcodes.h \
132 cb728d79 Fabrice Bellard
                "$(prefix)/include/ffmpeg"
133 25f8db58 Fredrik Orderud
	install -d "$(libdir)/pkgconfig"
134
	install -m 644 ../libavformat.pc "$(libdir)/pkgconfig"
135 910fdd21 Fabrice Bellard
136 85f07f22 Fabrice Bellard
%.o: %.c
137 80581e98 Michael Niedermayer
	$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< 
138 85f07f22 Fabrice Bellard
139 dfdfa47c François Revol
# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
140
%.o: %.cpp
141
	g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< 
142
143 2fefb220 Michael Niedermayer
distclean clean: 
144 4e159595 Diego Biurrun
	rm -f *.o *.d .depend *~ *.a *$(SLIBSUF) $(LIB)
145 7c235fe2 Fabrice Bellard
146
#
147
# include dependency files if they exist
148
#
149
ifneq ($(wildcard .depend),)
150
include .depend
151
endif