118316Swollman#
218316Swollman# OpenSSL/crypto/sha/Makefile
318316Swollman#
418316Swollman
518316SwollmanDIR=    sha
618316SwollmanTOP=    ../..
718316SwollmanCC=     cc
818316SwollmanCPP=    $(CC) -E
918316SwollmanINCLUDES=
1018316SwollmanCFLAG=-g
1118316SwollmanMAKEFILE=       Makefile
1218316SwollmanAR=             ar r
1318316Swollman
1418316SwollmanSHA1_ASM_OBJ=
1518316Swollman
1618316SwollmanCFLAGS= $(INCLUDES) $(CFLAG)
1718316SwollmanASFLAGS= $(INCLUDES) $(ASFLAG)
1818316SwollmanAFLAGS= $(ASFLAGS)
1918316Swollman
2018316SwollmanGENERAL=Makefile
2118316SwollmanTEST=shatest.c sha1test.c sha256t.c sha512t.c
2218316SwollmanAPPS=
2318316Swollman
2418316SwollmanLIB=$(TOP)/libcrypto.a
2518316SwollmanLIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c sha256.c sha512.c
2618316SwollmanLIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o sha256.o sha512.o $(SHA1_ASM_OBJ)
2718316Swollman
2818316SwollmanSRC= $(LIBSRC)
2918316Swollman
3046303SmarkmEXHEADER= sha.h
3150476SpeterHEADER= sha_locl.h $(EXHEADER)
3218316Swollman
3318316SwollmanALL=    $(GENERAL) $(SRC) $(HEADER)
3418316Swollman
3518316Swollmantop:
3618316Swollman	(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
3718316Swollman
3818316Swollmanall:    lib
3918316Swollman
4018316Swollmanlib:    $(LIBOBJ)
4118316Swollman	$(AR) $(LIB) $(LIBOBJ)
4218316Swollman	$(RANLIB) $(LIB) || echo Never mind.
4318316Swollman	@touch lib
4418316Swollman
4518316Swollmansha1-586.s:	asm/sha1-586.pl ../perlasm/x86asm.pl
4618316Swollman	$(PERL) asm/sha1-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
4718316Swollmansha256-586.s:	asm/sha256-586.pl ../perlasm/x86asm.pl
4818316Swollman	$(PERL) asm/sha256-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
4918316Swollmansha512-586.s:	asm/sha512-586.pl ../perlasm/x86asm.pl
5018316Swollman	$(PERL) asm/sha512-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
5118316Swollman
5218316Swollmansha1-ia64.s:   asm/sha1-ia64.pl
5318316Swollman	(cd asm; $(PERL) sha1-ia64.pl ../$@ $(CFLAGS))
5418316Swollmansha256-ia64.s: asm/sha512-ia64.pl
5518316Swollman	(cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS))
5618316Swollmansha512-ia64.s: asm/sha512-ia64.pl
5718316Swollman	(cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS))
5818316Swollman
5918316Swollmansha256-armv4.S: asm/sha256-armv4.pl
6018316Swollman	$(PERL) $< $(PERLASM_SCHEME) $@
6118316Swollman
6218316Swollmansha1-alpha.s:	asm/sha1-alpha.pl
6318316Swollman	(preproc=/tmp/$$$$.$@; trap "rm $$preproc" INT; \
6418316Swollman	$(PERL) asm/sha1-alpha.pl > $$preproc && \
6518316Swollman	$(CC) -E $$preproc > $@ && rm $$preproc)
6618316Swollman
6718316Swollman# Solaris make has to be explicitly told
6818316Swollmansha1-x86_64.s:	asm/sha1-x86_64.pl;	$(PERL) asm/sha1-x86_64.pl $(PERLASM_SCHEME) > $@
6918316Swollmansha256-x86_64.s:asm/sha512-x86_64.pl;	$(PERL) asm/sha512-x86_64.pl $(PERLASM_SCHEME) $@
7018316Swollmansha512-x86_64.s:asm/sha512-x86_64.pl;	$(PERL) asm/sha512-x86_64.pl $(PERLASM_SCHEME) $@
7118316Swollmansha1-sparcv9.s:	asm/sha1-sparcv9.pl;	$(PERL) asm/sha1-sparcv9.pl $@ $(CFLAGS)
7218316Swollmansha256-sparcv9.s:asm/sha512-sparcv9.pl;	$(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS)
7318316Swollmansha512-sparcv9.s:asm/sha512-sparcv9.pl;	$(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS)
7418316Swollman
7518316Swollmansha1-ppc.s:	asm/sha1-ppc.pl;	$(PERL) asm/sha1-ppc.pl $(PERLASM_SCHEME) $@
7618316Swollmansha256-ppc.s:	asm/sha512-ppc.pl;	$(PERL) asm/sha512-ppc.pl $(PERLASM_SCHEME) $@
7718316Swollmansha512-ppc.s:	asm/sha512-ppc.pl;	$(PERL) asm/sha512-ppc.pl $(PERLASM_SCHEME) $@
7818316Swollman
7918316Swollmansha1-parisc.s:	asm/sha1-parisc.pl;	$(PERL) asm/sha1-parisc.pl $(PERLASM_SCHEME) $@
8018316Swollmansha256-parisc.s:asm/sha512-parisc.pl;	$(PERL) asm/sha512-parisc.pl $(PERLASM_SCHEME) $@
8118316Swollmansha512-parisc.s:asm/sha512-parisc.pl;	$(PERL) asm/sha512-parisc.pl $(PERLASM_SCHEME) $@
8218316Swollman
83190715Sphksha1-mips.S:	asm/sha1-mips.pl;	$(PERL) asm/sha1-mips.pl $(PERLASM_SCHEME) $@
8418316Swollmansha256-mips.S:	asm/sha512-mips.pl;	$(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@
8518316Swollmansha512-mips.S:	asm/sha512-mips.pl;	$(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@
8618316Swollman
8718316Swollman# GNU make "catch all"
8818316Swollmansha1-%.S:	asm/sha1-%.pl;		$(PERL) $< $(PERLASM_SCHEME) $@
8918316Swollmansha256-%.S:	asm/sha512-%.pl;	$(PERL) $< $(PERLASM_SCHEME) $@
9018316Swollmansha512-%.S:	asm/sha512-%.pl;	$(PERL) $< $(PERLASM_SCHEME) $@
9118316Swollman
9218316Swollmansha1-armv4-large.o:	sha1-armv4-large.S
93190715Sphksha256-armv4.o:		sha256-armv4.S
9418316Swollmansha512-armv4.o:		sha512-armv4.S
9518316Swollman
9618316Swollmanfiles:
9718316Swollman	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
9818316Swollman
9918316Swollmanlinks:
10018316Swollman	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
10118316Swollman	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
10218316Swollman	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
10346303Smarkm
10418316Swollmaninstall:
10518316Swollman	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
10618316Swollman	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
10718316Swollman	do  \
10818316Swollman	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
10918316Swollman	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
11018316Swollman	done;
11118316Swollman
11292883Simptags:
11392883Simp	ctags $(SRC)
11418316Swollman
11592883Simptests:
11692883Simp
11718316Swollmanlint:
11892883Simp	lint -DLINT $(INCLUDES) $(SRC)>fluff
11918316Swollman
12092883Simpupdate: depend
12118316Swollman
12292883Simpdepend:
12318316Swollman	@[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
12492883Simp	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
12518316Swollman
12692883Simpdclean:
12718316Swollman	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
12818316Swollman	mv -f Makefile.new $(MAKEFILE)
12918316Swollman
13018316Swollmanclean:
13118316Swollman	rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
13218316Swollman
13318316Swollman# DO NOT DELETE THIS LINE -- make depend depends on it.
13418316Swollman
13546303Smarkmsha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
13646303Smarkmsha1_one.o: ../../include/openssl/opensslconf.h
13746303Smarkmsha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
13818316Swollmansha1_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
13992883Simpsha1_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
140190712Sphksha1_one.o: sha1_one.c
14192883Simpsha1dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
14292883Simpsha1dgst.o: ../../include/openssl/opensslconf.h
14392883Simpsha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
14446303Smarkmsha1dgst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
14518316Swollmansha1dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
146sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h
147sha256.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
148sha256.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
149sha256.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
150sha256.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
151sha256.o: ../../include/openssl/symhacks.h ../md32_common.h sha256.c
152sha512.o: ../../e_os.h ../../include/openssl/bio.h
153sha512.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
154sha512.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
155sha512.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
156sha512.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
157sha512.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
158sha512.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
159sha512.o: ../cryptlib.h sha512.c
160sha_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
161sha_dgst.o: ../../include/openssl/opensslconf.h
162sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
163sha_dgst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
164sha_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
165sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h
166sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
167sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
168sha_one.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
169sha_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
170sha_one.o: ../../include/openssl/symhacks.h sha_one.c
171