Tidy up an error code.
[oweals/openssl.git] / fips / hmac / Makefile
1 #
2 # SSLeay/fips/hmac/Makefile
3 #
4
5 DIR=    hmac
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_hmactest.c
22 APPS=
23
24 LIB=$(TOP)/libcrypto.a
25 LIBSRC=fips_hmac.c fips_hmac_selftest.c
26 LIBOBJ=fips_hmac.o fips_hmac_selftest.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         $(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_hmactest:
66         (cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) TARGET=fips_hmactest sub_target)
67
68 fips_hmactest: fips_hmactest.o $(TOP)/libcrypto.a
69         $(CC) $(CFLAGS) -o fips_hmactest fips_hmactest.o $(PEX_LIBS) $(TOP)/libcrypto.a $(EX_LIBS)
70         TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a fips_hmactest
71
72 Q=../testvectors/hmac/req
73 A=../testvectors/hmac/rsp
74
75 fips_test: top top_fips_hmactest
76         -rm -rf $(A)
77         mkdir $(A)
78         ./fips_hmactest < $(Q)/HMAC.req > $(A)/HMAC.rsp
79
80 lint:
81         lint -DLINT $(INCLUDES) $(SRC)>fluff
82
83 depend:
84         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(SRC) $(TEST)
85
86 dclean:
87         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
88         mv -f Makefile.new $(MAKEFILE)
89
90 clean:
91         rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
92 # DO NOT DELETE THIS LINE -- make depend depends on it.
93
94 fips_hmac.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
95 fips_hmac.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
96 fips_hmac.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
97 fips_hmac.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
98 fips_hmac.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
99 fips_hmac.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
100 fips_hmac.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h
101 fips_hmac.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
102 fips_hmac.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
103 fips_hmac.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
104 fips_hmac.o: ../../include/openssl/objects.h
105 fips_hmac.o: ../../include/openssl/opensslconf.h
106 fips_hmac.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
107 fips_hmac.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
108 fips_hmac.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
109 fips_hmac.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
110 fips_hmac.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
111 fips_hmac.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
112 fips_hmac.o: ../../include/openssl/ui_compat.h fips_hmac.c