Statistics
| Branch: | Revision:

ffmpeg / libavformat / Makefile @ 320d060a

History | View | Annotate | Download (3.78 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
26

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

    
32

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

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

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

    
53
ifeq ($(CONFIG_BKTR),yes)
54
OBJS+= grab_bktr.o
55
endif
56

    
57
ifeq ($(CONFIG_DV1394),yes)
58
OBJS+= dv1394.o
59
endif
60

    
61
ifeq ($(CONFIG_DC1394),yes)
62
OBJS+= dc1394.o
63
endif
64

    
65
ifeq ($(CONFIG_AUDIO_OSS),yes)
66
OBJS+= audio.o
67
endif
68

    
69
EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
70

    
71
ifeq ($(CONFIG_AUDIO_BEOS),yes)
72
PPOBJS+= beosaudio.o
73
endif
74

    
75
# protocols I/O
76
OBJS+= avio.o aviobuf.o
77

    
78
ifeq ($(CONFIG_PROTOCOLS),yes)
79
OBJS+= file.o
80
ifeq ($(CONFIG_NETWORK),yes)
81
OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
82
# BeOS and Darwin network stuff
83
ifeq ($(NEED_INET_ATON),yes)
84
OBJS+= barpainet.o
85
endif
86
endif
87
endif
88

    
89
ifeq ($(CONFIG_LIBOGG),yes)
90
OBJS+= ogg.o
91
endif
92

    
93
ifeq ($(TARGET_ARCH_SPARC64),yes)
94
CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
95
endif
96

    
97
NAME=avformat
98
ifeq ($(BUILD_SHARED),yes)
99
LIBVERSION=$(LAVFVERSION)
100
LIBMAJOR=$(LAVFMAJOR)
101
AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
102
endif
103

    
104
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
105

    
106
all: $(LIB) $(SLIBNAME)
107

    
108
$(LIB): $(OBJS) $(PPOBJS)
109
	rm -f $@
110
	$(AR) rc $@ $(OBJS) $(PPOBJS)
111
	$(RANLIB) $@
112

    
113
$(SLIBNAME): $(OBJS)
114
	$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
115
ifeq ($(CONFIG_WIN32),yes)
116
	-lib /machine:i386 /def:$(@:.dll=.def)
117
endif
118

    
119
depend: $(SRCS)
120
	$(CC) -MM $(CFLAGS) $^ 1>.depend
121

    
122
ifeq ($(BUILD_SHARED),yes)
123
install: all install-headers
124
ifeq ($(CONFIG_WIN32),yes)
125
	install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
126
else
127
	install -d $(libdir)
128
	install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
129
		$(libdir)/$(SLIBNAME_WITH_VERSION)
130
	ln -sf $(SLIBNAME_WITH_VERSION) \
131
		$(libdir)/$(SLIBNAME_WITH_MAJOR)
132
	ln -sf $(SLIBNAME_WITH_VERSION) \
133
		$(libdir)/$(SLIBNAME)
134
	$(LDCONFIG) || true
135
endif
136
else
137
install:
138
endif
139

    
140
installlib: all install-headers
141
	install -m 644 $(LIB) "$(libdir)"
142

    
143
install-headers:
144
	mkdir -p "$(prefix)/include/ffmpeg"
145
	install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
146
                $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
147
                $(SRC_PATH)/libavformat/rtspcodes.h \
148
                "$(prefix)/include/ffmpeg"
149
	install -d "$(libdir)/pkgconfig"
150
	install -m 644 ../libavformat.pc "$(libdir)/pkgconfig"
151

    
152
%.o: %.c
153
	$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
154

    
155
# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
156
%.o: %.cpp
157
	g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
158

    
159
clean:
160
	rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \
161
	      *.lib *.def *.dll.a *.exp
162

    
163
distclean: clean
164
	rm -f .depend
165

    
166
#
167
# include dependency files if they exist
168
#
169
ifneq ($(wildcard .depend),)
170
include .depend
171
endif