Tidy up an error code.
[oweals/openssl.git] / fips / rand / Makefile
1 #
2 # SSLeay/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
22 APPS=
23
24 LIB=$(TOP)/libcrypto.a
25 LIBSRC=fips_rand.c fips_rand_selftest.c
26 LIBOBJ=fips_rand.o fips_rand_selftest.o
27
28 SRC= $(LIBSRC)
29
30 EXHEADER= fips_rand.h
31 HEADER= $(EXHEADER)
32
33 ALL=    $(GENERAL) $(SRC) $(HEADER)
34
35 top:
36         (cd $(TOP); $(MAKE) DIRS=fips SDIRS=$(DIR) sub_all)
37
38 all:    lib
39
40 lib:    $(LIBOBJ)
41         $(AR) $(LIB) $(LIBOBJ)
42         $(RANLIB) $(LIB) || echo Never mind.
43         @sleep 2; touch 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 top_fips_rngvs:
66         (cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) TARGET=fips_rngvs sub_target)
67
68 fips_rngvs: fips_rngvs.o $(TOP)/libcrypto.a
69         $(CC) $(CFLAGS) -o fips_rngvs fips_rngvs.o $(PEX_LIBS) $(TOP)/libcrypto.a $(EX_LIBS)
70         TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a fips_rngvs
71
72 Q=../testvectors/rng/req
73 A=../testvectors/rng/rsp
74
75 fips_test: top_fips_rngvs
76         -rm -rf $(A)
77         mkdir $(A)
78         ./fips_rngvs mct < $(Q)/MCT.req > $(A)/MCT.rsp
79         ./fips_rngvs vst < $(Q)/VST.req > $(A)/VST.rsp
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
94 # DO NOT DELETE THIS LINE -- make depend depends on it.
95
96 fips_rand.o: ../../e_os.h ../../include/openssl/bio.h
97 fips_rand.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
98 fips_rand.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
99 fips_rand.o: ../../include/openssl/err.h ../../include/openssl/fips_rand.h
100 fips_rand.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
101 fips_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
102 fips_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
103 fips_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
104 fips_rand.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
105 fips_rand.o: fips_rand.c
106 fips_randtest.o: ../../e_os.h ../../include/openssl/bio.h
107 fips_randtest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
108 fips_randtest.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
109 fips_randtest.o: ../../include/openssl/err.h ../../include/openssl/fips_rand.h
110 fips_randtest.o: ../../include/openssl/lhash.h
111 fips_randtest.o: ../../include/openssl/opensslconf.h
112 fips_randtest.o: ../../include/openssl/opensslv.h
113 fips_randtest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
114 fips_randtest.o: ../../include/openssl/safestack.h
115 fips_randtest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
116 fips_randtest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
117 fips_randtest.o: fips_randtest.c