Makefile 6.6 KB

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