Makefile 2.04 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

Fabrice Bellard's avatar
Fabrice Bellard committed
7
VPATH=$(SRC_PATH)/libavformat
Fabrice Bellard's avatar
Fabrice Bellard committed
8

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
12
PPOBJS=
Fabrice Bellard's avatar
Fabrice Bellard committed
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
Michael Niedermayer's avatar
Michael Niedermayer committed
18 19 20 21 22

ifeq ($(CONFIG_RISKY),yes)
OBJS+= asf.o
endif

Zdenek Kabelac's avatar
Zdenek Kabelac committed
23 24 25 26
ifeq ($(AMR_NB),yes)
OBJS+= amr.o
endif

Fabrice Bellard's avatar
Fabrice Bellard committed
27
# image formats
Fabrice Bellard's avatar
Fabrice Bellard committed
28
OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o
Fabrice Bellard's avatar
Fabrice Bellard committed
29 30
# file I/O
OBJS+= avio.o aviobuf.o file.o 
Fabrice Bellard's avatar
Fabrice Bellard committed
31
OBJS+= framehook.o 
Fabrice Bellard's avatar
Fabrice Bellard committed
32

33 34 35 36
ifeq ($(BUILD_STRPTIME),yes)
OBJS+= strptime.o
endif

Fabrice Bellard's avatar
Fabrice Bellard committed
37 38
ifeq ($(CONFIG_VIDEO4LINUX),yes)
OBJS+= grab.o
Fabrice Bellard's avatar
Fabrice Bellard committed
39
endif
Fabrice Bellard's avatar
merge  
Fabrice Bellard committed
40

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

Fabrice Bellard's avatar
Fabrice Bellard committed
45 46 47 48
ifeq ($(CONFIG_AUDIO_OSS),yes)
OBJS+= audio.o 
endif

49
ifeq ($(CONFIG_AUDIO_BEOS),yes)
50
PPOBJS+= beosaudio.o
51 52
endif

Fabrice Bellard's avatar
Fabrice Bellard committed
53
ifeq ($(CONFIG_NETWORK),yes)
54
OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
55
# BeOS and Darwin network stuff
56
ifeq ($(NEED_INET_ATON),yes)
57 58
OBJS+= barpainet.o
endif
Fabrice Bellard's avatar
Fabrice Bellard committed
59 60
endif

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

65
LIB= $(LIBPREF)avformat$(LIBSUF)
Fabrice Bellard's avatar
merge  
Fabrice Bellard committed
66

67
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
68

Fabrice Bellard's avatar
merge  
Fabrice Bellard committed
69 70
all: $(LIB)

71
$(LIB): $(OBJS) $(PPOBJS)
Fabrice Bellard's avatar
merge  
Fabrice Bellard committed
72
	rm -f $@
73
	$(AR) rc $@ $(OBJS) $(PPOBJS)
Michael Niedermayer's avatar
Michael Niedermayer committed
74
	$(RANLIB) $@
Fabrice Bellard's avatar
merge  
Fabrice Bellard committed
75

76
depend: $(SRCS)
77 78
	$(CC) -MM $(CFLAGS) $^ 1>.depend

Fabrice Bellard's avatar
Fabrice Bellard committed
79 80 81
installlib: all
	install -m 644 $(LIB) $(prefix)/lib
	mkdir -p $(prefix)/include/ffmpeg
82 83 84
	install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
                $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
                $(SRC_PATH)/libavformat/rtspcodes.h \
Fabrice Bellard's avatar
Fabrice Bellard committed
85 86
                $(prefix)/include/ffmpeg

Fabrice Bellard's avatar
merge  
Fabrice Bellard committed
87 88 89
%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $< 

90 91 92 93
# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
%.o: %.cpp
	g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< 

Fabrice Bellard's avatar
merge  
Fabrice Bellard committed
94
clean: 
95 96 97 98 99 100 101 102
	rm -f *.o *.d .depend *~ *.a $(LIB)

#
# include dependency files if they exist
#
ifneq ($(wildcard .depend),)
include .depend
endif