summaryrefslogtreecommitdiff
path: root/security/rsaref/patches/patch-ag
blob: 3b3b0e141a584a322cf82ce4e14122b17c90f954 (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
$NetBSD: patch-ag,v 1.6 2000/02/05 05:03:04 wiz Exp $
--- unix/makefile.orig	Fri Mar 25 14:01:31 1994
+++ unix/makefile	Sun May 23 17:02:59 1999
@@ -4,8 +4,7 @@
 O = o
 
 # commands
-CC = cc
-LIB = ar
+CC := ${LIBTOOL} ${CC}
 
 # name of temporary library script
 TEMPFILE = $(TEMP)/temp.mak
@@ -14,18 +13,18 @@
 STDINCDIR=/usr/include
 
 # The places to look for include files (in order).
-INCL =  -I. -I$(RSAREFDIR) -I$(STDINCDIR)
+INCL =  -I. -I$(RSAREFDIR)
 
 # name of main executable to build
 PROG = all
 
 # Normal C flags.
-CFLAGS = $(INCL) -O -c -DPROTOTYPES=1
+CFLAGS += $(INCL) -c -DPROTOTYPES=1
 MFLAGS = -I. -I$(RSAREFDIR)
 
 # The location of the common source directory.
 RSAREFDIR = ../source/
-RSAREFLIB = rsaref.a
+RSAREFLIB = librsaref.la
 
 # The location of the demo source directory.
 RDEMODIR = ../rdemo/
@@ -38,11 +37,10 @@
 dhdemo : dhdemo.$(O) $(RSAREFLIB)
 	cc -o $@ dhdemo.$(O) $(RSAREFLIB)
 
 $(RSAREFLIB) : desc.$(O) digit.$(O) md2c.$(O) md5c.$(O) nn.$(O) prime.$(O)\
   rsa.$(O) r_encode.$(O) r_dh.$(O) r_enhanc.$(O) r_keygen.$(O) r_random.$(O)\
   r_stdlib.$(O)
-	$(LIB) r $@ $?
-	ranlib $@
+	${LIBTOOL} --mode=link cc -o $@ ${?:.o=.lo} -rpath ${PREFIX}/lib -version-info 3:0
 
 rdemo.$(O) : $(RDEMODIR)rdemo.c $(RSAREFDIR)global.h $(RSAREFDIR)rsaref.h
 	$(CC) $(CFLAGS) $(RDEMODIR)rdemo.c