Statistics
| Branch: | Revision:

ffmpeg / libavformat / Makefile @ 27d5f18f

History | View | Annotate | Download (3.31 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 img2.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 matroska.o sol.o electronicarts.o nsvdec.o
20

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

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

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

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

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

    
50
ifeq ($(CONFIG_DC1394),yes)
51
OBJS+= dc1394.o
52
endif
53

    
54
ifeq ($(CONFIG_AUDIO_OSS),yes)
55
OBJS+= audio.o 
56
endif
57

    
58
ifeq ($(CONFIG_AUDIO_BEOS),yes)
59
PPOBJS+= beosaudio.o
60
EXTRALIBS+=-lbe -lmedia
61
# this should be the default !
62
EXTRALIBS+=-lavcodec -L../libavcodec
63
endif
64

    
65
ifeq ($(CONFIG_NETWORK),yes)
66
OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
67
# BeOS and Darwin network stuff
68
ifeq ($(NEED_INET_ATON),yes)
69
OBJS+= barpainet.o
70
endif
71
endif
72

    
73
ifeq ($(CONFIG_VORBIS),yes)
74
OBJS+= ogg.o
75
endif
76

    
77
ifeq ($(TARGET_ARCH_SPARC64),yes)
78
CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
79
endif
80

    
81
LIB= $(LIBPREF)avformat$(LIBSUF)
82
ifeq ($(BUILD_SHARED),yes)
83
SLIB= $(SLIBPREF)avformat$(SLIBSUF)
84
endif
85

    
86
EXTRALIBS+=-lavcodec -L../libavcodec
87
ifeq ($(CONFIG_MP3LAME),yes)
88
EXTRALIBS+=-lmp3lame
89
endif
90

    
91
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
92

    
93
all: $(LIB) $(SLIB)
94

    
95
$(LIB): $(OBJS) $(PPOBJS)
96
	rm -f $@
97
	$(AR) rc $@ $(OBJS) $(PPOBJS)
98
	$(RANLIB) $@
99

    
100
$(SLIB): $(OBJS)
101
ifeq ($(CONFIG_WIN32),yes)
102
	$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
103
	-lib /machine:i386 /def:$(@:.dll=.def)
104
else
105
	$(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS)
106
endif
107

    
108
depend: $(SRCS)
109
	$(CC) -MM $(CFLAGS) $^ 1>.depend
110

    
111
ifeq ($(BUILD_SHARED),yes)
112
install: all install-headers
113
ifeq ($(CONFIG_WIN32),yes)
114
	install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
115
else
116
	install -d $(prefix)/lib
117
	install $(INSTALLSTRIP) -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
118
	ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
119
	ldconfig || true
120
endif
121
else
122
install:
123
endif
124

    
125
installlib: all install-headers
126
	install -m 644 $(LIB) $(prefix)/lib
127

    
128
install-headers:
129
	mkdir -p "$(prefix)/include/ffmpeg"
130
	install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
131
                $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
132
                $(SRC_PATH)/libavformat/rtspcodes.h \
133
                "$(prefix)/include/ffmpeg"
134

    
135
%.o: %.c
136
	$(CC) $(CFLAGS) -c -o $@ $< 
137

    
138
# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
139
%.o: %.cpp
140
	g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< 
141

    
142
distclean clean: 
143
	rm -f *.o *.d .depend *~ *.a *.so $(LIB)
144

    
145
#
146
# include dependency files if they exist
147
#
148
ifneq ($(wildcard .depend),)
149
include .depend
150
endif