Merge from vendor branch TNF:
[pkgsrc.git] / security / rsaref / patches / patch-ag
1 $NetBSD: patch-ag,v 1.7 2004/02/04 19:02:43 fredb Exp $
2
3 --- unix/makefile.orig  1994-03-25 13:01:31.000000000 -0600
4 +++ unix/makefile
5 @@ -4,8 +4,7 @@
6  O = o
7  
8  # commands
9 -CC = cc
10 -LIB = ar
11 +CC := ${LIBTOOL} --mode=compile ${CC}
12  
13  # name of temporary library script
14  TEMPFILE = $(TEMP)/temp.mak
15 @@ -14,18 +13,18 @@
16  STDINCDIR=/usr/include
17  
18  # The places to look for include files (in order).
19 -INCL =  -I. -I$(RSAREFDIR) -I$(STDINCDIR)
20 +INCL =  -I. -I$(RSAREFDIR)
21  
22  # name of main executable to build
23  PROG = all
24  
25  # Normal C flags.
26 -CFLAGS = $(INCL) -O -c -DPROTOTYPES=1
27 +CFLAGS += $(INCL) -c -DPROTOTYPES=1
28  MFLAGS = -I. -I$(RSAREFDIR)
29  
30  # The location of the common source directory.
31  RSAREFDIR = ../source/
32 -RSAREFLIB = rsaref.a
33 +RSAREFLIB = librsaref.la
34  
35  # The location of the demo source directory.
36  RDEMODIR = ../rdemo/
37 @@ -41,8 +40,7 @@
38  $(RSAREFLIB) : desc.$(O) digit.$(O) md2c.$(O) md5c.$(O) nn.$(O) prime.$(O)\
39    rsa.$(O) r_encode.$(O) r_dh.$(O) r_enhanc.$(O) r_keygen.$(O) r_random.$(O)\
40    r_stdlib.$(O)
41 -       $(LIB) r $@ $?
42 -       ranlib $@
43 +       ${LIBTOOL} --mode=link cc -o $@ ${?:.o=.lo} -rpath ${PREFIX}/lib -version-info 3:0
44  
45  rdemo.$(O) : $(RDEMODIR)rdemo.c $(RSAREFDIR)global.h $(RSAREFDIR)rsaref.h
46         $(CC) $(CFLAGS) $(RDEMODIR)rdemo.c