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