Makefile 1.97 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
Michael Niedermayer's avatar
Michael Niedermayer committed
15
OBJS+=mpeg.o mpegts.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
Michael Niedermayer's avatar
Michael Niedermayer committed
18 19 20 21 22

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

Fabrice Bellard's avatar
Fabrice Bellard committed
23
# image formats
Fabrice Bellard's avatar
Fabrice Bellard committed
24
OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o
Fabrice Bellard's avatar
Fabrice Bellard committed
25 26
# file I/O
OBJS+= avio.o aviobuf.o file.o 
Fabrice Bellard's avatar
Fabrice Bellard committed
27
OBJS+= framehook.o 
Fabrice Bellard's avatar
Fabrice Bellard committed
28

29 30 31 32
ifeq ($(BUILD_STRPTIME),yes)
OBJS+= strptime.o
endif

Fabrice Bellard's avatar
Fabrice Bellard committed
33 34
ifeq ($(CONFIG_VIDEO4LINUX),yes)
OBJS+= grab.o
Fabrice Bellard's avatar
Fabrice Bellard committed
35
endif
Fabrice Bellard's avatar
merge  
Fabrice Bellard committed
36

37 38 39 40
ifeq ($(CONFIG_DV1394),yes)
OBJS+= dv1394.o
endif

Fabrice Bellard's avatar
Fabrice Bellard committed
41 42 43 44
ifeq ($(CONFIG_AUDIO_OSS),yes)
OBJS+= audio.o 
endif

45
ifeq ($(CONFIG_AUDIO_BEOS),yes)
46
PPOBJS+= beosaudio.o
47 48
endif

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

57 58 59 60
ifeq ($(CONFIG_VORBIS),yes)
OBJS+= ogg.o
endif

61
LIB= $(LIBPREF)avformat$(LIBSUF)
Fabrice Bellard's avatar
merge  
Fabrice Bellard committed
62

63
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
64

Fabrice Bellard's avatar
merge  
Fabrice Bellard committed
65 66
all: $(LIB)

67
$(LIB): $(OBJS) $(PPOBJS)
Fabrice Bellard's avatar
merge  
Fabrice Bellard committed
68
	rm -f $@
69
	$(AR) rc $@ $(OBJS) $(PPOBJS)
Michael Niedermayer's avatar
Michael Niedermayer committed
70
	$(RANLIB) $@
Fabrice Bellard's avatar
merge  
Fabrice Bellard committed
71

72
depend: $(SRCS)
73 74
	$(CC) -MM $(CFLAGS) $^ 1>.depend

Fabrice Bellard's avatar
Fabrice Bellard committed
75 76 77
installlib: all
	install -m 644 $(LIB) $(prefix)/lib
	mkdir -p $(prefix)/include/ffmpeg
78 79 80
	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
81 82
                $(prefix)/include/ffmpeg

Fabrice Bellard's avatar
merge  
Fabrice Bellard committed
83 84 85
%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $< 

86 87 88 89
# 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
90
clean: 
91 92 93 94 95 96 97 98
	rm -f *.o *.d .depend *~ *.a $(LIB)

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