Makefile 1.24 KB
Newer Older
Fabrice Bellard's avatar
Fabrice Bellard committed
1
2
3
4
#
# libavformat Makefile
# (c) 2000, 2001, 2002 Fabrice Bellard
#
5
include ../config.mak
Fabrice Bellard's avatar
Fabrice Bellard committed
6
7
8

VPATH=$(SRC_PATH)/libav

9
CFLAGS= $(OPTFLAGS) -Wall -g -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
Fabrice Bellard's avatar
merge    
Fabrice Bellard committed
10

Fabrice Bellard's avatar
Fabrice Bellard committed
11
OBJS= utils.o cutils.o allformats.o
Fabrice Bellard's avatar
Fabrice Bellard committed
12
13
14

# mux and demuxes
OBJS+=mpeg.o mpegts.o ffm.o crc.o img.o raw.o rm.o asf.o \
15
16
      avienc.o avidec.o wav.o swf.o au.o gif.o mov.o jpeg.o 
# framehook.o
Fabrice Bellard's avatar
Fabrice Bellard committed
17
18
# file I/O
OBJS+= avio.o aviobuf.o file.o 
Fabrice Bellard's avatar
Fabrice Bellard committed
19

20
21
22
23
ifeq ($(BUILD_STRPTIME),yes)
OBJS+= strptime.o
endif

Fabrice Bellard's avatar
Fabrice Bellard committed
24
25
ifeq ($(CONFIG_VIDEO4LINUX),yes)
OBJS+= grab.o
Fabrice Bellard's avatar
Fabrice Bellard committed
26
endif
Fabrice Bellard's avatar
merge    
Fabrice Bellard committed
27

Fabrice Bellard's avatar
Fabrice Bellard committed
28
29
30
31
32
ifeq ($(CONFIG_AUDIO_OSS),yes)
OBJS+= audio.o 
endif

ifeq ($(CONFIG_NETWORK),yes)
33
OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
Fabrice Bellard's avatar
Fabrice Bellard committed
34
35
endif

36
37
38
39
ifeq ($(CONFIG_VORBIS),yes)
OBJS+= ogg.o
endif

Fabrice Bellard's avatar
Fabrice Bellard committed
40
LIB= libavformat.a
Fabrice Bellard's avatar
merge    
Fabrice Bellard committed
41
42
43
44
45

all: $(LIB)

$(LIB): $(OBJS)
	rm -f $@
Michael Niedermayer's avatar
Michael Niedermayer committed
46
47
	$(AR) rc $@ $(OBJS)
	$(RANLIB) $@
Fabrice Bellard's avatar
merge    
Fabrice Bellard committed
48

Fabrice Bellard's avatar
Fabrice Bellard committed
49
50
51
52
53
54
55
56
installlib: all
	install -m 644 $(LIB) $(prefix)/lib
	mkdir -p $(prefix)/include/ffmpeg
	install -m 644 $(SRC_PATH)/libav/avformat.h $(SRC_PATH)/libav/avio.h \
                $(SRC_PATH)/libav/rtp.h $(SRC_PATH)/libav/rtsp.h \
                $(SRC_PATH)/libav/rtspcodes.h \
                $(prefix)/include/ffmpeg

Fabrice Bellard's avatar
merge    
Fabrice Bellard committed
57
58
59
60
61
%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $< 

clean: 
	rm -f *.o *~ *.a