1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
$NetBSD: patch-ad,v 1.6 2007/12/22 00:05:25 joerg Exp $
--- libavformat/Makefile.orig 2004-04-24 17:16:23.000000000 +0200
+++ libavformat/Makefile
@@ -6,7 +6,7 @@ include ../config.mak
VPATH=$(SRC_PATH)/libavformat
-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
+CFLAGS=$(SHCFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
OBJS= utils.o cutils.o os_support.o allformats.o
PPOBJS=
@@ -68,6 +68,11 @@ endif
ifeq ($(CONFIG_VORBIS),yes)
OBJS+= ogg.o
+EXTRALIBS+= -lvorbis -lvorbisenc
+endif
+
+ifeq ($(CONFIG_MP3LAME),yes)
+EXTRALIBS += -lmp3lame
endif
ifeq ($(TARGET_ARCH_SPARC64),yes)
@@ -81,12 +86,14 @@ endif
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
+install: all
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(LIB:.a=.la) ${DESTDIR}$(prefix)/lib
+
all: $(LIB) $(SLIB)
$(LIB): $(OBJS) $(PPOBJS)
rm -f $@
- $(AR) rc $@ $(OBJS) $(PPOBJS)
- $(RANLIB) $@
+ $(LIBTOOL) --mode=link $(CC) -o $(LIB:.a=.la) $(OBJS:.o=.lo) $(PPOBJS:.o=.lo) -rpath $(prefix)/lib $(LIBOSSAUDIO) $(EXTRALIBS)
$(SLIB): $(OBJS)
ifeq ($(CONFIG_WIN32),yes)
@@ -96,9 +103,6 @@ else
$(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS)
endif
-depend: $(SRCS)
- $(CC) -MM $(CFLAGS) $^ 1>.depend
-
ifeq ($(BUILD_SHARED),yes)
install: all install-headers
ifeq ($(CONFIG_WIN32),yes)
@@ -117,18 +121,18 @@ installlib: all install-headers
install -m 644 $(LIB) $(prefix)/lib
install-headers:
- mkdir -p "$(prefix)/include/ffmpeg"
+ mkdir -p "${DESTDIR}$(prefix)/include/ffmpeg"
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 \
- "$(prefix)/include/ffmpeg"
+ "${DESTDIR}$(prefix)/include/ffmpeg"
%.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<
# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
%.o: %.cpp
- g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
+ $(LIBTOOL) --mode=compile $(CXX) $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
distclean clean:
rm -f *.o *.d .depend *~ *.a $(LIB)
|