Makefile 1.5 KB
Newer Older
F
Fabrice Bellard 已提交
1 2 3 4
#
# libavformat Makefile
# (c) 2000, 2001, 2002 Fabrice Bellard
#
5
include ../config.mak
F
Fabrice Bellard 已提交
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
F
merge  
Fabrice Bellard 已提交
10

F
Fabrice Bellard 已提交
11
OBJS= utils.o cutils.o allformats.o
F
Fabrice Bellard 已提交
12 13 14

# mux and demuxes
OBJS+=mpeg.o mpegts.o ffm.o crc.o img.o raw.o rm.o asf.o \
P
Philip Gladstone 已提交
15
      avienc.o avidec.o wav.o swf.o au.o gif.o mov.o jpeg.o dv.o framehook.o
F
Fabrice Bellard 已提交
16 17
# file I/O
OBJS+= avio.o aviobuf.o file.o 
F
Fabrice Bellard 已提交
18

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

F
Fabrice Bellard 已提交
23 24
ifeq ($(CONFIG_VIDEO4LINUX),yes)
OBJS+= grab.o
F
Fabrice Bellard 已提交
25
endif
F
merge  
Fabrice Bellard 已提交
26

F
Fabrice Bellard 已提交
27 28 29 30
ifeq ($(CONFIG_AUDIO_OSS),yes)
OBJS+= audio.o 
endif

31 32 33 34
ifeq ($(CONFIG_AUDIO_BEOS),yes)
OBJS+= beosaudio.o
endif

F
Fabrice Bellard 已提交
35
ifeq ($(CONFIG_NETWORK),yes)
36
OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
37 38 39 40
# BeOS network stuff
ifeq ($(CONFIG_BEOS_NETSERVER),yes)
OBJS+= barpainet.o
endif
F
Fabrice Bellard 已提交
41 42
endif

43 44 45 46
ifeq ($(CONFIG_VORBIS),yes)
OBJS+= ogg.o
endif

F
Fabrice Bellard 已提交
47
LIB= libavformat.a
F
merge  
Fabrice Bellard 已提交
48 49 50 51 52

all: $(LIB)

$(LIB): $(OBJS)
	rm -f $@
M
Michael Niedermayer 已提交
53 54
	$(AR) rc $@ $(OBJS)
	$(RANLIB) $@
F
merge  
Fabrice Bellard 已提交
55

F
Fabrice Bellard 已提交
56 57 58 59 60 61 62 63
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

F
merge  
Fabrice Bellard 已提交
64 65 66
%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $< 

67 68 69 70
# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
%.o: %.cpp
	g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< 

F
merge  
Fabrice Bellard 已提交
71 72
clean: 
	rm -f *.o *~ *.a