2
0

Makefile 5.3 KB

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