Makefile revision 325335
1# 2# OpenSSL/crypto/sha/Makefile 3# 4 5DIR= sha 6TOP= ../.. 7CC= cc 8CPP= $(CC) -E 9INCLUDES= 10CFLAG=-g 11MAKEFILE= Makefile 12AR= ar r 13 14SHA1_ASM_OBJ= 15 16CFLAGS= $(INCLUDES) $(CFLAG) 17ASFLAGS= $(INCLUDES) $(ASFLAG) 18AFLAGS= $(ASFLAGS) 19 20GENERAL=Makefile 21TEST=shatest.c sha1test.c sha256t.c sha512t.c 22APPS= 23 24LIB=$(TOP)/libcrypto.a 25LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c sha256.c sha512.c 26LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o sha256.o sha512.o $(SHA1_ASM_OBJ) 27 28SRC= $(LIBSRC) 29 30EXHEADER= sha.h 31HEADER= sha_locl.h $(EXHEADER) 32 33ALL= $(GENERAL) $(SRC) $(HEADER) 34 35top: 36 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) 37 38all: lib 39 40lib: $(LIBOBJ) 41 $(AR) $(LIB) $(LIBOBJ) 42 $(RANLIB) $(LIB) || echo Never mind. 43 @touch lib 44 45sha1-586.s: asm/sha1-586.pl ../perlasm/x86asm.pl 46 $(PERL) asm/sha1-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ 47sha256-586.s: asm/sha256-586.pl ../perlasm/x86asm.pl 48 $(PERL) asm/sha256-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ 49sha512-586.s: asm/sha512-586.pl ../perlasm/x86asm.pl 50 $(PERL) asm/sha512-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ 51 52sha1-ia64.s: asm/sha1-ia64.pl 53 (cd asm; $(PERL) sha1-ia64.pl ../$@ $(CFLAGS)) 54sha256-ia64.s: asm/sha512-ia64.pl 55 (cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS)) 56sha512-ia64.s: asm/sha512-ia64.pl 57 (cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS)) 58 59sha256-armv4.S: asm/sha256-armv4.pl 60 $(PERL) $< $(PERLASM_SCHEME) $@ 61 62sha1-alpha.s: asm/sha1-alpha.pl 63 (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \ 64 $(PERL) asm/sha1-alpha.pl > $$preproc && \ 65 $(CC) -E -P $$preproc > $@ && rm $$preproc) 66 67# Solaris make has to be explicitly told 68sha1-x86_64.s: asm/sha1-x86_64.pl; $(PERL) asm/sha1-x86_64.pl $(PERLASM_SCHEME) > $@ 69sha1-mb-x86_64.s: asm/sha1-mb-x86_64.pl; $(PERL) asm/sha1-mb-x86_64.pl $(PERLASM_SCHEME) > $@ 70sha256-x86_64.s:asm/sha512-x86_64.pl; $(PERL) asm/sha512-x86_64.pl $(PERLASM_SCHEME) $@ 71sha256-mb-x86_64.s: asm/sha256-mb-x86_64.pl; $(PERL) asm/sha256-mb-x86_64.pl $(PERLASM_SCHEME) > $@ 72sha512-x86_64.s:asm/sha512-x86_64.pl; $(PERL) asm/sha512-x86_64.pl $(PERLASM_SCHEME) $@ 73sha1-sparcv9.S: asm/sha1-sparcv9.pl; $(PERL) asm/sha1-sparcv9.pl $@ $(CFLAGS) 74sha256-sparcv9.S:asm/sha512-sparcv9.pl; $(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS) 75sha512-sparcv9.S:asm/sha512-sparcv9.pl; $(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS) 76 77sha1-ppc.s: asm/sha1-ppc.pl; $(PERL) asm/sha1-ppc.pl $(PERLASM_SCHEME) $@ 78sha256-ppc.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $(PERLASM_SCHEME) $@ 79sha512-ppc.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $(PERLASM_SCHEME) $@ 80sha256p8-ppc.s: asm/sha512p8-ppc.pl; $(PERL) asm/sha512p8-ppc.pl $(PERLASM_SCHEME) $@ 81sha512p8-ppc.s: asm/sha512p8-ppc.pl; $(PERL) asm/sha512p8-ppc.pl $(PERLASM_SCHEME) $@ 82 83sha1-parisc.s: asm/sha1-parisc.pl; $(PERL) asm/sha1-parisc.pl $(PERLASM_SCHEME) $@ 84sha256-parisc.s:asm/sha512-parisc.pl; $(PERL) asm/sha512-parisc.pl $(PERLASM_SCHEME) $@ 85sha512-parisc.s:asm/sha512-parisc.pl; $(PERL) asm/sha512-parisc.pl $(PERLASM_SCHEME) $@ 86 87sha1-mips.S: asm/sha1-mips.pl; $(PERL) asm/sha1-mips.pl $(PERLASM_SCHEME) $@ 88sha256-mips.S: asm/sha512-mips.pl; $(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@ 89sha512-mips.S: asm/sha512-mips.pl; $(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@ 90 91# GNU make "catch all" 92sha1-%.S: asm/sha1-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@ 93sha256-%.S: asm/sha512-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@ 94sha512-%.S: asm/sha512-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@ 95 96sha1-armv4-large.o: sha1-armv4-large.S 97sha256-armv4.o: sha256-armv4.S 98sha512-armv4.o: sha512-armv4.S 99sha1-armv8.o: sha1-armv8.S 100sha256-armv8.o: sha256-armv8.S 101sha512-armv8.o: sha512-armv8.S 102 103files: 104 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO 105 106links: 107 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) 108 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) 109 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) 110 111install: 112 @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... 113 @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ 114 do \ 115 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ 116 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ 117 done; 118 119tags: 120 ctags $(SRC) 121 122tests: 123 124lint: 125 lint -DLINT $(INCLUDES) $(SRC)>fluff 126 127update: depend 128 129depend: 130 @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile... 131 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) 132 133dclean: 134 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new 135 mv -f Makefile.new $(MAKEFILE) 136 137clean: 138 rm -f *.s *.S *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff 139 140# DO NOT DELETE THIS LINE -- make depend depends on it. 141 142sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 143sha1_one.o: ../../include/openssl/opensslconf.h 144sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 145sha1_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 146sha1_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 147sha1_one.o: sha1_one.c 148sha1dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 149sha1dgst.o: ../../include/openssl/opensslconf.h 150sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 151sha1dgst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 152sha1dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 153sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h 154sha256.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 155sha256.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 156sha256.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 157sha256.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 158sha256.o: ../../include/openssl/symhacks.h ../md32_common.h sha256.c 159sha512.o: ../../e_os.h ../../include/openssl/bio.h 160sha512.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 161sha512.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 162sha512.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 163sha512.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 164sha512.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 165sha512.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 166sha512.o: ../cryptlib.h sha512.c 167sha_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 168sha_dgst.o: ../../include/openssl/opensslconf.h 169sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 170sha_dgst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 171sha_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 172sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h 173sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 174sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 175sha_one.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 176sha_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 177sha_one.o: ../../include/openssl/symhacks.h sha_one.c 178