Workaround for some CMS signature formats.
[openssl.git] / fips / sha / Makefile
1 #
2 # OpenSSL/fips/sha/Makefile
3 #
4
5 DIR=    sha
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 EXE_EXT=
18
19 ASFLAGS= $(INCLUDES) $(ASFLAG)
20 AFLAGS= $(ASFLAGS)
21
22 CFLAGS= $(INCLUDES) $(CFLAG)
23
24 GENERAL=Makefile
25 TEST= fips_shatest.c
26 APPS=
27 EXE= fips_standalone_sha1$(EXE_EXT)
28
29 LIB=$(TOP)/libcrypto.a
30 LIBSRC=fips_sha1_selftest.c
31 LIBOBJ=fips_sha1_selftest.o
32
33 SRC= $(LIBSRC)
34 PROGS= fips_standalone_sha1.c
35
36 EXHEADER=
37 HEADER= 
38
39 ALL=    $(GENERAL) $(SRC) $(HEADER)
40
41 top:
42         (cd $(TOP); $(MAKE) DIRS=fips SDIRS=$(DIR) sub_all)
43
44 all:    ../fips_standalone_sha1$(EXE_EXT) lib
45
46 lib:    $(LIBOBJ)
47         @echo $(LIBOBJ) > lib
48
49 ../fips_standalone_sha1$(EXE_EXT): fips_standalone_sha1.o
50         if [ -z "$(HOSTCC)" ] ; then \
51         FIPS_SHA_ASM=""; for i in $(SHA1_ASM_OBJ) sha1dgst.o ; do FIPS_SHA_ASM="$$FIPS_SHA_ASM ../../crypto/sha/$$i" ; done; \
52         $(CC) -o $@ $(CFLAGS) fips_standalone_sha1.o $$FIPS_SHA_ASM ; \
53         else \
54                 $(HOSTCC) $(HOSTCFLAGS) -o $ $@ -I../../include -I../../crypto fips_standalone_sha1.c ../../crypto/sha/sha1dgst.c ; \
55         fi
56
57 files:
58         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
59
60 links:
61         @$(PERL) $(TOP)/util/mklink.pl $(TOP)/include/openssl $(EXHEADER)
62         @$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TEST)
63         @$(PERL) $(TOP)/util/mklink.pl $(TOP)/apps $(APPS)
64
65 install:
66         @headerlist="$(EXHEADER)"; for i in $$headerlist; \
67         do  \
68           (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
69           chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
70         done
71
72 tags:
73         ctags $(SRC)
74
75 tests:
76
77 Q=../testvectors/sha/req
78 A=../testvectors/sha/rsp
79
80 VECTORS = SHA1LongMsg \
81         SHA1Monte \
82         SHA1ShortMsg \
83         SHA224LongMsg \
84         SHA224Monte \
85         SHA224ShortMsg \
86         SHA256LongMsg \
87         SHA256Monte \
88         SHA256ShortMsg \
89         SHA384LongMsg \
90         SHA384Monte \
91         SHA384ShortMsg \
92         SHA512LongMsg \
93         SHA512Monte \
94         SHA512ShortMsg
95
96 fips_test:
97         -rm -rf $(A)
98         mkdir $(A)
99         for file in $(VECTORS); do \
100             if [ -f $(Q)/$$file.req ]; then \
101                 $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_shatest $(Q)/$$file.req $(A)/$$file.rsp; \
102             fi; \
103         done
104
105 lint:
106         lint -DLINT $(INCLUDES) $(SRC)>fluff
107
108 depend:
109         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(SRC) $(TEST)
110
111 dclean:
112         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
113         mv -f Makefile.new $(MAKEFILE)
114
115 clean:
116         rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE)
117
118 # DO NOT DELETE THIS LINE -- make depend depends on it.
119
120 fips_sha1_selftest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
121 fips_sha1_selftest.o: ../../include/openssl/crypto.h
122 fips_sha1_selftest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
123 fips_sha1_selftest.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
124 fips_sha1_selftest.o: ../../include/openssl/lhash.h
125 fips_sha1_selftest.o: ../../include/openssl/obj_mac.h
126 fips_sha1_selftest.o: ../../include/openssl/objects.h
127 fips_sha1_selftest.o: ../../include/openssl/opensslconf.h
128 fips_sha1_selftest.o: ../../include/openssl/opensslv.h
129 fips_sha1_selftest.o: ../../include/openssl/ossl_typ.h
130 fips_sha1_selftest.o: ../../include/openssl/safestack.h
131 fips_sha1_selftest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
132 fips_sha1_selftest.o: ../../include/openssl/symhacks.h fips_sha1_selftest.c
133 fips_shatest.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
134 fips_shatest.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
135 fips_shatest.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
136 fips_shatest.o: ../../include/openssl/ec.h ../../include/openssl/err.h
137 fips_shatest.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
138 fips_shatest.o: ../../include/openssl/fips_rand.h ../../include/openssl/hmac.h
139 fips_shatest.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
140 fips_shatest.o: ../../include/openssl/objects.h
141 fips_shatest.o: ../../include/openssl/opensslconf.h
142 fips_shatest.o: ../../include/openssl/opensslv.h
143 fips_shatest.o: ../../include/openssl/ossl_typ.h
144 fips_shatest.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
145 fips_shatest.o: ../../include/openssl/symhacks.h ../fips_utl.h fips_shatest.c
146 fips_standalone_sha1.o: ../../include/openssl/asn1.h
147 fips_standalone_sha1.o: ../../include/openssl/bio.h
148 fips_standalone_sha1.o: ../../include/openssl/crypto.h
149 fips_standalone_sha1.o: ../../include/openssl/e_os2.h
150 fips_standalone_sha1.o: ../../include/openssl/evp.h
151 fips_standalone_sha1.o: ../../include/openssl/fips.h
152 fips_standalone_sha1.o: ../../include/openssl/hmac.h
153 fips_standalone_sha1.o: ../../include/openssl/obj_mac.h
154 fips_standalone_sha1.o: ../../include/openssl/objects.h
155 fips_standalone_sha1.o: ../../include/openssl/opensslconf.h
156 fips_standalone_sha1.o: ../../include/openssl/opensslv.h
157 fips_standalone_sha1.o: ../../include/openssl/ossl_typ.h
158 fips_standalone_sha1.o: ../../include/openssl/safestack.h
159 fips_standalone_sha1.o: ../../include/openssl/sha.h
160 fips_standalone_sha1.o: ../../include/openssl/stack.h
161 fips_standalone_sha1.o: ../../include/openssl/symhacks.h fips_standalone_sha1.c