Statistics
| Branch: | Revision:

ffmpeg / libavformat / Makefile @ a7eb3c8d

History | View | Annotate | Download (2.98 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 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
20

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

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

    
35
# image formats
36
OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o
37
# file I/O
38
OBJS+= avio.o aviobuf.o file.o 
39
OBJS+= framehook.o 
40

    
41
ifeq ($(CONFIG_VIDEO4LINUX),yes)
42
OBJS+= grab.o
43
endif
44

    
45
ifeq ($(CONFIG_DV1394),yes)
46
OBJS+= dv1394.o
47
endif
48

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

    
53
ifeq ($(CONFIG_AUDIO_BEOS),yes)
54
PPOBJS+= beosaudio.o
55
EXTRALIBS+=-lbe -lmedia
56
# this should be the default !
57
EXTRALIBS+=-lavcodec -L../libavcodec
58
endif
59

    
60
ifeq ($(CONFIG_NETWORK),yes)
61
OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
62
# BeOS and Darwin network stuff
63
ifeq ($(NEED_INET_ATON),yes)
64
OBJS+= barpainet.o
65
endif
66
endif
67

    
68
ifeq ($(CONFIG_VORBIS),yes)
69
OBJS+= ogg.o
70
endif
71

    
72
LIB= $(LIBPREF)avformat$(LIBSUF)
73
ifeq ($(BUILD_SHARED),yes)
74
SLIB= $(SLIBPREF)avformat$(SLIBSUF)
75
endif
76

    
77
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
78

    
79
all: $(LIB) $(SLIB)
80

    
81
$(LIB): $(OBJS) $(PPOBJS)
82
	rm -f $@
83
	$(AR) rc $@ $(OBJS) $(PPOBJS)
84
	$(RANLIB) $@
85

    
86
$(SLIB): $(OBJS)
87
ifeq ($(CONFIG_WIN32),yes)
88
	$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
89
	-lib /machine:i386 /def:$(@:.dll=.def)
90
else
91
	$(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS)
92
endif
93

    
94
depend: $(SRCS)
95
	$(CC) -MM $(CFLAGS) $^ 1>.depend
96

    
97
ifeq ($(BUILD_SHARED),yes)
98
install: all install-headers
99
ifeq ($(CONFIG_WIN32),yes)
100
	install -s -m 755 $(SLIB) "$(prefix)"
101
else
102
	install -d $(prefix)/lib
103
	install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
104
	ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
105
	ldconfig || true
106
endif
107
else
108
install:
109
endif
110

    
111
installlib: all install-headers
112
	install -m 644 $(LIB) $(prefix)/lib
113

    
114
install-headers:
115
	mkdir -p "$(prefix)/include/ffmpeg"
116
	install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
117
                $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
118
                $(SRC_PATH)/libavformat/rtspcodes.h \
119
                "$(prefix)/include/ffmpeg"
120

    
121
%.o: %.c
122
	$(CC) $(CFLAGS) -c -o $@ $< 
123

    
124
# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
125
%.o: %.cpp
126
	g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< 
127

    
128
clean: 
129
	rm -f *.o *.d .depend *~ *.a $(LIB)
130

    
131
#
132
# include dependency files if they exist
133
#
134
ifneq ($(wildcard .depend),)
135
include .depend
136
endif