2 # OpenSSL/crypto/sha/Makefile
16 CFLAGS= $(INCLUDES) $(CFLAG)
17 ASFLAGS= $(INCLUDES) $(ASFLAG)
21 TEST=shatest.c sha1test.c sha256t.c sha512t.c
24 LIB=$(TOP)/libcrypto.a
25 LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c sha256.c sha512.c
26 LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o sha256.o sha512.o $(SHA1_ASM_OBJ)
31 HEADER= sha_locl.h $(EXHEADER)
33 ALL= $(GENERAL) $(SRC) $(HEADER)
36 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
41 $(AR) $(LIB) $(LIBOBJ)
42 $(RANLIB) $(LIB) || echo Never mind.
46 sx86-elf.s: asm/sha1-586.pl ../perlasm/x86asm.pl
47 (cd asm; $(PERL) sha1-586.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
48 sha256x86-elf.s: asm/sha256-586.pl ../perlasm/x86asm.pl
49 (cd asm; $(PERL) sha256-586.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
50 sha512x86-elf.s: asm/sha512-586.pl ../perlasm/x86asm.pl
51 (cd asm; $(PERL) sha512-586.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
53 sx86-cof.s: asm/sha1-586.pl ../perlasm/x86asm.pl
54 (cd asm; $(PERL) sha1-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
55 sha256x86-cof.s: asm/sha256-586.pl ../perlasm/x86asm.pl
56 (cd asm; $(PERL) sha256-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
57 sha512x86-cof.s: asm/sha512-586.pl ../perlasm/x86asm.pl
58 (cd asm; $(PERL) sha512-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
60 sx86-out.s: asm/sha1-586.pl ../perlasm/x86asm.pl
61 (cd asm; $(PERL) sha1-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
62 sha256x86-out.s: asm/sha256-586.pl ../perlasm/x86asm.pl
63 (cd asm; $(PERL) sha256-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
64 sha512x86-out.s: asm/sha512-586.pl ../perlasm/x86asm.pl
65 (cd asm; $(PERL) sha512-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
67 sx86-macosx.s: asm/sha1-586.pl ../perlasm/x86asm.pl
68 (cd asm; $(PERL) sha1-586.pl macosx $(CFLAGS) $(PROCESSOR) > ../$@)
69 sha256x86-macosx.s: asm/sha256-586.pl ../perlasm/x86asm.pl
70 (cd asm; $(PERL) sha256-586.pl macosx $(CFLAGS) $(PROCESSOR) > ../$@)
71 sha512x86-macosx.s: asm/sha512-586.pl ../perlasm/x86asm.pl
72 (cd asm; $(PERL) sha512-586.pl macosx $(CFLAGS) $(PROCESSOR) > ../$@)
74 sha1-ia64.s: asm/sha1-ia64.pl
75 (cd asm; $(PERL) sha1-ia64.pl $(CFLAGS) ) > $@
76 sha256-ia64.s: asm/sha512-ia64.pl
77 (cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS))
78 sha512-ia64.s: asm/sha512-ia64.pl
79 (cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS))
81 sha256-armv4.s: asm/sha256-armv4.pl
84 # Solaris make has to be explicitly told
85 sha1-x86_64.s: asm/sha1-x86_64.pl; $(PERL) asm/sha1-x86_64.pl $@
86 sha256-x86_64.s:asm/sha512-x86_64.pl; $(PERL) asm/sha512-x86_64.pl $@
87 sha512-x86_64.s:asm/sha512-x86_64.pl; $(PERL) asm/sha512-x86_64.pl $@
88 sha1-sparcv9.s: asm/sha1-sparcv9.pl; $(PERL) asm/sha1-sparcv9.pl $@ $(CFLAGS)
89 sha256-sparcv9.s:asm/sha512-sparcv9.pl; $(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS)
90 sha512-sparcv9.s:asm/sha512-sparcv9.pl; $(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS)
92 # AIX make has to be explicitly told
93 sha1-ppc_aix32.s: asm/sha1-ppc.pl; $(PERL) asm/sha1-ppc.pl $@
94 sha1-ppc_aix64.s: asm/sha1-ppc.pl; $(PERL) asm/sha1-ppc.pl $@
95 sha256-ppc_aix32.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $@
96 sha256-ppc_aix64.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $@
97 sha512-ppc_aix32.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $@
98 sha512-ppc_aix64.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $@
100 # non-AIX ppc targets are believed to be armed with GNU make
101 sha1-ppc_%.s: asm/sha1-ppc.pl; $(PERL) $< $@
102 sha256-ppc_%.s: asm/sha512-ppc.pl; $(PERL) $< $@
103 sha512-ppc_%.s: asm/sha512-ppc.pl; $(PERL) $< $@
104 # GNU make "catch all"
105 sha1-%.s: asm/sha1-%.pl; $(PERL) $< $@
106 sha256-%.s: asm/sha512-%.pl; $(PERL) $< $@
107 sha512-%.s: asm/sha512-%.pl; $(PERL) $< $@
110 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
113 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
114 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
115 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
118 @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
119 @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
121 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
122 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
131 lint -DLINT $(INCLUDES) $(SRC)>fluff
134 @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
135 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
138 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
139 mv -f Makefile.new $(MAKEFILE)
142 rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
144 # DO NOT DELETE THIS LINE -- make depend depends on it.
146 sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
147 sha1_one.o: ../../include/openssl/opensslconf.h
148 sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
149 sha1_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
150 sha1_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
151 sha1_one.o: sha1_one.c
152 sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
153 sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
154 sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h
155 sha256.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
156 sha256.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
157 sha256.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
158 sha256.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
159 sha256.o: ../../include/openssl/symhacks.h ../md32_common.h sha256.c
160 sha512.o: ../../e_os.h ../../include/openssl/bio.h
161 sha512.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
162 sha512.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
163 sha512.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
164 sha512.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
165 sha512.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
166 sha512.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
167 sha512.o: ../cryptlib.h sha512.c
168 sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
169 sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
170 sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h
171 sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
172 sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
173 sha_one.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
174 sha_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
175 sha_one.o: ../../include/openssl/symhacks.h sha_one.c