Makefile.in 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. #
  2. # OpenSSL/crypto/Makefile
  3. #
  4. DIR= crypto
  5. TOP= ..
  6. CC= cc
  7. INCLUDE= -I. -I$(TOP) -I../include -Iinclude $(ZLIB_INCLUDE)
  8. # INCLUDES targets sudbirs!
  9. INCLUDES= -I.. -I../.. -I../modes -I../include -I../../include $(ZLIB_INCLUDE)
  10. CFLAG= -g
  11. MAKEDEPPROG= makedepend
  12. MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
  13. MAKEFILE= Makefile
  14. RM= rm -f
  15. AR= ar r
  16. RECURSIVE_MAKE= [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
  17. (cd $$i && echo "making $$target in $(DIR)/$$i..." && \
  18. $(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$target ) || exit 1; \
  19. done;
  20. PEX_LIBS=
  21. EX_LIBS=
  22. CFLAGS= $(INCLUDE) $(CFLAG)
  23. ASFLAGS= $(INCLUDE) $(ASFLAG)
  24. AFLAGS=$(ASFLAGS)
  25. CPUID_OBJ=mem_clr.o
  26. LIBS=
  27. GENERAL=Makefile README crypto-lib.com install.com
  28. LIB= $(TOP)/libcrypto.a
  29. SHARED_LIB= libcrypto$(SHLIB_EXT)
  30. LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
  31. ebcdic.c uid.c o_time.c o_str.c o_dir.c thr_id.c lock.c fips_ers.c \
  32. o_init.c o_fips.c mem_sec.c
  33. LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o \
  34. ebcdic.o uid.o o_time.o o_str.o o_dir.o thr_id.o lock.o fips_ers.o \
  35. o_init.o o_fips.o mem_sec.o $(CPUID_OBJ)
  36. SRC= $(LIBSRC)
  37. HEADER= buildinf.h arm_arch.h ppc_arch.h sparc_arch.h
  38. ALL= $(GENERAL) $(SRC) $(HEADER)
  39. top:
  40. @(cd ..; $(MAKE) DIRS=$(DIR) all)
  41. all: shared
  42. fips: cryptlib.o thr_id.o uid.o $(CPUID_OBJ)
  43. [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
  44. ( obj=`$(PERL) $(TOP)/util/fipsobj.pl $$i` && \
  45. cd $$i && echo "making fips in $(DIR)/$$i..." && \
  46. $(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$obj ) || exit 1; \
  47. done;
  48. buildinf.h: ../Makefile
  49. $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)" >buildinf.h
  50. x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl
  51. $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
  52. applink.o: $(TOP)/ms/applink.c
  53. $(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/applink.c
  54. uplink.o: $(TOP)/ms/uplink.c applink.o
  55. $(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/uplink.c
  56. uplink-x86.s: $(TOP)/ms/uplink-x86.pl
  57. $(PERL) $(TOP)/ms/uplink-x86.pl $(PERLASM_SCHEME) > $@
  58. x86_64cpuid.s: x86_64cpuid.pl; $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
  59. ia64cpuid.s: ia64cpuid.S; $(CC) $(CFLAGS) -E ia64cpuid.S > $@
  60. ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@
  61. pariscid.s: pariscid.pl; $(PERL) pariscid.pl $(PERLASM_SCHEME) $@
  62. alphacpuid.s: alphacpuid.pl
  63. (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \
  64. $(PERL) alphacpuid.pl > $$preproc && \
  65. $(CC) -E -P $$preproc > $@ && rm $$preproc)
  66. arm64cpuid.S: arm64cpuid.pl; $(PERL) arm64cpuid.pl $(PERLASM_SCHEME) > $@
  67. armv4cpuid.S: armv4cpuid.pl; $(PERL) armv4cpuid.pl $(PERLASM_SCHEME) > $@
  68. subdirs:
  69. @target=all; $(RECURSIVE_MAKE)
  70. files:
  71. $(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
  72. @target=files; $(RECURSIVE_MAKE)
  73. # lib: $(LIB): are splitted to avoid end-less loop
  74. lib: $(LIB)
  75. @touch lib
  76. $(LIB): $(LIBOBJ)
  77. $(AR) $(LIB) $(LIBOBJ)
  78. $(RANLIB) $(LIB) || echo Never mind.
  79. shared: buildinf.h lib subdirs
  80. if [ -n "$(SHARED_LIBS)" ]; then \
  81. (cd ..; $(MAKE) $(SHARED_LIB)); \
  82. fi
  83. libs:
  84. @target=lib; $(RECURSIVE_MAKE)
  85. depend:
  86. @[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist
  87. @[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
  88. @[ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h
  89. @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
  90. @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
  91. clean:
  92. rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
  93. @target=clean; $(RECURSIVE_MAKE)
  94. # DO NOT DELETE THIS LINE -- make depend depends on it.