Makefile.in 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. #
  2. # OpenSSL/crypto/bn/Makefile
  3. #
  4. DIR= bn
  5. TOP= ../..
  6. CC= cc
  7. CPP= $(CC) -E
  8. INCLUDES= -I.. -I$(TOP) -I../include -I../../include
  9. CFLAG=-g
  10. MAKEFILE= Makefile
  11. AR= ar r
  12. BN_ASM= bn_asm.o
  13. CFLAGS= $(INCLUDES) $(CFLAG)
  14. ASFLAGS= $(INCLUDES) $(ASFLAG)
  15. AFLAGS= $(ASFLAGS)
  16. GENERAL=Makefile
  17. LIB=$(TOP)/libcrypto.a
  18. LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \
  19. bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
  20. bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \
  21. bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \
  22. bn_depr.c bn_const.c bn_x931p.c bn_intern.c bn_dh.c bn_srp.c
  23. LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \
  24. bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \
  25. bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \
  26. bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o bn_gf2m.o bn_nist.o \
  27. bn_depr.o bn_const.o bn_x931p.o bn_intern.o bn_dh.o bn_srp.o
  28. SRC= $(LIBSRC)
  29. HEADER= bn_lcl.h bn_prime.h
  30. ALL= $(GENERAL) $(SRC) $(HEADER)
  31. top:
  32. (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
  33. all: lib
  34. bn_prime.h: bn_prime.pl
  35. $(PERL) bn_prime.pl >bn_prime.h
  36. divtest: divtest.c ../../libcrypto.a
  37. cc -I../../include divtest.c -o divtest ../../libcrypto.a
  38. bnbug: bnbug.c ../../libcrypto.a top
  39. cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a
  40. lib: $(LIBOBJ)
  41. $(AR) $(LIB) $(LIBOBJ)
  42. $(RANLIB) $(LIB) || echo Never mind.
  43. @touch lib
  44. bn-586.s: asm/bn-586.pl ../perlasm/x86asm.pl
  45. $(PERL) asm/bn-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
  46. co-586.s: asm/co-586.pl ../perlasm/x86asm.pl
  47. $(PERL) asm/co-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
  48. x86-mont.s: asm/x86-mont.pl ../perlasm/x86asm.pl
  49. $(PERL) asm/x86-mont.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
  50. x86-gf2m.s: asm/x86-gf2m.pl ../perlasm/x86asm.pl
  51. $(PERL) asm/x86-gf2m.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
  52. sparcv8.o: asm/sparcv8.S
  53. $(CC) $(CFLAGS) -c asm/sparcv8.S
  54. bn-sparcv9.o: asm/sparcv8plus.S
  55. $(CC) $(CFLAGS) -c -o $@ asm/sparcv8plus.S
  56. sparcv9a-mont.s: asm/sparcv9a-mont.pl
  57. $(PERL) asm/sparcv9a-mont.pl $(CFLAGS) > $@
  58. sparcv9-mont.s: asm/sparcv9-mont.pl
  59. $(PERL) asm/sparcv9-mont.pl $(CFLAGS) > $@
  60. vis3-mont.s: asm/vis3-mont.pl
  61. $(PERL) asm/vis3-mont.pl $(CFLAGS) > $@
  62. sparct4-mont.S: asm/sparct4-mont.pl
  63. $(PERL) asm/sparct4-mont.pl $(CFLAGS) > $@
  64. sparcv9-gf2m.S: asm/sparcv9-gf2m.pl
  65. $(PERL) asm/sparcv9-gf2m.pl $(CFLAGS) > $@
  66. bn-mips3.o: asm/mips3.s
  67. @if [ "$(CC)" = "gcc" ]; then \
  68. ABI=`expr "$(CFLAGS)" : ".*-mabi=\([n3264]*\)"` && \
  69. as -$$ABI -O -o $@ asm/mips3.s; \
  70. else $(CC) -c $(CFLAGS) -o $@ asm/mips3.s; fi
  71. bn-mips.s: asm/mips.pl
  72. $(PERL) asm/mips.pl $(PERLASM_SCHEME) $@
  73. mips-mont.s: asm/mips-mont.pl
  74. $(PERL) asm/mips-mont.pl $(PERLASM_SCHEME) $@
  75. bn-s390x.o: asm/s390x.S
  76. $(CC) $(CFLAGS) -c -o $@ asm/s390x.S
  77. s390x-gf2m.s: asm/s390x-gf2m.pl
  78. $(PERL) asm/s390x-gf2m.pl $(PERLASM_SCHEME) $@
  79. x86_64-gcc.o: asm/x86_64-gcc.c
  80. $(CC) $(CFLAGS) -c -o $@ asm/x86_64-gcc.c
  81. x86_64-mont.s: asm/x86_64-mont.pl
  82. $(PERL) asm/x86_64-mont.pl $(PERLASM_SCHEME) > $@
  83. x86_64-mont5.s: asm/x86_64-mont5.pl
  84. $(PERL) asm/x86_64-mont5.pl $(PERLASM_SCHEME) > $@
  85. x86_64-gf2m.s: asm/x86_64-gf2m.pl
  86. $(PERL) asm/x86_64-gf2m.pl $(PERLASM_SCHEME) > $@
  87. rsaz-x86_64.s: asm/rsaz-x86_64.pl
  88. $(PERL) asm/rsaz-x86_64.pl $(PERLASM_SCHEME) > $@
  89. rsaz-avx2.s: asm/rsaz-avx2.pl
  90. $(PERL) asm/rsaz-avx2.pl $(PERLASM_SCHEME) > $@
  91. bn-ia64.s: asm/ia64.S
  92. $(CC) $(CFLAGS) -E asm/ia64.S > $@
  93. ia64-mont.s: asm/ia64-mont.pl
  94. $(PERL) asm/ia64-mont.pl $@ $(CFLAGS)
  95. # GNU assembler fails to compile PA-RISC2 modules, insist on calling
  96. # vendor assembler...
  97. pa-risc2W.o: asm/pa-risc2W.s
  98. $(PERL) $(TOP)/util/fipsas.pl $(TOP) $< /usr/ccs/bin/as -o pa-risc2W.o asm/pa-risc2W.s
  99. pa-risc2.o: asm/pa-risc2.s
  100. $(PERL) $(TOP)/util/fipsas.pl $(TOP) $< /usr/ccs/bin/as -o pa-risc2.o asm/pa-risc2.s
  101. parisc-mont.s: asm/parisc-mont.pl
  102. $(PERL) asm/parisc-mont.pl $(PERLASM_SCHEME) $@
  103. # ppc - AIX, Linux, MacOS X...
  104. bn-ppc.s: asm/ppc.pl; $(PERL) asm/ppc.pl $(PERLASM_SCHEME) $@
  105. ppc-mont.s: asm/ppc-mont.pl;$(PERL) asm/ppc-mont.pl $(PERLASM_SCHEME) $@
  106. ppc64-mont.s: asm/ppc64-mont.pl;$(PERL) asm/ppc64-mont.pl $(PERLASM_SCHEME) $@
  107. alpha-mont.s: asm/alpha-mont.pl
  108. (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \
  109. $(PERL) asm/alpha-mont.pl > $$preproc && \
  110. $(CC) -E -P $$preproc > $@ && rm $$preproc)
  111. # GNU make "catch all"
  112. %-mont.S: asm/%-mont.pl; $(PERL) $< $(PERLASM_SCHEME) $@
  113. %-gf2m.S: asm/%-gf2m.pl; $(PERL) $< $(PERLASM_SCHEME) $@
  114. armv4-mont.o: armv4-mont.S
  115. armv4-gf2m.o: armv4-gf2m.S
  116. armv8-mont.o: armv8-mont.S
  117. files:
  118. $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
  119. div:
  120. rm -f a.out
  121. gcc -I.. -g div.c ../../libcrypto.a
  122. update: bn_prime.h depend
  123. depend:
  124. @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
  125. $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
  126. clean:
  127. rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
  128. # DO NOT DELETE THIS LINE -- make depend depends on it.