Makefile 5.2 KB

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