Statistics
| Branch: | Revision:

ffmpeg / libavformat / Makefile @ a283db39

History | View | Annotate | Download (3.86 KB)

1
#
2
# libavformat Makefile
3
# (c) 2000-2003 Fabrice Bellard
4
#
5
include ../config.mak
6

    
7
VPATH=$(SRC_PATH)/libavformat
8

    
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
10

    
11
#FIXME: This should be in configure/config.mak
12
ifeq ($(CONFIG_WIN32),yes)
13
    LDFLAGS=-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a)
14
endif
15

    
16
OBJS= utils.o cutils.o os_support.o allformats.o
17
PPOBJS=
18

    
19
# demuxers
20
OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o \
21
      avienc.o avidec.o wav.o mmf.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
22
      yuv4mpeg.o 4xm.o flvdec.o psxstr.o idroq.o ipmovie.o \
23
      nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \
24
      sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o asf.o \
25
      ogg2.o oggparsevorbis.o oggparsetheora.o oggparseflac.o daud.o aiff.o \
26
      voc.o
27

    
28
# muxers
29
ifeq ($(CONFIG_MUXERS),yes)
30
OBJS+= flvenc.o movenc.o asf-enc.o adtsenc.o
31
endif
32

    
33

    
34
AMROBJS=
35
ifeq ($(AMR_NB),yes)
36
AMROBJS= amr.o
37
endif
38
ifeq ($(AMR_NB_FIXED),yes)
39
AMROBJS= amr.o
40
endif
41
ifeq ($(AMR_WB),yes)
42
AMROBJS= amr.o
43
endif
44
OBJS+= $(AMROBJS)
45

    
46
# image formats
47
OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
48
OBJS+= framehook.o
49

    
50
ifeq ($(CONFIG_VIDEO4LINUX),yes)
51
OBJS+= grab.o
52
endif
53

    
54
ifeq ($(CONFIG_VIDEO4LINUX2),yes)
55
OBJS+= v4l2.o
56
endif
57

    
58
ifeq ($(CONFIG_BKTR),yes)
59
OBJS+= grab_bktr.o
60
endif
61

    
62
ifeq ($(CONFIG_DV1394),yes)
63
OBJS+= dv1394.o
64
endif
65

    
66
ifeq ($(CONFIG_DC1394),yes)
67
OBJS+= dc1394.o
68
endif
69

    
70
ifeq ($(CONFIG_AUDIO_OSS),yes)
71
OBJS+= audio.o
72
endif
73

    
74
EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
75

    
76
ifeq ($(CONFIG_AUDIO_BEOS),yes)
77
PPOBJS+= beosaudio.o
78
endif
79

    
80
# protocols I/O
81
OBJS+= avio.o aviobuf.o
82

    
83
ifeq ($(CONFIG_PROTOCOLS),yes)
84
OBJS+= file.o
85
ifeq ($(CONFIG_NETWORK),yes)
86
OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
87
# BeOS and Darwin network stuff
88
ifeq ($(NEED_INET_ATON),yes)
89
OBJS+= barpainet.o
90
endif
91
endif
92
endif
93

    
94
ifeq ($(CONFIG_LIBOGG),yes)
95
OBJS+= ogg.o
96
endif
97

    
98
ifeq ($(TARGET_ARCH_SPARC64),yes)
99
CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
100
endif
101

    
102
NAME=avformat
103
ifeq ($(BUILD_SHARED),yes)
104
LIBVERSION=$(LAVFVERSION)
105
LIBMAJOR=$(LAVFMAJOR)
106
AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
107
endif
108

    
109
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
110

    
111
all: $(LIB) $(SLIBNAME)
112

    
113
$(LIB): $(OBJS) $(PPOBJS)
114
	rm -f $@
115
	$(AR) rc $@ $(OBJS) $(PPOBJS)
116
	$(RANLIB) $@
117

    
118
$(SLIBNAME): $(OBJS)
119
	$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
120
ifeq ($(CONFIG_WIN32),yes)
121
	-lib /machine:i386 /def:$(@:.dll=.def)
122
endif
123

    
124
depend: $(SRCS)
125
	$(CC) -MM $(CFLAGS) $^ 1>.depend
126

    
127
ifeq ($(BUILD_SHARED),yes)
128
install: all install-headers
129
ifeq ($(CONFIG_WIN32),yes)
130
	install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
131
else
132
	install -d $(libdir)
133
	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
	$(LDCONFIG) || true
140
endif
141
else
142
install:
143
endif
144

    
145
installlib: all install-headers
146
	install -m 644 $(LIB) "$(libdir)"
147

    
148
install-headers:
149
	mkdir -p "$(prefix)/include/ffmpeg"
150
	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
                "$(prefix)/include/ffmpeg"
154
	install -d "$(libdir)/pkgconfig"
155
	install -m 644 ../libavformat.pc "$(libdir)/pkgconfig"
156

    
157
%.o: %.c
158
	$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
159

    
160
# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
161
%.o: %.cpp
162
	g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
163

    
164
clean:
165
	rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \
166
	      *.lib *.def *.dll.a *.exp
167

    
168
distclean: clean
169
	rm -f .depend
170

    
171
#
172
# include dependency files if they exist
173
#
174
ifneq ($(wildcard .depend),)
175
include .depend
176
endif