Makefile.ssl 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. #
  2. # SSLeay/apps/Makefile.ssl
  3. #
  4. DIR= apps
  5. TOP= ..
  6. CC= cc
  7. INCLUDES= -I../include
  8. CFLAG= -g -static
  9. INSTALLTOP= /usr/local/ssl
  10. MAKE= make -f Makefile.ssl
  11. MAKEDEPEND= makedepend -f Makefile.ssl
  12. MAKEFILE= Makefile.ssl
  13. RM= /bin/rm -f
  14. PEX_LIBS=
  15. EX_LIBS=
  16. CFLAGS= -DMONOLITH $(INCLUDES) $(CFLAG)
  17. GENERAL=Makefile
  18. DLIBCRYPTO=../libcrypto.a
  19. DLIBSSL=../libssl.a
  20. LIBCRYPTO=-L.. -lcrypto
  21. LIBSSL=-L.. -lssl
  22. SSLEAY= ssleay
  23. SCRIPTS=CA.sh der_chop
  24. EXE= $(SSLEAY)
  25. E_EXE= verify asn1pars req dgst dh enc gendh errstr ca crl \
  26. rsa dsa dsaparam \
  27. x509 genrsa s_server s_client speed \
  28. s_time version pkcs7 crl2pkcs7 sess_id ciphers
  29. PROGS= $(SSLEAY).c
  30. A_OBJ=apps.o
  31. A_SRC=apps.c
  32. S_OBJ= s_cb.o s_socket.o
  33. S_SRC= s_cb.c s_socket.c
  34. E_OBJ= verify.o asn1pars.o req.o dgst.o dh.o enc.o gendh.o errstr.o ca.o \
  35. pkcs7.o crl2p7.o crl.o \
  36. rsa.o dsa.o dsaparam.o \
  37. x509.o genrsa.o s_server.o s_client.o speed.o \
  38. s_time.o $(A_OBJ) $(S_OBJ) version.o sess_id.o \
  39. ciphers.o
  40. # pem_mail.o
  41. E_SRC= verify.c asn1pars.c req.c dgst.c dh.c enc.c gendh.c errstr.c ca.c \
  42. pkcs7.c crl2p7.c crl.c \
  43. rsa.c dsa.c dsaparam.c \
  44. x509.c genrsa.c s_server.c s_client.c speed.c \
  45. s_time.c $(A_SRC) $(S_SRC) version.c sess_id.c \
  46. ciphers.c
  47. # pem_mail.c
  48. SRC=$(E_SRC)
  49. EXHEADER=
  50. HEADER= apps.h progs.h s_apps.h \
  51. testdsa.h testrsa.h \
  52. $(EXHEADER)
  53. ALL= $(GENERAL) $(SRC) $(HEADER)
  54. top:
  55. @(cd ..; $(MAKE) DIRS=$(DIR) all)
  56. all: exe
  57. exe: $(EXE)
  58. req: sreq.o $(A_OBJ) $(DLIBCRYPTO)
  59. $(CC) -o req $(CFLAG) sreq.o $(A_OBJ) $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
  60. sreq.o: req.c
  61. $(CC) -c $(INCLUDES) $(CFLAG) -o sreq.o req.c
  62. files:
  63. perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
  64. install: mklinks
  65. @for i in $(EXE) $(SCRIPTS) mklinks; \
  66. do \
  67. (echo installing $$i; \
  68. cp $$i $(INSTALLTOP)/bin/$$i; \
  69. chmod 755 $(INSTALLTOP)/bin/$$i ); \
  70. done; \
  71. cp ssleay.cnf $(INSTALLTOP)/lib
  72. chmod 644 $(INSTALLTOP)/lib/ssleay.cnf
  73. cd $(INSTALLTOP)/bin; \
  74. /bin/sh ./mklinks; \
  75. /bin/rm -f ./mklinks
  76. tags:
  77. ctags $(SRC)
  78. tests:
  79. links:
  80. /bin/rm -f Makefile
  81. $(TOP)/util/point.sh Makefile.ssl Makefile ;
  82. lint:
  83. lint -DLINT $(INCLUDES) $(SRC)>fluff
  84. depend:
  85. $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(SRC)
  86. dclean:
  87. perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
  88. mv -f Makefile.new $(MAKEFILE)
  89. errors:
  90. clean:
  91. /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE)
  92. /bin/rm -f req
  93. $(DLIBSSL):
  94. (cd ../ssl; $(MAKE))
  95. $(DLIBCRYPTO):
  96. (cd ../crypto; $(MAKE))
  97. $(SSLEAY): progs.h $(E_OBJ) $(SSLEAY).o $(DLIBCRYPTO) $(DLIBSSL)
  98. $(RM) $(SSLEAY)
  99. $(CC) -o $(SSLEAY) $(CFLAGS) $(SSLEAY).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS)
  100. progs.h:
  101. perl ./g_ssleay.pl $(E_EXE) >progs.h
  102. $(RM) $(SSLEAY).o
  103. mklinks:
  104. perl ./g_ssleay.pl $(E_EXE) >progs.h
  105. # DO NOT DELETE THIS LINE -- make depend depends on it.