Makefile.in 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. #
  2. # apps/Makefile
  3. #
  4. DIR= apps
  5. TOP= ..
  6. CC= cc
  7. INCLUDES= -I$(TOP) -I../crypto -I../include
  8. CFLAG= -g -static -Wswitch
  9. MAKEFILE= Makefile
  10. PERL= perl
  11. RM= rm -f
  12. PLIB_LDFLAG=
  13. EX_LIBS=
  14. EXE_EXT=
  15. SHLIB_TARGET=
  16. CFLAGS= $(INCLUDES) $(CFLAG)
  17. GENERAL=Makefile makeapps.com install.com
  18. DLIBCRYPTO=../libcrypto.a
  19. DLIBSSL=../libssl.a
  20. LIBCRYPTO=-L.. -lcrypto
  21. LIBSSL=-L.. -lssl
  22. SCRIPTS=CA.pl tsget
  23. EXE= openssl$(EXE_EXT)
  24. COMMANDS= \
  25. asn1pars.o ca.o ciphers.o cms.o crl.o crl2p7.o dgst.o dhparam.o \
  26. dsa.o dsaparam.o ec.o ecparam.o enc.o engine.o errstr.o gendsa.o \
  27. genpkey.o genrsa.o nseq.o ocsp.o passwd.o pkcs12.o pkcs7.o pkcs8.o \
  28. pkey.o pkeyparam.o pkeyutl.o prime.o rand.o req.o rsa.o rsautl.o \
  29. s_client.o s_server.o s_time.o sess_id.o smime.o speed.o spkac.o \
  30. srp.o ts.o verify.o version.o x509.o rehash.o
  31. EXTRA_OBJ=apps.o opt.o s_cb.o s_socket.o
  32. EXTRA_SRC=apps.c opt.c s_cb.c s_socket.c
  33. RAND_OBJ=app_rand.o
  34. RAND_SRC=app_rand.c
  35. OBJ = $(COMMANDS)
  36. SRC = \
  37. asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c dhparam.c \
  38. dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c errstr.c gendsa.c \
  39. genpkey.c genrsa.c nseq.c ocsp.c passwd.c pkcs12.c pkcs7.c pkcs8.c \
  40. pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c rsa.c rsautl.c \
  41. s_client.c s_server.c s_time.c sess_id.c smime.c speed.c spkac.c \
  42. srp.c ts.c verify.c version.c x509.c rehash.c
  43. EXE_OBJ = openssl.o $(OBJ) $(EXTRA_OBJ) $(RAND_OBJ)
  44. EXE_SRC = openssl.c $(SRC) $(EXTRA_SRC) $(RAND_SRC)
  45. HEADER= apps.h progs.h s_apps.h \
  46. testdsa.h testrsa.h timeouts.h
  47. ALL= $(GENERAL) $(EXE_SRC) $(HEADER)
  48. top:
  49. @(cd ..; $(MAKE) DIRS=$(DIR) all)
  50. all: exe scripts
  51. exe: $(EXE)
  52. scripts: $(SCRIPTS)
  53. openssl-vms.cnf: openssl.cnf
  54. $(PERL) $(TOP)/VMS/VMSify-conf.pl < openssl.cnf > openssl-vms.cnf
  55. files:
  56. $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
  57. install:
  58. @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
  59. @set -e; for i in $(EXE); \
  60. do \
  61. (echo installing $$i; \
  62. cp $$i $(DESTDIR)$(INSTALLTOP)/bin/$$i.new; \
  63. chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$i.new; \
  64. mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$i.new $(DESTDIR)$(INSTALLTOP)/bin/$$i ); \
  65. done;
  66. @set -e; for i in $(SCRIPTS); \
  67. do \
  68. (echo installing $$i; \
  69. cp $$i $(DESTDIR)$(OPENSSLDIR)/misc/$$i.new; \
  70. chmod 755 $(DESTDIR)$(OPENSSLDIR)/misc/$$i.new; \
  71. mv -f $(DESTDIR)$(OPENSSLDIR)/misc/$$i.new $(DESTDIR)$(OPENSSLDIR)/misc/$$i ); \
  72. done
  73. @cp openssl.cnf $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new; \
  74. chmod 644 $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new; \
  75. mv -f $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new $(DESTDIR)$(OPENSSLDIR)/openssl.cnf
  76. uninstall:
  77. @set -e; for i in $(EXE); \
  78. do \
  79. echo $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$i; \
  80. $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$i; \
  81. done;
  82. @set -e; for i in $(SCRIPTS); \
  83. do \
  84. echo $(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$i; \
  85. $(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$i; \
  86. done
  87. $(RM) $(DESTDIR)$(OPENSSLDIR)/openssl.cnf
  88. generate: openssl-vms.cnf progs.h
  89. depend:
  90. $(TOP)/util/domd $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(EXE_SRC)
  91. clean:
  92. rm -f *.o *.obj *.dll lib tags core .pure .nfs* *.old *.bak fluff $(EXE)
  93. rm -f req
  94. $(DLIBSSL):
  95. (cd ..; $(MAKE) build_libssl)
  96. $(DLIBCRYPTO):
  97. (cd ..; $(MAKE) build_libcrypto)
  98. $(EXE): $(EXE_OBJ) $(DLIBCRYPTO) $(DLIBSSL)
  99. $(RM) $(EXE)
  100. shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
  101. shlib_target="$(SHLIB_TARGET)"; \
  102. fi; \
  103. LIBRARIES="$(LIBSSL) $(LIBCRYPTO)" ; \
  104. $(MAKE) -f $(TOP)/Makefile.shared -e \
  105. APPNAME=$(EXE) OBJECTS="$(EXE_OBJ)" \
  106. LDFLAG="$(LDFLAG)" \
  107. LIBDEPS="$(PLIB_LDFLAG) $$LIBRARIES $(EX_LIBS)" \
  108. link_app.$${shlib_target}
  109. progs.h: progs.pl Makefile.in
  110. $(RM) progs.h
  111. $(PERL) progs.pl $(EXE_SRC) > progs.h
  112. CA.pl: CA.pl.in
  113. $(PERL) -I$(TOP) -Mconfigdata $(TOP)/util/dofile.pl -oapps/Makefile CA.pl.in > CA.pl.new
  114. mv CA.pl.new CA.pl
  115. # DO NOT DELETE THIS LINE -- make depend depends on it.