Makefile 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. #
  2. # crypto/aes/Makefile
  3. #
  4. DIR= aes
  5. TOP= ../..
  6. CC= cc
  7. CPP= $(CC) -E
  8. INCLUDES=
  9. CFLAG=-g
  10. MAKEFILE= Makefile
  11. AR= ar r
  12. AES_ENC=aes_core.o aes_cbc.o
  13. CFLAGS= $(INCLUDES) $(CFLAG)
  14. ASFLAGS= $(INCLUDES) $(ASFLAG)
  15. AFLAGS= $(ASFLAGS)
  16. GENERAL=Makefile
  17. #TEST=aestest.c
  18. TEST=
  19. APPS=
  20. LIB=$(TOP)/libcrypto.a
  21. LIBSRC=aes_core.c aes_misc.c aes_ecb.c aes_cbc.c aes_cfb.c aes_ofb.c \
  22. aes_ctr.c aes_ige.c aes_wrap.c
  23. LIBOBJ=aes_misc.o aes_ecb.o aes_cfb.o aes_ofb.o aes_ctr.o aes_ige.o aes_wrap.o \
  24. $(AES_ENC)
  25. SRC= $(LIBSRC)
  26. EXHEADER= aes.h
  27. HEADER= aes_locl.h $(EXHEADER)
  28. ALL= $(GENERAL) $(SRC) $(HEADER)
  29. top:
  30. (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
  31. all: lib
  32. lib: $(LIBOBJ)
  33. $(AR) $(LIB) $(LIBOBJ)
  34. $(RANLIB) $(LIB) || echo Never mind.
  35. @touch lib
  36. aes-ia64.s: asm/aes-ia64.S
  37. $(CC) $(CFLAGS) -E asm/aes-ia64.S > $@
  38. aes-586.s: asm/aes-586.pl ../perlasm/x86asm.pl
  39. $(PERL) asm/aes-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
  40. vpaes-x86.s: asm/vpaes-x86.pl ../perlasm/x86asm.pl
  41. $(PERL) asm/vpaes-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
  42. aesni-x86.s: asm/aesni-x86.pl ../perlasm/x86asm.pl
  43. $(PERL) asm/aesni-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
  44. aes-x86_64.s: asm/aes-x86_64.pl
  45. $(PERL) asm/aes-x86_64.pl $(PERLASM_SCHEME) > $@
  46. vpaes-x86_64.s: asm/vpaes-x86_64.pl
  47. $(PERL) asm/vpaes-x86_64.pl $(PERLASM_SCHEME) > $@
  48. bsaes-x86_64.s: asm/bsaes-x86_64.pl
  49. $(PERL) asm/bsaes-x86_64.pl $(PERLASM_SCHEME) > $@
  50. aesni-x86_64.s: asm/aesni-x86_64.pl
  51. $(PERL) asm/aesni-x86_64.pl $(PERLASM_SCHEME) > $@
  52. aesni-sha1-x86_64.s: asm/aesni-sha1-x86_64.pl
  53. $(PERL) asm/aesni-sha1-x86_64.pl $(PERLASM_SCHEME) > $@
  54. aesni-sha256-x86_64.s: asm/aesni-sha256-x86_64.pl
  55. $(PERL) asm/aesni-sha256-x86_64.pl $(PERLASM_SCHEME) > $@
  56. aesni-mb-x86_64.s: asm/aesni-mb-x86_64.pl
  57. $(PERL) asm/aesni-mb-x86_64.pl $(PERLASM_SCHEME) > $@
  58. aes-sparcv9.s: asm/aes-sparcv9.pl
  59. $(PERL) asm/aes-sparcv9.pl $(CFLAGS) > $@
  60. aest4-sparcv9.s: asm/aest4-sparcv9.pl ../perlasm/sparcv9_modes.pl
  61. $(PERL) asm/aest4-sparcv9.pl $(CFLAGS) > $@
  62. aes-ppc.s: asm/aes-ppc.pl
  63. $(PERL) asm/aes-ppc.pl $(PERLASM_SCHEME) $@
  64. vpaes-ppc.s: asm/vpaes-ppc.pl
  65. $(PERL) asm/vpaes-ppc.pl $(PERLASM_SCHEME) $@
  66. aesp8-ppc.s: asm/aesp8-ppc.pl
  67. $(PERL) asm/aesp8-ppc.pl $(PERLASM_SCHEME) $@
  68. aes-parisc.s: asm/aes-parisc.pl
  69. $(PERL) asm/aes-parisc.pl $(PERLASM_SCHEME) $@
  70. aes-mips.S: asm/aes-mips.pl
  71. $(PERL) asm/aes-mips.pl $(PERLASM_SCHEME) $@
  72. aesv8-armx.S: asm/aesv8-armx.pl
  73. $(PERL) asm/aesv8-armx.pl $(PERLASM_SCHEME) $@
  74. aesv8-armx.o: aesv8-armx.S
  75. # GNU make "catch all"
  76. aes-%.S: asm/aes-%.pl; $(PERL) $< $(PERLASM_SCHEME) > $@
  77. aes-armv4.o: aes-armv4.S
  78. bsaes-%.S: asm/bsaes-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
  79. bsaes-armv7.o: bsaes-armv7.S
  80. files:
  81. $(PERL) $(TOP)/util/files.pl "AES_ENC=$(AES_ENC)" Makefile >> $(TOP)/MINFO
  82. links:
  83. @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
  84. @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
  85. @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
  86. install:
  87. @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
  88. @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
  89. do \
  90. (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
  91. chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
  92. done;
  93. tags:
  94. ctags $(SRC)
  95. tests:
  96. lint:
  97. lint -DLINT $(INCLUDES) $(SRC)>fluff
  98. update: depend
  99. depend:
  100. @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
  101. $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
  102. dclean:
  103. $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
  104. mv -f Makefile.new $(MAKEFILE)
  105. clean:
  106. rm -f *.s *.S *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
  107. # DO NOT DELETE THIS LINE -- make depend depends on it.
  108. aes_cbc.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
  109. aes_cbc.o: ../../include/openssl/opensslconf.h aes_cbc.c
  110. aes_cfb.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
  111. aes_cfb.o: ../../include/openssl/opensslconf.h aes_cfb.c
  112. aes_core.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
  113. aes_core.o: ../../include/openssl/opensslconf.h aes_core.c aes_locl.h
  114. aes_ctr.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
  115. aes_ctr.o: ../../include/openssl/opensslconf.h aes_ctr.c
  116. aes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
  117. aes_ecb.o: ../../include/openssl/opensslconf.h aes_ecb.c aes_locl.h
  118. aes_ige.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/bio.h
  119. aes_ige.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
  120. aes_ige.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
  121. aes_ige.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
  122. aes_ige.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
  123. aes_ige.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
  124. aes_ige.o: ../../include/openssl/symhacks.h ../cryptlib.h aes_ige.c aes_locl.h
  125. aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/crypto.h
  126. aes_misc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
  127. aes_misc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
  128. aes_misc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
  129. aes_misc.o: ../../include/openssl/symhacks.h aes_locl.h aes_misc.c
  130. aes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
  131. aes_ofb.o: ../../include/openssl/opensslconf.h aes_ofb.c
  132. aes_wrap.o: ../../e_os.h ../../include/openssl/aes.h
  133. aes_wrap.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
  134. aes_wrap.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
  135. aes_wrap.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
  136. aes_wrap.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
  137. aes_wrap.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
  138. aes_wrap.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
  139. aes_wrap.o: ../../include/openssl/symhacks.h ../cryptlib.h aes_wrap.c