Merge in demo engines from 0.9.7-stable.
[openssl.git] / demos / engines / rsaref / Makefile
1 LIBNAME=        librsaref
2 SRC=            rsaref.c
3 OBJ=            rsaref.o
4 HEADER=         rsaref.h
5
6 CC=             gcc
7 PIC=            -fPIC
8 CFLAGS=         -g -I../../../include $(PIC) -DENGINE_DYNAMIC_SUPPORT
9 AR=             ar r
10 RANLIB=         ranlib
11
12 LIB=            $(LIBNAME).a
13 SHLIB=          $(LIBNAME).so
14
15 all:
16                 @echo 'Please choose a system to build on:'
17                 @echo ''
18                 @echo 'tru64:    Tru64 Unix, Digital Unix, Digital OSF/1'
19                 @echo 'solaris:  Solaris'
20                 @echo 'irix:     IRIX'
21                 @echo 'hpux32:   32-bit HP/UX'
22                 @echo 'hpux64:   64-bit HP/UX'
23                 @echo 'aix:      AIX'
24                 @echo 'gnu:      Generic GNU-based system (gcc and GNU ld)'
25                 @echo ''
26
27 FORCE.install:
28 install:        FORCE.install
29                 cd install; \
30                         make -f unix/makefile CFLAGS='-I. -DPROTOTYPES=1 -O -c' RSAREFLIB=librsaref.a librsaref.a
31
32 FORCE.update:
33 update:         FORCE.update
34                 perl ../../../util/mkerr.pl -conf rsaref.ec \
35                         -nostatic -staticloader -write rsaref.c
36
37 gnu:            install $(SHLIB).gnu
38 tru64:          install $(SHLIB).tru64
39 solaris:        install $(SHLIB).solaris
40 irix:           install $(SHLIB).irix
41 hpux32:         install $(SHLIB).hpux32
42 hpux64:         install $(SHLIB).hpux64
43 aix:            install $(SHLIB).aix
44
45 $(LIB):         $(OBJ)
46                 $(AR) $(LIB) $(OBJ)
47                 - $(RANLIB) $(LIB)
48
49 LINK_SO=        \
50   ld -r -o $(LIBNAME).o $$ALLSYMSFLAGS $(LIB) install/librsaref.a && \
51   (nm -Pg $(LIBNAME).o | grep ' [BDT] ' | cut -f1 -d' ' > $(LIBNAME).exp; \
52    $$SHAREDCMD $$SHAREDFLAGS -o $(SHLIB) $(LIBNAME).o -L ../../.. -lcrypto -lc)
53
54 $(SHLIB).gnu:   $(LIB) install/librsaref.a
55                 ALLSYMSFLAGS='--whole-archive' \
56                 SHAREDFLAGS='-shared -Wl,-soname=$(SHLIB)' \
57                 SHAREDCMD='$(CC)'; \
58                 $(LINK_SO)
59                 touch $(SHLIB).gnu
60 $(SHLIB).tru64: $(LIB) install/librsaref.a
61                 ALLSYMSFLAGS='-all' \
62                 SHAREDFLAGS='-shared' \
63                 SHAREDCMD='$(CC)'; \
64                 $(LINK_SO)
65                 touch $(SHLIB).tru64
66 $(SHLIB).solaris:       $(LIB) install/librsaref.a
67                 ALLSYMSFLAGS='-z allextract' \
68                 SHAREDFLAGS='-G -h $(SHLIB)' \
69                 SHAREDCMD='$(CC)'; \
70                 $(LINK_SO)
71                 touch $(SHLIB).solaris
72 $(SHLIB).irix:  $(LIB) install/librsaref.a
73                 ALLSYMSFLAGS='-all' \
74                 SHAREDFLAGS='-shared -Wl,-soname,$(SHLIB)' \
75                 SHAREDCMD='$(CC)'; \
76                 $(LINK_SO)
77                 touch $(SHLIB).irix
78 $(SHLIB).hpux32:        $(LIB) install/librsaref.a
79                 ALLSYMSFLAGS='-Fl' \
80                 SHAREDFLAGS='+vnocompatwarnings -b -z +s +h $(SHLIB)' \
81                 SHAREDCMD='/usr/ccs/bin/ld'; \
82                 $(LINK_SO)
83                 touch $(SHLIB).hpux32
84 $(SHLIB).hpux64:        $(LIB) install/librsaref.a
85                 ALLSYMSFLAGS='+forceload' \
86                 SHAREDFLAGS='-b -z +h $(SHLIB)' \
87                 SHAREDCMD='/usr/ccs/bin/ld'; \
88                 $(LINK_SO)
89                 touch $(SHLIB).hpux64
90 $(SHLIB).aix:   $(LIB) install/librsaref.a
91                 ALLSYMSFLAGS='-bnogc' \
92                 SHAREDFLAGS='-G -bE:$(LIBNAME).exp -bM:SRE' \
93                 SHAREDCMD='$(CC)'; \
94                 $(LINK_SO)
95                 touch $(SHLIB).aix
96
97 depend:
98                 sed -e '/^# DO NOT DELETE.*/,$$d' < Makefile > Makefile.tmp
99                 echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp
100                 gcc -M $(CFLAGS) $(SRC) >> Makefile.tmp
101                 perl ../../../util/clean-depend.pl < Makefile.tmp > Makefile.new
102                 rm -f Makefile.tmp Makefile
103                 mv Makefile.new Makefile
104
105 # DO NOT DELETE THIS LINE -- make depend depends on it.
106
107 rsaref.o: ../../../include/openssl/asn1.h ../../../include/openssl/bio.h
108 rsaref.o: ../../../include/openssl/bn.h ../../../include/openssl/crypto.h
109 rsaref.o: ../../../include/openssl/dh.h ../../../include/openssl/dsa.h
110 rsaref.o: ../../../include/openssl/e_os2.h ../../../include/openssl/engine.h
111 rsaref.o: ../../../include/openssl/err.h ../../../include/openssl/lhash.h
112 rsaref.o: ../../../include/openssl/opensslconf.h
113 rsaref.o: ../../../include/openssl/opensslv.h
114 rsaref.o: ../../../include/openssl/ossl_typ.h ../../../include/openssl/rand.h
115 rsaref.o: ../../../include/openssl/rsa.h ../../../include/openssl/safestack.h
116 rsaref.o: ../../../include/openssl/stack.h ../../../include/openssl/symhacks.h
117 rsaref.o: ../../../include/openssl/ui.h rsaref.c rsaref_err.c rsaref_err.h
118 rsaref.o: source/des.h source/global.h source/md2.h source/md5.h source/rsa.h
119 rsaref.o: source/rsaref.h