summaryrefslogtreecommitdiff
path: root/multimedia/ffmpeg/patches/patch-ad
blob: 48746f87ca4f17af3529db94dcdaa064b78a2e9b (plain)
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
$NetBSD: patch-ad,v 1.2 2004/05/25 21:49:26 wiz Exp $

--- libavformat/Makefile.orig	2003-09-28 17:26:40.000000000 +0200
+++ libavformat/Makefile
@@ -69,12 +69,14 @@ endif
 
 SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
 
+install: all
+	$(LIBTOOL) --mode=install $(BSD_INSTALL_DATA) $(LIB:.a=.la) $(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)
 
 $(SLIB): $(OBJS)
 ifeq ($(CONFIG_WIN32),yes)
@@ -84,9 +86,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)
@@ -112,11 +111,11 @@ install-headers:
                 "$(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 $@ $< 
 
 clean: 
 	rm -f *.o *.d .depend *~ *.a $(LIB)