Makefile 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. #
  2. # OpenSSL/fips/sha/Makefile
  3. #
  4. DIR= sha
  5. TOP= ../..
  6. CC= cc
  7. INCLUDES=
  8. CFLAG=-g
  9. INSTALL_PREFIX=
  10. OPENSSLDIR= /usr/local/ssl
  11. INSTALLTOP=/usr/local/ssl
  12. MAKEDEPPROG= makedepend
  13. MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
  14. MAKEFILE= Makefile
  15. AR= ar r
  16. EXE_EXT=
  17. ASFLAGS= $(INCLUDES) $(ASFLAG)
  18. AFLAGS= $(ASFLAGS)
  19. CFLAGS= $(INCLUDES) $(CFLAG)
  20. GENERAL=Makefile
  21. TEST= fips_shatest.c
  22. APPS=
  23. EXE= fips_standalone_sha1$(EXE_EXT)
  24. LIB=$(TOP)/libcrypto.a
  25. LIBSRC=fips_sha1_selftest.c
  26. LIBOBJ=fips_sha1_selftest.o
  27. SRC= $(LIBSRC) fips_standalone_sha1.c
  28. EXHEADER=
  29. HEADER=
  30. ALL= $(GENERAL) $(SRC) $(HEADER)
  31. top:
  32. (cd $(TOP); $(MAKE) DIRS=fips SDIRS=$(DIR) sub_all)
  33. all: ../fips_standalone_sha1$(EXE_EXT) lib
  34. lib: $(LIBOBJ)
  35. @echo $(LIBOBJ) > lib
  36. ../fips_standalone_sha1$(EXE_EXT): fips_standalone_sha1.o
  37. if [ -z "$(HOSTCC)" ] ; then \
  38. FIPS_SHA_ASM=""; for i in $(SHA1_ASM_OBJ) sha1dgst.o ; do FIPS_SHA_ASM="$$FIPS_SHA_ASM ../../crypto/sha/$$i" ; done; \
  39. $(CC) -o $@ $(CFLAGS) fips_standalone_sha1.o $$FIPS_SHA_ASM ; \
  40. else \
  41. $(HOSTCC) $(HOSTCFLAGS) -o $ $@ -I../../include -I../../crypto fips_standalone_sha1.c ../../crypto/sha/sha1dgst.c ; \
  42. fi
  43. files:
  44. $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
  45. links:
  46. @$(PERL) $(TOP)/util/mklink.pl $(TOP)/include/openssl $(EXHEADER)
  47. @$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TEST)
  48. @$(PERL) $(TOP)/util/mklink.pl $(TOP)/apps $(APPS)
  49. install:
  50. @headerlist="$(EXHEADER)"; for i in $$headerlist; \
  51. do \
  52. (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
  53. chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
  54. done
  55. tags:
  56. ctags $(SRC)
  57. tests:
  58. Q=../testvectors/sha/req
  59. A=../testvectors/sha/rsp
  60. VECTORS = SHA1LongMsg \
  61. SHA1Monte \
  62. SHA1ShortMsg \
  63. SHA224LongMsg \
  64. SHA224Monte \
  65. SHA224ShortMsg \
  66. SHA256LongMsg \
  67. SHA256Monte \
  68. SHA256ShortMsg \
  69. SHA384LongMsg \
  70. SHA384Monte \
  71. SHA384ShortMsg \
  72. SHA512LongMsg \
  73. SHA512Monte \
  74. SHA512ShortMsg
  75. fips_test:
  76. -rm -rf $(A)
  77. mkdir $(A)
  78. for file in $(VECTORS); do \
  79. if [ -f $(Q)/$$file.req ]; then \
  80. $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_shatest $(Q)/$$file.req $(A)/$$file.rsp; \
  81. fi; \
  82. done
  83. lint:
  84. lint -DLINT $(INCLUDES) $(SRC)>fluff
  85. depend:
  86. $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(SRC) $(TEST)
  87. dclean:
  88. $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
  89. mv -f Makefile.new $(MAKEFILE)
  90. clean:
  91. rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE)
  92. # DO NOT DELETE THIS LINE -- make depend depends on it.
  93. fips_sha1_selftest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
  94. fips_sha1_selftest.o: ../../include/openssl/crypto.h
  95. fips_sha1_selftest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
  96. fips_sha1_selftest.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
  97. fips_sha1_selftest.o: ../../include/openssl/lhash.h
  98. fips_sha1_selftest.o: ../../include/openssl/obj_mac.h
  99. fips_sha1_selftest.o: ../../include/openssl/objects.h
  100. fips_sha1_selftest.o: ../../include/openssl/opensslconf.h
  101. fips_sha1_selftest.o: ../../include/openssl/opensslv.h
  102. fips_sha1_selftest.o: ../../include/openssl/ossl_typ.h
  103. fips_sha1_selftest.o: ../../include/openssl/safestack.h
  104. fips_sha1_selftest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
  105. fips_sha1_selftest.o: ../../include/openssl/symhacks.h fips_sha1_selftest.c
  106. fips_shatest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
  107. fips_shatest.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
  108. fips_shatest.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
  109. fips_shatest.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
  110. fips_shatest.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
  111. fips_shatest.o: ../../include/openssl/err.h ../../include/openssl/evp.h
  112. fips_shatest.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
  113. fips_shatest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
  114. fips_shatest.o: ../../include/openssl/opensslconf.h
  115. fips_shatest.o: ../../include/openssl/opensslv.h
  116. fips_shatest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
  117. fips_shatest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
  118. fips_shatest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
  119. fips_shatest.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
  120. fips_shatest.o: ../../include/openssl/x509v3.h ../fips_utl.h fips_shatest.c
  121. fips_standalone_sha1.o: ../../include/openssl/asn1.h
  122. fips_standalone_sha1.o: ../../include/openssl/bio.h
  123. fips_standalone_sha1.o: ../../include/openssl/crypto.h
  124. fips_standalone_sha1.o: ../../include/openssl/e_os2.h
  125. fips_standalone_sha1.o: ../../include/openssl/evp.h
  126. fips_standalone_sha1.o: ../../include/openssl/fips.h
  127. fips_standalone_sha1.o: ../../include/openssl/hmac.h
  128. fips_standalone_sha1.o: ../../include/openssl/obj_mac.h
  129. fips_standalone_sha1.o: ../../include/openssl/objects.h
  130. fips_standalone_sha1.o: ../../include/openssl/opensslconf.h
  131. fips_standalone_sha1.o: ../../include/openssl/opensslv.h
  132. fips_standalone_sha1.o: ../../include/openssl/ossl_typ.h
  133. fips_standalone_sha1.o: ../../include/openssl/safestack.h
  134. fips_standalone_sha1.o: ../../include/openssl/sha.h
  135. fips_standalone_sha1.o: ../../include/openssl/stack.h
  136. fips_standalone_sha1.o: ../../include/openssl/symhacks.h fips_standalone_sha1.c