summaryrefslogtreecommitdiff
path: root/chat/libtlen/patches/patch-aa
blob: 762573b6c2a46a18b693b558245f7da915d021d5 (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
46
47
48
49
50
51
52
53
$NetBSD: patch-aa,v 1.3 2005/03/10 13:25:07 tv Exp $

--- lib/Makefile.in.orig	2003-01-16 04:33:32.000000000 -0600
+++ lib/Makefile.in
@@ -13,7 +13,7 @@ VERSION_MAJOR=1
 VERSION_MINOR=5
 
 CC = @CC@
-CFLAGS = @CFLAGS_LIBTLEN@ -I.. -fPIC -Wall -ggdb
+CFLAGS = @CFLAGS_LIBTLEN@ -I..
 LIBS= @LIBS_LIBTLEN@
 
 MAKE = @MAKE@
@@ -33,7 +33,7 @@ STATIC = libtlen.a
 HEADERS = *.h
 libincludedir = /libtlen
 
-all: static shared test-client
+all: static
 static: $(STATIC)
 shared: $(SHARED)
 test-client: testclient
@@ -49,15 +49,17 @@ static: $(STATIC)
 shared: $(SHARED)
 
 $(STATIC): $(OBJS)
-	$(AR) r $(STATIC) $(OBJS)
-	$(RANLIB) $(STATIC)
+	${LIBTOOL} --mode=link ${CC} -o ${STATIC:.a=.la} ${OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info ${VERSION_MAJOR}:${VERSION_MINOR}
+
+.c.o:
+	${LIBTOOL} --mode=compile ${CC} -c ${CPPFLAGS} ${CFLAGS} $< -o $@
 
 $(SHARED): $(OBJS)
 	$(CC) -g -O2 -shared -Wl,-soname,libtlen.so.$(VERSION_MAJOR) -o $(SHARED) $(OBJS) $(LIBS) -lc
 	$(LN_S) -f $(SHARED) $(SHAREDM)
 	$(LN_S) -f $(SHARED) $(SHAREDMM)
 
-install: install-shared install-static install-devel
+install: install-static install-devel
 
 install-shared:
 	$(INSTALL) -d $(DESTDIR)$(libdir)
@@ -66,8 +68,7 @@ install-shared:
 	cd $(DESTDIR)$(libdir) && $(LN_S) -f $(SHARED) $(SHAREDMM)
 
 install-static:
-	$(INSTALL) -d $(DESTDIR)$(libdir)
-	$(INSTALL) -m 755 $(STATIC) $(DESTDIR)$(libdir)
+	${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${STATIC:.a=.la} ${PREFIX}/lib
 
 install-devel:
 	$(INSTALL) -d $(DESTDIR)$(includedir)$(libincludedir)