Statistics
| Branch: | Revision:

ffmpeg / libavformat / Makefile @ 27d5f18f

History | View | Annotate | Download (3.31 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 cf9d24ad Dan Christiansen
CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -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 7458ccbb Roman Shaposhnik
      avienc.o avidec.o wav.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 27d5f18f François Revol
      sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o
20 1d0d55da Michael Niedermayer
21
ifeq ($(CONFIG_RISKY),yes)
22
OBJS+= asf.o
23 e4053d52 Konstantin Andreyev
OBJS+= asf-enc.o
24 1d0d55da Michael Niedermayer
endif
25
26 485bc05d Alex Beregszaszi
ifeq ($(AMR_NB),yes)
27
OBJS+= amr.o
28
endif
29
ifeq ($(AMR_NB_FIXED),yes)
30
OBJS+= amr.o
31
endif
32
ifeq ($(AMR_WB),yes)
33 bc634f6f Zdenek Kabelac
OBJS+= amr.o
34
endif
35
36 87a0a681 Fabrice Bellard
# image formats
37 6a91ec51 Mike Melanson
OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
38 c9a65ca8 Fabrice Bellard
# file I/O
39
OBJS+= avio.o aviobuf.o file.o 
40 87a0a681 Fabrice Bellard
OBJS+= framehook.o 
41 8be1c656 Fabrice Bellard
42 19720f15 Fabrice Bellard
ifeq ($(CONFIG_VIDEO4LINUX),yes)
43
OBJS+= grab.o
44 8be1c656 Fabrice Bellard
endif
45 85f07f22 Fabrice Bellard
46 8aa3ee32 Max Krasnyansky
ifeq ($(CONFIG_DV1394),yes)
47
OBJS+= dv1394.o
48
endif
49
50 f02be79d Roman Shaposhnik
ifeq ($(CONFIG_DC1394),yes)
51
OBJS+= dc1394.o
52
endif
53
54 19720f15 Fabrice Bellard
ifeq ($(CONFIG_AUDIO_OSS),yes)
55
OBJS+= audio.o 
56
endif
57
58 dfdfa47c François Revol
ifeq ($(CONFIG_AUDIO_BEOS),yes)
59 cc0799e5 François Revol
PPOBJS+= beosaudio.o
60 aa35ccb8 François Revol
EXTRALIBS+=-lbe -lmedia
61
# this should be the default !
62
EXTRALIBS+=-lavcodec -L../libavcodec
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 81e0d0b4 Mark Hills
ifeq ($(CONFIG_VORBIS),yes)
74
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
SLIB= $(SLIBPREF)avformat$(SLIBSUF)
84
endif
85 85f07f22 Fabrice Bellard
86 27d5f18f François Revol
EXTRALIBS+=-lavcodec -L../libavcodec
87
ifeq ($(CONFIG_MP3LAME),yes)
88
EXTRALIBS+=-lmp3lame
89
endif
90
91 cc0799e5 François Revol
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
92 77b71ddc Philip Gladstone
93 6bc114b2 Tim Allen
all: $(LIB) $(SLIB)
94 85f07f22 Fabrice Bellard
95 cc0799e5 François Revol
$(LIB): $(OBJS) $(PPOBJS)
96 85f07f22 Fabrice Bellard
	rm -f $@
97 cc0799e5 François Revol
	$(AR) rc $@ $(OBJS) $(PPOBJS)
98 be7109c1 Michael Niedermayer
	$(RANLIB) $@
99 85f07f22 Fabrice Bellard
100 6bc114b2 Tim Allen
$(SLIB): $(OBJS)
101 cb728d79 Fabrice Bellard
ifeq ($(CONFIG_WIN32),yes)
102 165f74ff Fabrice Bellard
	$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
103 a17236c5 Michael Niedermayer
	-lib /machine:i386 /def:$(@:.dll=.def)
104
else
105 165f74ff Fabrice Bellard
	$(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS)
106 a17236c5 Michael Niedermayer
endif
107 6bc114b2 Tim Allen
108 f8d7b5f5 Fabrice Bellard
depend: $(SRCS)
109 7c235fe2 Fabrice Bellard
	$(CC) -MM $(CFLAGS) $^ 1>.depend
110
111 6bc114b2 Tim Allen
ifeq ($(BUILD_SHARED),yes)
112 cb728d79 Fabrice Bellard
install: all install-headers
113
ifeq ($(CONFIG_WIN32),yes)
114 65d1bea2 Michel Bardiaux
	install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
115 cb728d79 Fabrice Bellard
else
116 6bc114b2 Tim Allen
	install -d $(prefix)/lib
117 65d1bea2 Michel Bardiaux
	install $(INSTALLSTRIP) -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
118 6bc114b2 Tim Allen
	ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
119
	ldconfig || true
120 cb728d79 Fabrice Bellard
endif
121
else
122
install:
123 6bc114b2 Tim Allen
endif
124
125 cb728d79 Fabrice Bellard
installlib: all install-headers
126 910fdd21 Fabrice Bellard
	install -m 644 $(LIB) $(prefix)/lib
127 cb728d79 Fabrice Bellard
128
install-headers:
129
	mkdir -p "$(prefix)/include/ffmpeg"
130 f60f0df1 Thomas Jarosch
	install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
131
                $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
132
                $(SRC_PATH)/libavformat/rtspcodes.h \
133 cb728d79 Fabrice Bellard
                "$(prefix)/include/ffmpeg"
134 910fdd21 Fabrice Bellard
135 85f07f22 Fabrice Bellard
%.o: %.c
136
	$(CC) $(CFLAGS) -c -o $@ $< 
137
138 dfdfa47c François Revol
# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
139
%.o: %.cpp
140
	g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< 
141
142 2fefb220 Michael Niedermayer
distclean clean: 
143 e1e98dbd Todd Kirby
	rm -f *.o *.d .depend *~ *.a *.so $(LIB)
144 7c235fe2 Fabrice Bellard
145
#
146
# include dependency files if they exist
147
#
148
ifneq ($(wildcard .depend),)
149
include .depend
150
endif