Makefile 6.1 KB

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