Makefile 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. sha1-parisc.s: asm/sha1-parisc.pl; $(PERL) asm/sha1-parisc.pl $(PERLASM_SCHEME) $@
  60. sha256-parisc.s:asm/sha512-parisc.pl; $(PERL) asm/sha512-parisc.pl $(PERLASM_SCHEME) $@
  61. sha512-parisc.s:asm/sha512-parisc.pl; $(PERL) asm/sha512-parisc.pl $(PERLASM_SCHEME) $@
  62. sha1-mips.s: asm/sha1-mips.pl; $(PERL) asm/sha1-mips.pl $(PERLASM_SCHEME) $@
  63. sha256-mips.s: asm/sha512-mips.pl; $(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@
  64. sha512-mips.s: asm/sha512-mips.pl; $(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@
  65. # GNU make "catch all"
  66. sha1-%.S: asm/sha1-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
  67. sha256-%.S: asm/sha512-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
  68. sha512-%.S: asm/sha512-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
  69. sha1-armv4-large.o: sha1-armv4-large.S
  70. sha256-armv4.o: sha256-armv4.S
  71. sha512-armv4.o: sha512-armv4.S
  72. files:
  73. $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
  74. links:
  75. @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
  76. @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
  77. @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
  78. install:
  79. @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
  80. @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
  81. do \
  82. (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
  83. chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
  84. done;
  85. tags:
  86. ctags $(SRC)
  87. tests:
  88. lint:
  89. lint -DLINT $(INCLUDES) $(SRC)>fluff
  90. depend:
  91. @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
  92. $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
  93. dclean:
  94. $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
  95. mv -f Makefile.new $(MAKEFILE)
  96. clean:
  97. rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
  98. # DO NOT DELETE THIS LINE -- make depend depends on it.
  99. sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
  100. sha1_one.o: ../../include/openssl/opensslconf.h
  101. sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
  102. sha1_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
  103. sha1_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
  104. sha1_one.o: sha1_one.c
  105. sha1dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
  106. sha1dgst.o: ../../include/openssl/opensslconf.h
  107. sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
  108. sha1dgst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
  109. sha1dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
  110. sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h
  111. sha256.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
  112. sha256.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
  113. sha256.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
  114. sha256.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
  115. sha256.o: ../../include/openssl/symhacks.h ../md32_common.h sha256.c
  116. sha512.o: ../../e_os.h ../../include/openssl/bio.h
  117. sha512.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
  118. sha512.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
  119. sha512.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
  120. sha512.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
  121. sha512.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
  122. sha512.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
  123. sha512.o: ../cryptlib.h sha512.c
  124. sha_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
  125. sha_dgst.o: ../../include/openssl/opensslconf.h
  126. sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
  127. sha_dgst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
  128. sha_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
  129. sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h
  130. sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
  131. sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
  132. sha_one.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
  133. sha_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
  134. sha_one.o: ../../include/openssl/symhacks.h sha_one.c