Statistics
| Branch: | Revision:

ffmpeg / libavformat / Makefile @ 7be806f3

History | View | Annotate | Download (3.35 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)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
10

    
11
OBJS= utils.o cutils.o os_support.o allformats.o
12
PPOBJS=
13

    
14
# mux and demuxes
15
OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o \
16
      avienc.o avidec.o wav.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
17
      yuv4mpeg.o 4xm.o flvenc.o flvdec.o movenc.o psxstr.o idroq.o ipmovie.o \
18
      nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \
19
      sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o
20

    
21
ifeq ($(CONFIG_RISKY),yes)
22
OBJS+= asf.o
23
OBJS+= asf-enc.o
24
endif
25

    
26
AMROBJS=
27
ifeq ($(AMR_NB),yes)
28
AMROBJS= amr.o
29
endif
30
ifeq ($(AMR_NB_FIXED),yes)
31
AMROBJS= amr.o
32
endif
33
ifeq ($(AMR_WB),yes)
34
AMROBJS= amr.o
35
endif
36
OBJS+= $(AMROBJS)
37

    
38
# image formats
39
OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
40
# file I/O
41
OBJS+= avio.o aviobuf.o file.o 
42
OBJS+= framehook.o 
43

    
44
ifeq ($(CONFIG_VIDEO4LINUX),yes)
45
OBJS+= grab.o
46
endif
47

    
48
ifeq ($(CONFIG_DV1394),yes)
49
OBJS+= dv1394.o
50
endif
51

    
52
ifeq ($(CONFIG_DC1394),yes)
53
OBJS+= dc1394.o
54
endif
55

    
56
ifeq ($(CONFIG_AUDIO_OSS),yes)
57
OBJS+= audio.o 
58
endif
59

    
60
ifeq ($(CONFIG_AUDIO_BEOS),yes)
61
PPOBJS+= beosaudio.o
62
EXTRALIBS+=-lbe -lmedia
63
# this should be the default !
64
EXTRALIBS+=-lavcodec -L../libavcodec
65
endif
66

    
67
ifeq ($(CONFIG_NETWORK),yes)
68
OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
69
# BeOS and Darwin network stuff
70
ifeq ($(NEED_INET_ATON),yes)
71
OBJS+= barpainet.o
72
endif
73
endif
74

    
75
ifeq ($(CONFIG_VORBIS),yes)
76
OBJS+= ogg.o
77
endif
78

    
79
ifeq ($(TARGET_ARCH_SPARC64),yes)
80
CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
81
endif
82

    
83
LIB= $(LIBPREF)avformat$(LIBSUF)
84
ifeq ($(BUILD_SHARED),yes)
85
SLIB= $(SLIBPREF)avformat$(SLIBSUF)
86
endif
87

    
88
EXTRALIBS+=-lavcodec -L../libavcodec
89
ifeq ($(CONFIG_MP3LAME),yes)
90
EXTRALIBS+=-lmp3lame
91
endif
92

    
93
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
94

    
95
all: $(LIB) $(SLIB)
96

    
97
$(LIB): $(OBJS) $(PPOBJS)
98
	rm -f $@
99
	$(AR) rc $@ $(OBJS) $(PPOBJS)
100
	$(RANLIB) $@
101

    
102
$(SLIB): $(OBJS)
103
ifeq ($(CONFIG_WIN32),yes)
104
	$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
105
	-lib /machine:i386 /def:$(@:.dll=.def)
106
else
107
	$(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS)
108
endif
109

    
110
depend: $(SRCS)
111
	$(CC) -MM $(CFLAGS) $^ 1>.depend
112

    
113
ifeq ($(BUILD_SHARED),yes)
114
install: all install-headers
115
ifeq ($(CONFIG_WIN32),yes)
116
	install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
117
else
118
	install -d $(prefix)/lib
119
	install $(INSTALLSTRIP) -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
120
	ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
121
	ldconfig || true
122
endif
123
else
124
install:
125
endif
126

    
127
installlib: all install-headers
128
	install -m 644 $(LIB) "$(prefix)/lib"
129

    
130
install-headers:
131
	mkdir -p "$(prefix)/include/ffmpeg"
132
	install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
133
                $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
134
                $(SRC_PATH)/libavformat/rtspcodes.h \
135
                "$(prefix)/include/ffmpeg"
136

    
137
%.o: %.c
138
	$(CC) $(CFLAGS) -c -o $@ $< 
139

    
140
# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
141
%.o: %.cpp
142
	g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< 
143

    
144
distclean clean: 
145
	rm -f *.o *.d .depend *~ *.a *.so $(LIB)
146

    
147
#
148
# include dependency files if they exist
149
#
150
ifneq ($(wildcard .depend),)
151
include .depend
152
endif