Add fips_algvs utility (from FIPS 2.0 stable branch).
[openssl.git] / fips / rsa / Makefile
1 #
2 # OpenSSL/fips/rsa/Makefile
3 #
4
5 DIR=    rsa
6 TOP=    ../..
7 CC=     cc
8 INCLUDES=
9 CFLAG=-g
10 INSTALL_PREFIX=
11 OPENSSLDIR=     /usr/local/ssl
12 INSTALLTOP=/usr/local/ssl
13 MAKEDEPPROG=    makedepend
14 MAKEDEPEND=     $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
15 MAKEFILE=       Makefile
16 AR=             ar r
17
18 CFLAGS= $(INCLUDES) $(CFLAG)
19
20 GENERAL=Makefile
21 TEST= fips_rsavtest.c fips_rsastest.c fips_rsagtest.c
22 APPS=
23
24 LIB=$(TOP)/libcrypto.a
25 LIBSRC= fips_rsa_selftest.c fips_rsa_sign.c fips_rsa_lib.c
26 LIBOBJ= fips_rsa_selftest.o fips_rsa_sign.o fips_rsa_lib.o
27
28 SRC= $(LIBSRC)
29
30 EXHEADER=
31 HEADER= $(EXHEADER)
32
33 ALL=    $(GENERAL) $(SRC) $(HEADER)
34
35 top:
36         (cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) sub_all)
37
38 all:    lib
39
40 lib:    $(LIBOBJ)
41         @echo $(LIBOBJ) > lib
42
43 files:
44         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
45
46 links:
47         @$(PERL) $(TOP)/util/mklink.pl $(TOP)/include/openssl $(EXHEADER)
48         @$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TEST)
49         @$(PERL) $(TOP)/util/mklink.pl $(TOP)/apps $(APPS)
50
51 install:
52         @headerlist="$(EXHEADER)"; for i in $$headerlist; \
53         do \
54           (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
55           chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
56         done
57
58 tags:
59         ctags $(SRC)
60
61 tests:
62
63 Q=../testvectors/rsa/req
64 A=../testvectors/rsa/rsp
65 Q62=../testvectors/rsa_salt_62/req
66 A62=../testvectors/rsa_salt_62/rsp
67
68 fips_test:
69         -rm -rf $(A) $(A62)
70         mkdir $(A) $(A62)
71         if [ -f $(Q)/SigGen15.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsastest < $(Q)/SigGen15.req  > $(A)/SigGen15.rsp; fi
72         if [ -f $(Q)/SigVer15.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsavtest < $(Q)/SigVer15.req > $(A)/SigVer15.rsp; fi
73         if [ -f $(Q)/SigGenPSS.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsastest -saltlen 0 < $(Q)/SigGenPSS.req > $(A)/SigGenPSS.rsp; fi
74         if [ -f $(Q)/SigVerPSS.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsavtest -saltlen 0 < $(Q)/SigVerPSS.req > $(A)/SigVerPSS.rsp; fi
75         if [ -f $(Q)/SigGenRSA.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsastest -x931 < $(Q)/SigGenRSA.req > $(A)/SigGenRSA.rsp; fi
76         if [ -f $(Q)/SigVerRSA.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsavtest -x931 < $(Q)/SigVerRSA.req > $(A)/SigVerRSA.rsp; fi
77         if [ -f $(Q62)/SigGenPSS.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsastest -saltlen 62 < $(Q62)/SigGenPSS.req >$(A62)/SigGenPSS.rsp; fi
78         if [ -f $(Q62)/SigVerPSS.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsavtest -saltlen 62 <$(Q62)/SigVerPSS.req >$(A62)/SigVerPSS.rsp; fi
79         if [ -f $(Q)/KeyGenRSA.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsagtest < $(Q)/KeyGenRSA.req > $(A)/KeyGenRSA.rsp; fi
80
81 lint:
82         lint -DLINT $(INCLUDES) $(SRC)>fluff
83
84 depend:
85         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(SRC) $(TEST)
86
87 dclean:
88         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
89         mv -f Makefile.new $(MAKEFILE)
90
91 clean:
92         rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
93 # DO NOT DELETE THIS LINE -- make depend depends on it.
94
95 fips_rsa_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
96 fips_rsa_lib.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
97 fips_rsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
98 fips_rsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
99 fips_rsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
100 fips_rsa_lib.o: ../../include/openssl/objects.h
101 fips_rsa_lib.o: ../../include/openssl/opensslconf.h
102 fips_rsa_lib.o: ../../include/openssl/opensslv.h
103 fips_rsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h
104 fips_rsa_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
105 fips_rsa_lib.o: ../../include/openssl/symhacks.h fips_rsa_lib.c
106 fips_rsa_selftest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
107 fips_rsa_selftest.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
108 fips_rsa_selftest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
109 fips_rsa_selftest.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
110 fips_rsa_selftest.o: ../../include/openssl/lhash.h
111 fips_rsa_selftest.o: ../../include/openssl/obj_mac.h
112 fips_rsa_selftest.o: ../../include/openssl/objects.h
113 fips_rsa_selftest.o: ../../include/openssl/opensslconf.h
114 fips_rsa_selftest.o: ../../include/openssl/opensslv.h
115 fips_rsa_selftest.o: ../../include/openssl/ossl_typ.h
116 fips_rsa_selftest.o: ../../include/openssl/rsa.h
117 fips_rsa_selftest.o: ../../include/openssl/safestack.h
118 fips_rsa_selftest.o: ../../include/openssl/stack.h
119 fips_rsa_selftest.o: ../../include/openssl/symhacks.h ../fips_locl.h
120 fips_rsa_selftest.o: fips_rsa_selftest.c
121 fips_rsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
122 fips_rsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
123 fips_rsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h
124 fips_rsa_sign.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
125 fips_rsa_sign.o: ../../include/openssl/obj_mac.h
126 fips_rsa_sign.o: ../../include/openssl/objects.h
127 fips_rsa_sign.o: ../../include/openssl/opensslconf.h
128 fips_rsa_sign.o: ../../include/openssl/opensslv.h
129 fips_rsa_sign.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h
130 fips_rsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
131 fips_rsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
132 fips_rsa_sign.o: fips_rsa_sign.c
133 fips_rsagtest.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
134 fips_rsagtest.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
135 fips_rsagtest.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
136 fips_rsagtest.o: ../../include/openssl/ec.h ../../include/openssl/err.h
137 fips_rsagtest.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
138 fips_rsagtest.o: ../../include/openssl/fips_rand.h ../../include/openssl/hmac.h
139 fips_rsagtest.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
140 fips_rsagtest.o: ../../include/openssl/objects.h
141 fips_rsagtest.o: ../../include/openssl/opensslconf.h
142 fips_rsagtest.o: ../../include/openssl/opensslv.h
143 fips_rsagtest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h
144 fips_rsagtest.o: ../../include/openssl/safestack.h
145 fips_rsagtest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
146 fips_rsagtest.o: ../fips_utl.h fips_rsagtest.c
147 fips_rsastest.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
148 fips_rsastest.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
149 fips_rsastest.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
150 fips_rsastest.o: ../../include/openssl/ec.h ../../include/openssl/err.h
151 fips_rsastest.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
152 fips_rsastest.o: ../../include/openssl/fips_rand.h ../../include/openssl/hmac.h
153 fips_rsastest.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
154 fips_rsastest.o: ../../include/openssl/objects.h
155 fips_rsastest.o: ../../include/openssl/opensslconf.h
156 fips_rsastest.o: ../../include/openssl/opensslv.h
157 fips_rsastest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h
158 fips_rsastest.o: ../../include/openssl/safestack.h
159 fips_rsastest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
160 fips_rsastest.o: ../fips_utl.h fips_rsastest.c
161 fips_rsavtest.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
162 fips_rsavtest.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
163 fips_rsavtest.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
164 fips_rsavtest.o: ../../include/openssl/ec.h ../../include/openssl/err.h
165 fips_rsavtest.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
166 fips_rsavtest.o: ../../include/openssl/fips_rand.h ../../include/openssl/hmac.h
167 fips_rsavtest.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
168 fips_rsavtest.o: ../../include/openssl/objects.h
169 fips_rsavtest.o: ../../include/openssl/opensslconf.h
170 fips_rsavtest.o: ../../include/openssl/opensslv.h
171 fips_rsavtest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h
172 fips_rsavtest.o: ../../include/openssl/safestack.h
173 fips_rsavtest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
174 fips_rsavtest.o: ../fips_utl.h fips_rsavtest.c