]>
Commit | Line | Data |
---|---|---|
2a60eebe JB |
1 | diff -Nur ffmpeg-0.4.7.orig/libavcodec/libpostproc/Makefile ffmpeg-0.4.7/libavcodec/libpostproc/Makefile |
2 | --- ffmpeg-0.4.7.orig/libavcodec/libpostproc/Makefile 2003-08-25 00:29:50.000000000 +0200 | |
3 | +++ ffmpeg-0.4.7/libavcodec/libpostproc/Makefile 2003-09-04 20:25:27.891853304 +0200 | |
4 | @@ -1,26 +1,21 @@ | |
5 | ||
6 | include ../../config.mak | |
7 | ||
8 | -ifeq ($(SHARED_PP),yes) | |
9 | -SPPLIB = libpostproc.so | |
10 | -SPPVERSION = 0.0.1 | |
11 | -endif | |
12 | -PPLIB = libpostproc.a | |
13 | +PPLIB = libpostproc.la | |
14 | ||
15 | -PPOBJS=postprocess.o | |
16 | -SPPOBJS=postprocess_pic.o | |
17 | +PPOBJS=postprocess.lo | |
18 | ||
19 | -CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC) | |
20 | +CFLAGS = $(OPT) $(MLIB_INC) -I. -I.. $(EXTRA_INC) | |
21 | # -I/usr/X11R6/include/ | |
22 | ||
23 | .SUFFIXES: .c .o | |
24 | ||
25 | # .PHONY: all clean | |
26 | ||
27 | -.c.o: | |
28 | - $(CC) -c $(CFLAGS) -I.. -I../.. -o $@ $< | |
29 | +.c.lo: | |
30 | + libtool --mode=compile $(CC) -c $(CFLAGS) -I.. -I../.. -o $@ $< | |
31 | ||
32 | -all: $(SWSLIB) $(PPLIB) $(SPPLIB) | |
33 | +all: $(SWSLIB) $(PPLIB) | |
34 | ||
35 | clean: | |
36 | rm -f *.o *.a *~ *.so | |
37 | @@ -34,27 +29,20 @@ | |
38 | $(CC) -MM $(CFLAGS) postprocess.c 1>.depend | |
39 | ||
40 | ifeq ($(SHARED_PP),yes) | |
41 | -postprocess_pic.o: postprocess.c | |
42 | - $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $< | |
43 | - | |
44 | -$(SPPLIB): $(SPPOBJS) | |
45 | - $(CC) -shared -Wl,-soname,$(SPPLIB).0 \ | |
46 | - -o $(SPPLIB) $(SPPOBJS) | |
47 | +RPATH= -rpath $(prefix)/lib | |
48 | +else | |
49 | +RPATH= | |
50 | endif | |
51 | ||
52 | $(PPLIB): $(PPOBJS) | |
53 | - rm -f $@ | |
54 | - $(AR) rc $@ $(PPOBJS) | |
55 | - $(RANLIB) $@ | |
56 | + libtool --mode=link $(CC) -o $(PPLIB) $(PPOBJS) $(RPATH) -version-info 0:1:0 | |
57 | ||
58 | install: all | |
59 | ifeq ($(SHARED_PP),yes) | |
60 | - install -d $(prefix)/lib | |
61 | - install -s -m 755 $(SPPLIB) $(prefix)/lib/$(SPPLIB).$(SPPVERSION) | |
62 | - ln -sf $(SPPLIB).$(SPPVERSION) $(prefix)/lib/$(SPPLIB) | |
63 | - ldconfig || true | |
64 | - mkdir -p $(prefix)/include/postproc | |
65 | - install -m 644 postprocess.h $(prefix)/include/postproc/postprocess.h | |
66 | + install -d $(DESTDIR)$(prefix)/lib | |
67 | + libtool --mode=install install -m 755 $(PPLIB) $(DESTDIR)$(prefix)/lib | |
68 | + install -d $(DESTDIR)$(prefix)/include/postproc | |
69 | + install -m 644 postprocess.h $(DESTDIR)$(prefix)/include/postproc/postprocess.h | |
70 | endif | |
71 | ||
72 | ||
73 | diff -Nur ffmpeg-0.4.7.orig/libavcodec/Makefile ffmpeg-0.4.7/libavcodec/Makefile | |
74 | --- ffmpeg-0.4.7.orig/libavcodec/Makefile 2003-09-04 19:57:13.000000000 +0200 | |
75 | +++ ffmpeg-0.4.7/libavcodec/Makefile 2003-09-04 20:22:58.144618344 +0200 | |
76 | @@ -10,23 +10,23 @@ | |
539b540f JB |
77 | CFLAGS= $(OPT) -Wall -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE |
78 | LDFLAGS= $(LDOPT) | |
79 | ||
80 | -OBJS= common.o utils.o mem.o allcodecs.o \ | |
2a60eebe | 81 | - mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\ |
539b540f | 82 | - mpegaudio.o ac3enc.o mjpeg.o resample.o dsputil.o \ |
2a60eebe JB |
83 | - motion_est.o imgconvert.o imgresample.o \ |
84 | - mpeg12.o mpegaudiodec.o pcm.o simple_idct.o \ | |
539b540f | 85 | - ratecontrol.o adpcm.o eval.o dv.o error_resilience.o \ |
2a60eebe JB |
86 | - fft.o mdct.o mace.o huffyuv.o cyuv.o opts.o raw.o h264.o golomb.o \ |
87 | - vp3.o asv1.o 4xm.o cabac.o ffv1.o ra144.o ra288.o vcr1.o cljr.o | |
539b540f | 88 | +OBJS= common.lo utils.lo mem.lo allcodecs.lo \ |
2a60eebe | 89 | + mpegvideo.lo jrevdct.lo jfdctfst.lo jfdctint.lo\ |
539b540f | 90 | + mpegaudio.lo ac3enc.lo mjpeg.lo resample.lo dsputil.lo \ |
2a60eebe JB |
91 | + motion_est.lo imgconvert.lo imgresample.lo \ |
92 | + mpeg12.lo mpegaudiodec.lo pcm.lo simple_idct.lo \ | |
539b540f | 93 | + ratecontrol.lo adpcm.lo eval.lo dv.lo error_resilience.lo \ |
2a60eebe JB |
94 | + fft.lo mdct.lo mace.lo huffyuv.lo cyuv.lo opts.lo raw.lo h264.lo golomb.lo \ |
95 | + vp3.lo asv1.lo 4xm.lo cabac.lo ffv1.lo ra144.lo ra288.lo vcr1.lo cljr.lo | |
96 | ||
97 | ifeq ($(AMR_NB),yes) | |
98 | ifeq ($(AMR_NB_FIXED),yes) | |
99 | -OBJS+= amr.o | |
100 | -AMREXTRALIBS+= amr/*.o | |
101 | +OBJS+= amr.lo | |
102 | +AMREXTRALIBS+= amr/*.lo | |
103 | AMRLIBS=amrlibs | |
104 | CLEANAMR=cleanamr | |
105 | else | |
106 | -OBJS+= amr.o amr_float/sp_dec.o amr_float/sp_enc.o amr_float/interf_dec.o amr_float/interf_enc.o | |
107 | +OBJS+= amr.lo amr_float/sp_dec.lo amr_float/sp_enc.lo amr_float/interf_dec.lo amr_float/interf_enc.lo | |
108 | CLEANAMR=cleanamrfloat | |
109 | endif | |
110 | endif | |
111 | @@ -35,26 +35,26 @@ | |
112 | ||
113 | # codecs which are patented in some non free countries like the us | |
114 | ifeq ($(CONFIG_RISKY),yes) | |
115 | -OBJS+= h263.o msmpeg4.o h263dec.o svq1.o rv10.o wmadec.o indeo3.o | |
116 | +OBJS+= h263.lo msmpeg4.lo h263dec.lo svq1.lo rv10.lo wmadec.lo indeo3.lo | |
117 | endif | |
118 | ||
119 | ifeq ($(HAVE_XVMC_ACCEL),yes) | |
120 | -OBJS+= xvmcvideo.o | |
121 | +OBJS+= xvmcvideo.lo | |
122 | endif | |
539b540f JB |
123 | |
124 | # currently using liba52 for ac3 decoding | |
125 | ifeq ($(CONFIG_AC3),yes) | |
126 | -OBJS+= a52dec.o | |
127 | +OBJS+= a52dec.lo | |
128 | ||
129 | # using builtin liba52 or runtime linked liba52.so.0 | |
130 | ifneq ($(CONFIG_A52BIN),yes) | |
131 | -OBJS+= liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o \ | |
2a60eebe | 132 | - liba52/imdct.o liba52/parse.o liba52/crc.o liba52/resample.o |
539b540f | 133 | +OBJS+= liba52/bit_allocate.lo liba52/bitstream.lo liba52/downmix.lo \ |
2a60eebe JB |
134 | + liba52/imdct.lo liba52/parse.lo liba52/crc.lo liba52/resample.lo |
135 | endif | |
136 | endif | |
137 | ||
138 | ifeq ($(CONFIG_FAAD),yes) | |
139 | -OBJS+= faad.o | |
140 | +OBJS+= faad.lo | |
141 | ifeq ($(CONFIG_FAADBIN),yes) | |
142 | # no libs needed | |
143 | else | |
144 | @@ -64,20 +64,20 @@ | |
145 | ||
146 | ifeq ($(CONFIG_PP),yes) | |
147 | ifeq ($(SHARED_PP),yes) | |
148 | -EXTRALIBS += -lpostproc | |
149 | +EXTRALIBS += libpostproc/libpostproc.la | |
150 | else | |
151 | # LIBS += libpostproc/libpostproc.a ... should be fixed | |
152 | -OBJS += libpostproc/postprocess.o | |
153 | +OBJS += libpostproc/postprocess.lo | |
539b540f JB |
154 | endif |
155 | endif | |
156 | ||
157 | ifeq ($(CONFIG_MP3LAME),yes) | |
158 | -OBJS += mp3lameaudio.o | |
159 | +OBJS += mp3lameaudio.lo | |
160 | EXTRALIBS += -lmp3lame | |
161 | endif | |
162 | ||
163 | ifeq ($(CONFIG_VORBIS),yes) | |
164 | -OBJS += oggvorbis.o | |
165 | +OBJS += oggvorbis.lo | |
166 | EXTRALIBS += -lvorbis -lvorbisenc | |
167 | endif | |
168 | ||
2a60eebe | 169 | @@ -88,10 +88,10 @@ |
539b540f JB |
170 | |
171 | # i386 mmx specific stuff | |
172 | ifeq ($(TARGET_MMX),yes) | |
173 | -OBJS += i386/fdct_mmx.o i386/cputest.o \ | |
174 | - i386/dsputil_mmx.o i386/mpegvideo_mmx.o \ | |
175 | - i386/idct_mmx.o i386/motion_est_mmx.o \ | |
2a60eebe | 176 | - i386/simple_idct_mmx.o i386/fft_sse.o |
539b540f JB |
177 | +OBJS += i386/fdct_mmx.lo i386/cputest.lo \ |
178 | + i386/dsputil_mmx.lo i386/mpegvideo_mmx.lo \ | |
179 | + i386/idct_mmx.lo i386/motion_est_mmx.lo \ | |
2a60eebe JB |
180 | + i386/simple_idct_mmx.lo i386/fft_sse.lo |
181 | ifdef TARGET_BUILTIN_VECTOR | |
182 | -i386/fft_sse.o: CFLAGS+= -msse | |
183 | +i386/fft_sse.lo: CFLAGS+= -msse | |
539b540f | 184 | endif |
2a60eebe | 185 | @@ -99,49 +99,51 @@ |
539b540f JB |
186 | |
187 | # armv4l specific stuff | |
188 | ifeq ($(TARGET_ARCH_ARMV4L),yes) | |
2a60eebe | 189 | -ASM_OBJS += armv4l/jrevdct_arm.o armv4l/simple_idct_arm.o |
539b540f | 190 | -OBJS += armv4l/dsputil_arm.o armv4l/mpegvideo_arm.o |
2a60eebe | 191 | +ASM_OBJS += armv4l/jrevdct_arm.lo armv4l/simple_idct_arm.lo |
539b540f JB |
192 | +OBJS += armv4l/dsputil_arm.lo armv4l/mpegvideo_arm.lo |
193 | endif | |
194 | ||
195 | # sun mediaLib specific stuff | |
196 | # currently only works when libavcodec is used in mplayer | |
197 | ifeq ($(HAVE_MLIB),yes) | |
198 | -OBJS += mlib/dsputil_mlib.o | |
199 | +OBJS += mlib/dsputil_mlib.lo | |
200 | CFLAGS += $(MLIB_INC) | |
201 | endif | |
202 | ||
203 | # alpha specific stuff | |
204 | ifeq ($(TARGET_ARCH_ALPHA),yes) | |
205 | -OBJS += alpha/dsputil_alpha.o alpha/mpegvideo_alpha.o \ | |
206 | - alpha/simple_idct_alpha.o alpha/motion_est_alpha.o | |
207 | -ASM_OBJS += alpha/dsputil_alpha_asm.o alpha/motion_est_mvi_asm.o | |
208 | +OBJS += alpha/dsputil_alpha.lo alpha/mpegvideo_alpha.lo \ | |
209 | + alpha/simple_idct_alpha.lo alpha/motion_est_alpha.lo | |
210 | +ASM_OBJS += alpha/dsputil_alpha_asm.lo alpha/motion_est_mvi_asm.lo | |
211 | CFLAGS += -fforce-addr -freduce-all-givs | |
212 | endif | |
213 | ||
214 | ifeq ($(TARGET_ARCH_POWERPC),yes) | |
215 | -OBJS += ppc/dsputil_ppc.o ppc/mpegvideo_ppc.o | |
216 | +OBJS += ppc/dsputil_ppc.lo ppc/mpegvideo_ppc.lo | |
217 | endif | |
218 | ||
219 | ifeq ($(TARGET_MMI),yes) | |
220 | -OBJS += ps2/dsputil_mmi.o ps2/idct_mmi.o ps2/mpegvideo_mmi.o | |
221 | +OBJS += ps2/dsputil_mmi.lo ps2/idct_mmi.lo ps2/mpegvideo_mmi.lo | |
222 | endif | |
223 | ||
224 | ifeq ($(TARGET_ALTIVEC),yes) | |
2a60eebe JB |
225 | -OBJS += ppc/dsputil_altivec.o ppc/mpegvideo_altivec.o ppc/idct_altivec.o \ |
226 | - ppc/fft_altivec.o ppc/gmc_altivec.o | |
227 | +OBJS += ppc/dsputil_altivec.lo ppc/mpegvideo_altivec.lo ppc/idct_altivec.lo \ | |
228 | + ppc/fft_altivec.lo ppc/gmc_altivec.lo | |
539b540f JB |
229 | endif |
230 | ||
2a60eebe JB |
231 | ifeq ($(TARGET_ARCH_SH4),yes) |
232 | -OBJS+= sh4/idct_sh4.o sh4/dsputil_sh4.o sh4/dsputil_align.o | |
233 | +OBJS+= sh4/idct_sh4.lo sh4/dsputil_sh4.lo sh4/dsputil_align.lo | |
234 | endif | |
235 | ||
236 | ||
539b540f JB |
237 | -SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) |
238 | +SRCS := $(OBJS:.lo=.c) $(ASM_OBJS:.lo=.S) | |
239 | OBJS := $(OBJS) $(ASM_OBJS) | |
240 | ||
2a60eebe | 241 | -LIB= $(LIBPREF)avcodec$(LIBSUF) |
539b540f JB |
242 | +LIB= libavcodec.la |
243 | ifeq ($(BUILD_SHARED),yes) | |
2a60eebe JB |
244 | -SLIB= $(SLIBPREF)avcodec$(SLIBSUF) |
245 | +RPATH= -rpath $(prefix)/lib | |
539b540f JB |
246 | +else |
247 | +RPATH= | |
248 | endif | |
249 | TESTS= imgresample-test dct-test motion-test fft-test | |
250 | ||
2a60eebe | 251 | @@ -153,33 +155,28 @@ |
539b540f JB |
252 | tests: apiexample cpuid_test $(TESTS) |
253 | ||
2a60eebe | 254 | $(LIB): $(OBJS) $(AMRLIBS) |
539b540f | 255 | - rm -f $@ |
2a60eebe | 256 | - $(AR) rc $@ $(OBJS) $(AMREXTRALIBS) |
539b540f | 257 | - $(RANLIB) $@ |
539b540f | 258 | - |
2a60eebe JB |
259 | -$(SLIB): $(OBJS) |
260 | - $(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) | |
261 | + libtool --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJS) $(AMREXTRALIBS) $(RPATH) $(EXTRALIBS) -release $(VERSION) | |
262 | ||
539b540f JB |
263 | -dsputil.o: dsputil.c dsputil.h |
264 | +dsputil.lo: dsputil.c dsputil.h | |
265 | ||
2a60eebe JB |
266 | -libpostproc/libpostproc.a: |
267 | +libpostproc/libpostproc.la: | |
268 | $(MAKE) -C libpostproc | |
539b540f JB |
269 | |
270 | -%.o: %.c | |
271 | - $(CC) $(CFLAGS) -c -o $@ $< | |
272 | +%.lo: %.c | |
2a60eebe | 273 | + libtool --mode=compile $(CC) $(CFLAGS) -c -o $@ $< |
539b540f | 274 | |
2a60eebe | 275 | %.o: %.S |
539b540f | 276 | - $(CC) $(CFLAGS) -c -o $@ $< |
41f21d20 | 277 | + libtool --mode=compile --tag CC $(CC) $(CFLAGS) -c -o $@ $< |
539b540f JB |
278 | |
279 | # motion_est_alpha uses the MVI extension, which is not available with | |
280 | # -mcpu=ev4 (default) or ev5/ev56. Thus, force -mcpu=pca56 in those | |
281 | # cases. | |
282 | ifeq ($(TARGET_ARCH_ALPHA),yes) | |
283 | -alpha/motion_est_alpha.o: alpha/motion_est_alpha.c | |
284 | +alpha/motion_est_alpha.lo: alpha/motion_est_alpha.c | |
285 | cpu=`echo "$(CFLAGS)" | sed -n 's,.*-mcpu=\([a-zA-Z0-9]*\).*,\1,p'`; \ | |
286 | case x"$$cpu" in x|xev[45]*) newcpu=pca56;; *) newcpu=$$cpu;; esac; \ | |
287 | echo $(CC) $(CFLAGS) -mcpu=$$newcpu -c -o $@ $<;\ | |
288 | - $(CC) $(CFLAGS) -mcpu=$$newcpu -c -o $@ $< | |
41f21d20 | 289 | + libtool --mode=compile --tag CC $(CC) $(CFLAGS) -mcpu=$$newcpu -c -o $@ $< |
539b540f JB |
290 | endif |
291 | ||
2a60eebe JB |
292 | depend: $(SRCS) |
293 | @@ -188,14 +185,14 @@ | |
294 | dep: depend | |
539b540f | 295 | |
2a60eebe JB |
296 | clean: $(CLEANAMR) |
297 | - rm -f *.o *.d *~ .depend $(LIB) $(SLIB) *.so i386/*.o i386/*~ \ | |
539b540f JB |
298 | - armv4l/*.o armv4l/*~ \ |
299 | - mlib/*.o mlib/*~ \ | |
300 | - alpha/*.o alpha/*~ \ | |
301 | - ppc/*.o ppc/*~ \ | |
302 | - ps2/*.o ps2/*~ \ | |
2a60eebe | 303 | - sh4/*.o sh4/*~ \ |
539b540f | 304 | - liba52/*.o liba52/*~ \ |
2a60eebe | 305 | + rm -f *.*o *.d *~ .depend $(LIB) $(SLIB) *.so* *.la i386/*.*o i386/*~ \ |
539b540f JB |
306 | + armv4l/*.*o armv4l/*~ \ |
307 | + mlib/*.*o mlib/*~ \ | |
308 | + alpha/*.*o alpha/*~ \ | |
309 | + ppc/*.*o ppc/*~ \ | |
310 | + ps2/*.*o ps2/*~ \ | |
2a60eebe | 311 | + sh4/*.*o sh4/*~ \ |
539b540f JB |
312 | + liba52/*.*o liba52/*~ \ |
313 | apiexample $(TESTS) | |
2a60eebe JB |
314 | $(MAKE) -C libpostproc clean |
315 | ||
316 | @@ -206,46 +203,44 @@ | |
317 | $(MAKE) -C amr clean | |
539b540f | 318 | |
2a60eebe JB |
319 | cleanamrfloat: |
320 | - rm -f amr_float/*.o | |
321 | + rm -f amr_float/*.*o | |
539b540f JB |
322 | |
323 | # api example program | |
324 | apiexample: apiexample.c $(LIB) | |
325 | - $(CC) $(CFLAGS) -o $@ $< $(LIB) $(EXTRALIBS) -lm | |
2a60eebe | 326 | + libtool --mode=link $(CC) $(CFLAGS) -o $@ $< $(LIB) $(EXTRALIBS) -lm |
539b540f JB |
327 | |
328 | # cpuid test | |
329 | cpuid_test: i386/cputest.c | |
330 | - $(CC) $(CFLAGS) -D__TEST__ -o $@ $< | |
2a60eebe | 331 | + libtool --mode=link $(CC) $(CFLAGS) -D__TEST__ -o $@ $< |
539b540f JB |
332 | |
333 | # testing progs | |
334 | ||
335 | imgresample-test: imgresample.c | |
336 | - $(CC) $(CFLAGS) -DTEST -o $@ $^ -lm | |
2a60eebe | 337 | + libtool --mode=link $(CC) $(CFLAGS) -DTEST -o $@ $^ -lm |
539b540f | 338 | |
2a60eebe | 339 | dct-test: dct-test.o fdctref.o $(LIB) |
539b540f | 340 | - $(CC) -o $@ $^ -lm |
2a60eebe | 341 | + libtool --mode=link $(CC) -o $@ $^ -lm |
539b540f JB |
342 | |
343 | motion-test: motion_test.o $(LIB) | |
344 | - $(CC) -o $@ $^ -lm | |
2a60eebe | 345 | + libtool --mode=link $(CC) -o $@ $^ -lm |
539b540f | 346 | |
2a60eebe | 347 | fft-test: fft-test.o $(LIB) |
539b540f | 348 | - $(CC) -o $@ $^ -lm |
2a60eebe | 349 | + libtool --mode=link $(CC) -o $@ $^ -lm |
539b540f JB |
350 | |
351 | install: all | |
352 | ifeq ($(BUILD_SHARED),yes) | |
353 | - install -d $(prefix)/lib | |
354 | - install -s -m 755 $(SLIB) $(prefix)/lib/libavcodec-$(VERSION).so | |
355 | - ln -sf libavcodec-$(VERSION).so $(prefix)/lib/libavcodec.so | |
356 | - ldconfig || true | |
357 | - mkdir -p $(prefix)/include/ffmpeg | |
358 | - install -m 644 $(VPATH)/avcodec.h $(prefix)/include/ffmpeg/avcodec.h | |
359 | - install -m 644 $(VPATH)/common.h $(prefix)/include/ffmpeg/common.h | |
360 | + install -d $(DESTDIR)$(prefix)/lib | |
361 | + libtool --mode=install install $(LIB) $(DESTDIR)$(prefix)/lib | |
362 | + install -d $(DESTDIR)$(prefix)/include/ffmpeg | |
363 | + install -m 644 $(VPATH)/avcodec.h $(DESTDIR)$(prefix)/include/ffmpeg/avcodec.h | |
364 | + install -m 644 $(VPATH)/common.h $(DESTDIR)$(prefix)/include/ffmpeg/common.h | |
365 | endif | |
366 | ||
367 | installlib: all | |
368 | - install -m 644 $(LIB) $(prefix)/lib | |
369 | - mkdir -p $(prefix)/include/ffmpeg | |
370 | + libtool --mode=install install $(LIB) $(DESTDIR)$(prefix)/lib | |
371 | + install -d $(DESTDIR)$(prefix)/include/ffmpeg | |
372 | install -m 644 $(SRC_PATH)/libavcodec/avcodec.h $(SRC_PATH)/libavcodec/common.h \ | |
373 | - $(prefix)/include/ffmpeg | |
374 | + $(DESTDIR)$(prefix)/include/ffmpeg | |
375 | ||
376 | # | |
377 | # include dependency files if they exist | |
2a60eebe JB |
378 | diff -Nur ffmpeg-0.4.7.orig/libavformat/Makefile ffmpeg-0.4.7/libavformat/Makefile |
379 | --- ffmpeg-0.4.7.orig/libavformat/Makefile 2003-09-04 19:57:13.000000000 +0200 | |
380 | +++ ffmpeg-0.4.7/libavformat/Makefile 2003-09-04 20:29:57.622847960 +0200 | |
381 | @@ -8,114 +8,107 @@ | |
539b540f JB |
382 | |
383 | CFLAGS= $(OPT) -Wall -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE | |
384 | ||
385 | -OBJS= utils.o cutils.o allformats.o | |
386 | +OBJS= utils.lo cutils.lo allformats.lo | |
2a60eebe | 387 | PPOBJS= |
539b540f JB |
388 | |
389 | # mux and demuxes | |
2a60eebe JB |
390 | -OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o raw.o rm.o \ |
391 | - avienc.o avidec.o wav.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \ | |
392 | - yuv4mpeg.o 4xm.o flvenc.o flvdec.o | |
393 | +OBJS+=mpeg.lo mpegts.lo mpegtsenc.lo ffm.lo crc.lo img.lo raw.lo rm.lo \ | |
394 | + avienc.lo avidec.lo wav.lo swf.lo au.lo gif.lo mov.lo mpjpeg.lo dv.lo \ | |
395 | + yuv4mpeg.lo 4xm.lo flvenc.lo flvdec.lo | |
396 | ||
397 | ifeq ($(CONFIG_RISKY),yes) | |
398 | -OBJS+= asf.o | |
399 | +OBJS+= asf.lo | |
400 | endif | |
401 | ||
402 | ifeq ($(AMR_NB),yes) | |
403 | -OBJS+= amr.o | |
404 | +OBJS+= amr.lo | |
405 | endif | |
406 | ||
407 | # image formats | |
408 | -OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o | |
409 | +OBJS+= pnm.lo yuv.lo png.lo jpeg.lo gifdec.lo | |
539b540f JB |
410 | # file I/O |
411 | -OBJS+= avio.o aviobuf.o file.o | |
2a60eebe JB |
412 | -OBJS+= framehook.o |
413 | +OBJS+= avio.lo aviobuf.lo file.lo | |
414 | +OBJS+= framehook.lo | |
539b540f JB |
415 | |
416 | ifeq ($(BUILD_STRPTIME),yes) | |
417 | -OBJS+= strptime.o | |
418 | +OBJS+= strptime.lo | |
419 | endif | |
420 | ||
421 | ifeq ($(CONFIG_VIDEO4LINUX),yes) | |
422 | -OBJS+= grab.o | |
423 | +OBJS+= grab.lo | |
424 | endif | |
425 | ||
2a60eebe JB |
426 | ifeq ($(CONFIG_DV1394),yes) |
427 | -OBJS+= dv1394.o | |
428 | +OBJS+= dv1394.lo | |
429 | endif | |
430 | ||
539b540f JB |
431 | ifeq ($(CONFIG_AUDIO_OSS),yes) |
432 | -OBJS+= audio.o | |
2a60eebe | 433 | +OBJS+= audio.lo |
539b540f JB |
434 | endif |
435 | ||
436 | ifeq ($(CONFIG_AUDIO_BEOS),yes) | |
2a60eebe JB |
437 | -PPOBJS+= beosaudio.o |
438 | +PPOBJS+= beosaudio.lo | |
439 | EXTRALIBS+=-lbe -lmedia | |
440 | -# this should be the default ! | |
441 | -EXTRALIBS+=-lavcodec -L../libavcodec | |
539b540f JB |
442 | endif |
443 | ||
444 | ifeq ($(CONFIG_NETWORK),yes) | |
445 | -OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o | |
446 | +OBJS+= udp.lo tcp.lo http.lo rtsp.lo rtp.lo rtpproto.lo | |
2a60eebe | 447 | # BeOS and Darwin network stuff |
539b540f JB |
448 | ifeq ($(NEED_INET_ATON),yes) |
449 | -OBJS+= barpainet.o | |
450 | +OBJS+= barpainet.lo | |
451 | endif | |
452 | endif | |
453 | ||
454 | ifeq ($(CONFIG_VORBIS),yes) | |
455 | -OBJS+= ogg.o | |
456 | +OBJS+= ogg.lo | |
457 | endif | |
458 | ||
2a60eebe | 459 | -LIB= $(LIBPREF)avformat$(LIBSUF) |
539b540f | 460 | +LIB= libavformat.la |
2a60eebe JB |
461 | ifeq ($(BUILD_SHARED),yes) |
462 | -SLIB= $(SLIBPREF)avformat$(SLIBSUF) | |
463 | +RPATH= -rpath $(prefix)/lib | |
464 | +else | |
465 | +RPATH= | |
466 | endif | |
539b540f | 467 | |
2a60eebe JB |
468 | -SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp) |
469 | +SRCS := $(OBJS:.lo=.c) $(PPOBJS:.lo=.cpp) | |
539b540f | 470 | |
2a60eebe JB |
471 | all: $(LIB) $(SLIB) |
472 | ||
473 | $(LIB): $(OBJS) $(PPOBJS) | |
539b540f | 474 | - rm -f $@ |
2a60eebe | 475 | - $(AR) rc $@ $(OBJS) $(PPOBJS) |
539b540f JB |
476 | - $(RANLIB) $@ |
477 | - | |
2a60eebe JB |
478 | -$(SLIB): $(OBJS) |
479 | - $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(AMREXTRALIBS) | |
480 | + libtool --mode=link $(CC) $(LDOPT) -o $@ $(OBJS) $(PPOBJS) ../libavcodec/libavcodec.la $(RPATH) -release $(VERSION) | |
481 | ||
482 | depend: $(SRCS) | |
483 | $(CC) -MM $(CFLAGS) $^ 1>.depend | |
484 | ||
485 | install: all | |
486 | ifeq ($(BUILD_SHARED),yes) | |
487 | - install -d $(prefix)/lib | |
488 | - install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so | |
489 | - ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so | |
490 | - ldconfig || true | |
539b540f | 491 | - mkdir -p $(prefix)/include/ffmpeg |
2a60eebe JB |
492 | - install -m 644 $(VPATH)/avformat.h $(prefix)/include/ffmpeg/avformat.h |
493 | - install -m 644 $(VPATH)/avio.h $(prefix)/include/ffmpeg/avio.h | |
494 | - install -m 644 $(VPATH)/rtp.h $(prefix)/include/ffmpeg/rtp.h | |
495 | - install -m 644 $(VPATH)/rtsp.h $(prefix)/include/ffmpeg/rtsp.h | |
496 | - install -m 644 $(VPATH)/rtspcodes.h $(prefix)/include/ffmpeg/rtspcodes.h | |
539b540f JB |
497 | + install -d $(DESTDIR)$(prefix)/lib |
498 | + libtool --mode=install install $(LIB) $(DESTDIR)$(prefix)/lib | |
499 | + install -d $(DESTDIR)$(prefix)/include/ffmpeg | |
2a60eebe JB |
500 | + install -m 644 $(VPATH)/avformat.h $(DESTDIR)$(prefix)/include/ffmpeg/avformat.h |
501 | + install -m 644 $(VPATH)/avio.h $(DESTDIR)$(prefix)/include/ffmpeg/avio.h | |
502 | + install -m 644 $(VPATH)/rtp.h $(DESTDIR)$(prefix)/include/ffmpeg/rtp.h | |
503 | + install -m 644 $(VPATH)/rtsp.h $(DESTDIR)$(prefix)/include/ffmpeg/rtsp.h | |
504 | + install -m 644 $(VPATH)/rtspcodes.h $(DESTDIR)$(prefix)/include/ffmpeg/rtspcodes.h | |
505 | endif | |
506 | ||
507 | installlib: all | |
508 | - install -m 644 $(LIB) $(prefix)/lib | |
509 | - mkdir -p $(prefix)/include/ffmpeg | |
510 | + libtool --mode=install install $(LIB) $(DESTDIR)$(prefix)/lib | |
511 | + install -d $(DESTDIR)$(prefix)/include/ffmpeg | |
512 | install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \ | |
513 | $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \ | |
514 | $(SRC_PATH)/libavformat/rtspcodes.h \ | |
515 | - $(prefix)/include/ffmpeg | |
539b540f | 516 | + $(DESTDIR)$(prefix)/include/ffmpeg |
539b540f JB |
517 | |
518 | -%.o: %.c | |
519 | - $(CC) $(CFLAGS) -c -o $@ $< | |
520 | +%.lo: %.c | |
2a60eebe | 521 | + libtool --mode=compile $(CC) $(CFLAGS) -c -o $@ $< |
539b540f JB |
522 | |
523 | # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings | |
524 | %.o: %.cpp | |
525 | - g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< | |
2a60eebe | 526 | + libtool --mode=compile --tag CXX g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< |
539b540f JB |
527 | |
528 | clean: | |
2a60eebe JB |
529 | - rm -f *.o *.d .depend *~ *.a $(LIB) |
530 | + rm -f *.*o *.d .depend *~ *.*a $(LIB) | |
531 | ||
532 | # | |
533 | # include dependency files if they exist | |
534 | diff -Nur ffmpeg-0.4.7.orig/Makefile ffmpeg-0.4.7/Makefile | |
535 | --- ffmpeg-0.4.7.orig/Makefile 2003-09-04 19:57:13.000000000 +0200 | |
536 | +++ ffmpeg-0.4.7/Makefile 2003-09-04 20:36:41.299479784 +0200 | |
537 | @@ -39,14 +39,10 @@ | |
538 | EXTRALIBS+=-lmedia -lbe | |
539b540f JB |
539 | endif |
540 | ||
2a60eebe JB |
541 | -ifeq ($(BUILD_SHARED),yes) |
542 | -DEP_LIBS=libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) | |
543 | -else | |
544 | -DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) | |
539b540f | 545 | +DEP_LIBS=libavcodec/libavcodec.la libavformat/libavformat.la |
539b540f | 546 | ifeq ($(CONFIG_MP3LAME),yes) |
2a60eebe JB |
547 | EXTRALIBS+=-lmp3lame |
548 | endif | |
549 | -endif | |
550 | ||
551 | ifeq ($(CONFIG_VORBIS),yes) | |
552 | EXTRALIBS+=-logg -lvorbis -lvorbisenc | |
553 | @@ -74,7 +70,7 @@ | |
554 | ||
555 | OBJS = ffmpeg.o ffserver.o cmdutils.o ffplay.o | |
556 | SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s) | |
557 | -FFLIBS = -L./libavformat -lavformat -L./libavcodec -lavcodec | |
558 | +FFLIBS = libavformat/libavformat.la libavcodec/libavcodec.la | |
559 | ||
560 | all: lib $(PROG) $(PROGTEST) $(VHOOK) | |
561 | ||
562 | @@ -82,25 +78,17 @@ | |
539b540f JB |
563 | $(MAKE) -C libavcodec all |
564 | $(MAKE) -C libavformat all | |
565 | ||
2a60eebe JB |
566 | -ffmpeg_g$(EXE): ffmpeg.o cmdutils.o .libs |
567 | - $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(FFLIBS) $(EXTRALIBS) | |
539b540f JB |
568 | - |
569 | -ffmpeg$(EXE): ffmpeg_g$(EXE) | |
2a60eebe JB |
570 | - cp -p $< $@ |
571 | - $(STRIP) $@ | |
572 | +ffmpeg$(EXE): ffmpeg.o cmdutils.o | |
573 | + libtool --mode=link $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(FFLIBS) $(EXTRALIBS) | |
574 | ||
575 | -ffserver$(EXE): ffserver.o .libs | |
576 | - $(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS) | |
577 | +ffserver$(EXE): ffserver.o | |
578 | + libtool --mode=link $(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS) | |
579 | ||
580 | -ffplay_g$(EXE): ffplay.o cmdutils.o .libs | |
581 | - $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(FFLIBS) $(EXTRALIBS) $(SDL_LIBS) | |
582 | +ffplay$(EXE): ffplay.o cmdutils.o | |
583 | + libtool --mode=link $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(FFLIBS) $(EXTRALIBS) $(SDL_LIBS) | |
584 | ||
585 | -ffplay$(EXE): ffplay_g$(EXE) | |
586 | - cp -p $< $@ | |
587 | - $(STRIP) $@ | |
588 | - | |
589 | -output_example$(EXE): output_example.o .libs | |
590 | - $(CC) $(LDFLAGS) -o $@ output_example.o $(FFLIBS) $(EXTRALIBS) | |
591 | +output_example$(EXE): output_example.o | |
592 | + libtool --mode=link $(CC) $(LDFLAGS) -o $@ output_example.o $(FFLIBS) $(EXTRALIBS) | |
593 | ||
594 | ffplay.o: ffplay.c | |
595 | $(CC) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $< | |
596 | @@ -108,27 +96,27 @@ | |
597 | %.o: %.c | |
598 | $(CC) $(CFLAGS) -c -o $@ $< | |
599 | ||
600 | -videohook: .libs | |
601 | +videohook: | |
602 | $(MAKE) -C vhook all | |
603 | ||
604 | -install: all install-man $(INSTALLVHOOK) | |
605 | +install: install-man $(INSTALLVHOOK) | |
539b540f | 606 | $(MAKE) -C libavcodec install |
2a60eebe | 607 | $(MAKE) -C libavformat install |
539b540f | 608 | - install -d $(prefix)/bin |
2a60eebe | 609 | - install -c -s -m 755 $(PROG) $(prefix)/bin |
539b540f | 610 | + install -d $(DESTDIR)$(prefix)/bin |
2a60eebe JB |
611 | + libtool --mode=install install -c -m 755 $(PROG) $(DESTDIR)$(prefix)/bin |
612 | ||
613 | # install man from source dir if available | |
614 | install-man: | |
615 | if [ -f $(SRC_PATH)/doc/ffmpeg.1 ] ; then \ | |
616 | - install -d $(mandir)/man1 ; \ | |
617 | + install -d $(DESTDIR)$(mandir)/man1 ; \ | |
618 | install -m 644 $(SRC_PATH)/doc/ffmpeg.1 $(SRC_PATH)/doc/ffplay.1 \ | |
619 | - $(SRC_PATH)/doc/ffserver.1 $(mandir)/man1 ; \ | |
620 | + $(SRC_PATH)/doc/ffserver.1 $(DESTDIR)$(mandir)/man1 ; \ | |
621 | fi | |
539b540f JB |
622 | |
623 | -install-vhook: $(prefix)/lib/vhook | |
624 | - $(MAKE) -C vhook install INSTDIR=$(prefix)/lib/vhook | |
625 | +install-vhook: $(DESTDIR)$(prefix)/lib/vhook | |
626 | + $(MAKE) -C vhook install INSTDIR=$(DESTDIR)$(prefix)/lib/vhook | |
627 | ||
628 | -$(prefix)/lib/vhook: | |
629 | +$(DESTDIR)$(prefix)/lib/vhook: | |
630 | install -d $@ | |
631 | ||
632 | installlib: | |
2a60eebe JB |
633 | @@ -147,15 +135,11 @@ |
634 | .depend: $(SRCS) | |
635 | $(CC) -MM $(CFLAGS) $^ 1>.depend | |
636 | ||
637 | -.libs: lib | |
638 | - @test -f .libs || touch .libs | |
639 | - @for i in $(DEP_LIBS) ; do if $(TEST) $$i -nt .libs ; then touch .libs; fi ; done | |
640 | - | |
641 | clean: $(CLEANVHOOK) | |
642 | $(MAKE) -C libavcodec clean | |
643 | $(MAKE) -C libavformat clean | |
644 | $(MAKE) -C tests clean | |
645 | - rm -f *.o *.d *~ .libs .depend gmon.out TAGS ffmpeg_g$(EXE) ffplay_g$(EXE) $(PROG) | |
646 | + rm -f *.o *.d *~ .depend gmon.out TAGS $(PROG) | |
647 | ||
648 | clean-vhook: | |
649 | $(MAKE) -C vhook clean |