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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
$NetBSD: patch-ac,v 1.4 2007/08/02 21:48:34 dbj Exp $
--- Makefile.orig 2004-07-08 13:02:04.000000000 +0200
+++ Makefile
@@ -5,9 +5,7 @@
include config.mak
VPATH=$(SRC_PATH)
-
-CFLAGS=$(OPTFLAGS) -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
-LDFLAGS+= -g
+CFLAGS= $(SHCFLAGS) -Wall -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
ifeq ($(TARGET_GPROF),yes)
CFLAGS+=-p
@@ -46,6 +44,8 @@ ifeq ($(CONFIG_VORBIS),yes)
EXTRALIBS+=-logg -lvorbis -lvorbisenc
endif
+EXTRALIBS+=${LIBOSSAUDIO}
+
ifeq ($(CONFIG_FAAD),yes)
ifeq ($(CONFIG_FAADBIN),yes)
# no libs needed
@@ -76,7 +76,7 @@ endif
OBJS = ffmpeg.o ffserver.o cmdutils.o ffplay.o
SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
-FFLIBS = -L./libavformat -lavformat -L./libavcodec -lavcodec
+FFLIBS = libavformat/libavformat.la libavcodec/libavcodec.la
all: lib $(PROG) $(PROGTEST) $(VHOOK) $(QTFASTSTART) $(DOC)
@@ -84,25 +84,18 @@ lib:
$(MAKE) -C libavcodec all
$(MAKE) -C libavformat all
-ffmpeg_g$(EXESUF): ffmpeg.o cmdutils.o .libs
- $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(FFLIBS) $(EXTRALIBS)
-
-ffmpeg$(EXESUF): ffmpeg_g$(EXESUF)
- cp -p $< $@
- $(STRIP) $@
+ffmpeg$(EXESUF): ffmpeg.o cmdutils.o .ffmpeglibs
+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(FFLIBS) $(EXTRALIBS)
-ffserver$(EXESUF): ffserver.o .libs
- $(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS)
+ffserver$(EXESUF): ffserver.o .ffmpeglibs
+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS)
-ffplay_g$(EXESUF): ffplay.o cmdutils.o .libs
- $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(FFLIBS) $(EXTRALIBS) $(SDL_LIBS)
-ffplay$(EXESUF): ffplay_g$(EXESUF)
- cp -p $< $@
- $(STRIP) $@
+ffplay$(EXESUF): ffplay.o cmdutils.o .ffmpeglibs
+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(FFLIBS) $(EXTRALIBS) $(SDL_LIBS)
-output_example$(EXESUF): output_example.o .libs
- $(CC) $(LDFLAGS) -o $@ output_example.o $(FFLIBS) $(EXTRALIBS)
+output_example$(EXESUF): output_example.o .ffmpeglibs
+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ output_example.o $(FFLIBS) $(EXTRALIBS)
qt-faststart$(EXESUF): qt-faststart.c
$(CC) qt-faststart.c -o qt-faststart$(EXESUF)
@@ -111,9 +104,9 @@ ffplay.o: ffplay.c
$(CC) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $<
%.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) -DFFSERVER_CONF=\"$(FFSERVER_CONF)\" $(CFLAGS) -c -o $@ $<
-videohook: .libs
+videohook: .ffmpeglibs
$(MAKE) -C vhook all
documentation:
@@ -122,10 +115,10 @@ documentation:
.PHONY: install
install: all install-man $(INSTALLVHOOK)
- $(MAKE) -C libavcodec install
- $(MAKE) -C libavformat install
+ $(MAKE) -C libavcodec install install-headers
+ $(MAKE) -C libavformat install install-headers
install -d "$(bindir)"
- install -c -s -m 755 $(PROG) "$(bindir)"
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) $(PROG) "$(bindir)"
# create the window installer
wininstaller: all install
@@ -159,15 +152,15 @@ endif
.depend: $(SRCS)
$(CC) -MM $(CFLAGS) $(SDL_CFLAGS) $^ 1>.depend
-.libs: lib
- @test -f .libs || touch .libs
- @for i in $(DEP_LIBS) ; do if $(TEST) $$i -nt .libs ; then touch .libs; fi ; done
+.ffmpeglibs: lib
+ @test -f .ffmpeglibs || touch .ffmpeglibs
+ @for i in $(DEP_LIBS) ; do if $(TEST) $$i -nt .ffmpeglibs ; then touch .ffmpeglibs; fi ; done
clean: $(CLEANVHOOK)
$(MAKE) -C libavcodec clean
$(MAKE) -C libavformat clean
$(MAKE) -C tests clean
- rm -f *.o *.d *~ .libs .depend gmon.out TAGS ffmpeg_g$(EXESUF) ffplay_g$(EXESUF) $(PROG) $(PROGTEST)
+ rm -f *.o *.d *~ .ffmpeglibs .depend gmon.out TAGS ffmpeg_g$(EXESUF) ffplay_g$(EXESUF) $(PROG) $(PROGTEST)
clean-vhook:
$(MAKE) -C vhook clean
|