summaryrefslogtreecommitdiff
path: root/security/rsaref/patches/patch-ag
blob: 7e80c917fa02115336966ef9781b70de6e5252e6 (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
$NetBSD: patch-ag,v 1.7 2004/02/04 19:02:43 fredb Exp $

--- unix/makefile.orig	1994-03-25 13:01:31.000000000 -0600
+++ unix/makefile
@@ -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/
@@ -41,8 +40,7 @@
 $(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