580d6df7771788a2ec0224a676b4cd0a5b598619
[openssl.git] / fips / rand / Makefile
1 #
2 # OpenSSL/fips/rand/Makefile
3 #
4
5 DIR=    rand
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_randtest.c fips_rngvs.c
22 APPS=
23
24 LIB=$(TOP)/libcrypto.a
25 LIBSRC= fips_rand.c fips_rand_selftest.c \
26         fips_drbg_lib.c fips_drbg_hash.c fips_drbg_ctr.c
27 LIBOBJ= fips_rand.o fips_rand_selftest.o \
28         fips_drbg_lib.o fips_drbg_hash.o fips_drbg_ctr.o
29
30 SRC= $(LIBSRC)
31
32 EXHEADER= fips_rand.h
33 HEADER= $(EXHEADER) fips_rand_lcl.h
34
35 ALL=    $(GENERAL) $(SRC) $(HEADER)
36
37 top:
38         (cd $(TOP); $(MAKE) DIRS=fips SDIRS=$(DIR) sub_all)
39
40 all:    lib
41
42 lib:    $(LIBOBJ)
43         @echo $(LIBOBJ) > lib
44
45 files:
46         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
47
48 links:
49         @$(PERL) $(TOP)/util/mklink.pl $(TOP)/include/openssl $(EXHEADER)
50         @$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TEST)
51         @$(PERL) $(TOP)/util/mklink.pl $(TOP)/apps $(APPS)
52
53 install:
54         @headerlist="$(EXHEADER)"; for i in $$headerlist; \
55         do \
56           (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
57           chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
58         done
59
60 tags:
61         ctags $(SRC)
62
63 tests:
64
65 Q=../testvectors/rng/req
66 A=../testvectors/rng/rsp
67
68 fips_test:
69         -rm -rf $(A)
70         mkdir $(A)
71         if [ -f $(Q)/ANSI931_AES128MCT.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rngvs mct < $(Q)/ANSI931_AES128MCT.req > $(A)/ANSI931_AES128MCT.rsp; fi
72         if [ -f $(Q)/ANSI931_AES192MCT.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rngvs mct < $(Q)/ANSI931_AES192MCT.req > $(A)/ANSI931_AES192MCT.rsp; fi
73         if [ -f $(Q)/ANSI931_AES256MCT.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rngvs mct < $(Q)/ANSI931_AES256MCT.req > $(A)/ANSI931_AES256MCT.rsp; fi
74         if [ -f $(Q)/ANSI931_AES128VST.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rngvs vst < $(Q)/ANSI931_AES128VST.req > $(A)/ANSI931_AES128VST.rsp; fi
75         if [ -f $(Q)/ANSI931_AES192VST.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rngvs vst < $(Q)/ANSI931_AES192VST.req > $(A)/ANSI931_AES192VST.rsp; fi
76         if [ -f $(Q)/ANSI931_AES256VST.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rngvs vst < $(Q)/ANSI931_AES256VST.req > $(A)/ANSI931_AES256VST.rsp; fi
77
78 lint:
79         lint -DLINT $(INCLUDES) $(SRC)>fluff
80
81 depend:
82         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(SRC) $(TEST)
83
84 dclean:
85         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
86         mv -f Makefile.new $(MAKEFILE)
87
88 clean:
89         rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
90
91 # DO NOT DELETE THIS LINE -- make depend depends on it.
92
93 fips_rand.o: ../../e_os.h ../../include/openssl/aes.h
94 fips_rand.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
95 fips_rand.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
96 fips_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
97 fips_rand.o: ../../include/openssl/fips.h ../../include/openssl/fips_rand.h
98 fips_rand.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
99 fips_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
100 fips_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
101 fips_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
102 fips_rand.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
103 fips_rand.o: ../fips_locl.h fips_rand.c
104 fips_rand_selftest.o: ../../include/openssl/bio.h
105 fips_rand_selftest.o: ../../include/openssl/crypto.h
106 fips_rand_selftest.o: ../../include/openssl/des.h
107 fips_rand_selftest.o: ../../include/openssl/des_old.h
108 fips_rand_selftest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
109 fips_rand_selftest.o: ../../include/openssl/fips.h
110 fips_rand_selftest.o: ../../include/openssl/fips_rand.h
111 fips_rand_selftest.o: ../../include/openssl/lhash.h
112 fips_rand_selftest.o: ../../include/openssl/opensslconf.h
113 fips_rand_selftest.o: ../../include/openssl/opensslv.h
114 fips_rand_selftest.o: ../../include/openssl/ossl_typ.h
115 fips_rand_selftest.o: ../../include/openssl/rand.h
116 fips_rand_selftest.o: ../../include/openssl/safestack.h
117 fips_rand_selftest.o: ../../include/openssl/stack.h
118 fips_rand_selftest.o: ../../include/openssl/symhacks.h
119 fips_rand_selftest.o: ../../include/openssl/ui.h
120 fips_rand_selftest.o: ../../include/openssl/ui_compat.h fips_rand_selftest.c
121 fips_randtest.o: ../../e_os.h ../../include/openssl/bio.h
122 fips_randtest.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
123 fips_randtest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
124 fips_randtest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
125 fips_randtest.o: ../../include/openssl/fips.h ../../include/openssl/fips_rand.h
126 fips_randtest.o: ../../include/openssl/lhash.h
127 fips_randtest.o: ../../include/openssl/opensslconf.h
128 fips_randtest.o: ../../include/openssl/opensslv.h
129 fips_randtest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
130 fips_randtest.o: ../../include/openssl/safestack.h
131 fips_randtest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
132 fips_randtest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
133 fips_randtest.o: ../fips_utl.h fips_randtest.c
134 fips_rngvs.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
135 fips_rngvs.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
136 fips_rngvs.o: ../../include/openssl/des_old.h ../../include/openssl/dsa.h
137 fips_rngvs.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
138 fips_rngvs.o: ../../include/openssl/fips.h ../../include/openssl/fips_rand.h
139 fips_rngvs.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
140 fips_rngvs.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
141 fips_rngvs.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
142 fips_rngvs.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
143 fips_rngvs.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
144 fips_rngvs.o: ../fips_utl.h fips_rngvs.c