Makefile.ssl 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. #
  2. # SSLeay/crypto/Makefile
  3. #
  4. DIR= crypto
  5. TOP= ..
  6. CC= cc
  7. INCLUDE= -I. -I$(TOP) -I../include
  8. INCLUDES= -I.. -I../.. -I../../include
  9. CFLAG= -g
  10. INSTALL_PREFIX=
  11. OPENSSLDIR= /usr/local/ssl
  12. INSTALLTOP= /usr/local/ssl
  13. MAKE= make -f Makefile.ssl
  14. MAKEDEPPROG= makedepend
  15. MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
  16. MAKEFILE= Makefile.ssl
  17. RM= rm -f
  18. AR= ar r
  19. PEX_LIBS=
  20. EX_LIBS=
  21. CFLAGS= $(INCLUDE) $(CFLAG)
  22. LIBS=
  23. SDIRS= md2 md5 sha mdc2 hmac ripemd \
  24. des rc2 rc4 rc5 idea bf cast \
  25. bn ec rsa dsa dh dso engine rijndael \
  26. buffer bio stack lhash rand err objects \
  27. evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui
  28. GENERAL=Makefile README crypto-lib.com install.com
  29. LIB= $(TOP)/libcrypto.a
  30. LIBSRC= cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c
  31. LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o
  32. SRC= $(LIBSRC)
  33. EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
  34. types.h
  35. HEADER= cryptlib.h buildinf.h md32_common.h o_time.h $(EXHEADER)
  36. ALL= $(GENERAL) $(SRC) $(HEADER)
  37. top:
  38. @(cd ..; $(MAKE) DIRS=$(DIR) all)
  39. all: buildinf.h lib subdirs
  40. buildinf.h: ../Makefile.ssl
  41. ( echo "#ifndef MK1MF_BUILD"; \
  42. echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
  43. echo " #define CFLAGS \"$(CC) $(CFLAG)\""; \
  44. echo " #define PLATFORM \"$(PLATFORM)\""; \
  45. echo " #define DATE \"`date`\""; \
  46. echo "#endif" ) >buildinf.h
  47. testapps:
  48. if echo ${SDIRS} | fgrep ' des '; \
  49. then cd des && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' des; fi
  50. cd pkcs7 && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' testapps
  51. subdirs:
  52. @for i in $(SDIRS) ;\
  53. do \
  54. (cd $$i && echo "making all in crypto/$$i..." && \
  55. $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
  56. done;
  57. files:
  58. $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
  59. @for i in $(SDIRS) ;\
  60. do \
  61. (cd $$i && echo "making 'files' in crypto/$$i..." && \
  62. $(MAKE) PERL='${PERL}' files ); \
  63. done;
  64. links:
  65. @$(TOP)/util/point.sh Makefile.ssl Makefile
  66. @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
  67. @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
  68. @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
  69. @$(TOP)/util/point.sh Makefile.ssl Makefile
  70. @for i in $(SDIRS); do \
  71. (cd $$i && echo "making links in crypto/$$i..." && \
  72. $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PERL='${PERL}' links ); \
  73. done;
  74. lib: $(LIBOBJ)
  75. $(AR) $(LIB) $(LIBOBJ)
  76. $(RANLIB) $(LIB) || echo Never mind.
  77. @touch lib
  78. libs:
  79. @for i in $(SDIRS) ;\
  80. do \
  81. (cd $$i && echo "making libs in crypto/$$i..." && \
  82. $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
  83. done;
  84. tests:
  85. @for i in $(SDIRS) ;\
  86. do \
  87. (cd $$i && echo "making tests in crypto/$$i..." && \
  88. $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
  89. done;
  90. install:
  91. @for i in $(EXHEADER) ;\
  92. do \
  93. (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
  94. chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
  95. done;
  96. @for i in $(SDIRS) ;\
  97. do \
  98. (cd $$i && echo "making install in crypto/$$i..." && \
  99. $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
  100. done;
  101. lint:
  102. @for i in $(SDIRS) ;\
  103. do \
  104. (cd $$i && echo "making lint in crypto/$$i..." && \
  105. $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
  106. done;
  107. depend:
  108. if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
  109. $(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC)
  110. if [ ! -s buildinf.h ]; then rm buildinf.h; fi
  111. @for i in $(SDIRS) ;\
  112. do \
  113. (cd $$i && echo "making depend in crypto/$$i..." && \
  114. $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' depend ); \
  115. done;
  116. clean:
  117. rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
  118. @for i in $(SDIRS) ;\
  119. do \
  120. (cd $$i && echo "making clean in crypto/$$i..." && \
  121. $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
  122. done;
  123. dclean:
  124. $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
  125. mv -f Makefile.new $(MAKEFILE)
  126. @for i in $(SDIRS) ;\
  127. do \
  128. (cd $$i && echo "making dclean in crypto/$$i..." && \
  129. $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
  130. done;
  131. # DO NOT DELETE THIS LINE -- make depend depends on it.
  132. cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
  133. cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h
  134. cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
  135. cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
  136. cpt_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cpt_err.c
  137. cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
  138. cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
  139. cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h
  140. cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
  141. cryptlib.o: ../include/openssl/safestack.h ../include/openssl/stack.h
  142. cryptlib.o: ../include/openssl/symhacks.h cryptlib.c cryptlib.h
  143. cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
  144. cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
  145. cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
  146. cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
  147. cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h
  148. cversion.o: ../include/openssl/symhacks.h buildinf.h cryptlib.h cversion.c
  149. ebcdic.o: ../include/openssl/opensslconf.h ebcdic.c
  150. ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
  151. ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
  152. ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
  153. ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
  154. ex_data.o: ../include/openssl/safestack.h ../include/openssl/stack.h
  155. ex_data.o: ../include/openssl/symhacks.h cryptlib.h ex_data.c
  156. mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
  157. mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
  158. mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
  159. mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
  160. mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h
  161. mem.o: ../include/openssl/symhacks.h cryptlib.h mem.c
  162. mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
  163. mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
  164. mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
  165. mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
  166. mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h
  167. mem_dbg.o: ../include/openssl/symhacks.h cryptlib.h mem_dbg.c
  168. o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
  169. o_time.o: o_time.h
  170. tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
  171. tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
  172. tmdiff.o: ../include/openssl/err.h ../include/openssl/lhash.h
  173. tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
  174. tmdiff.o: ../include/openssl/safestack.h ../include/openssl/stack.h
  175. tmdiff.o: ../include/openssl/symhacks.h ../include/openssl/tmdiff.h cryptlib.h
  176. tmdiff.o: tmdiff.c
  177. uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
  178. uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
  179. uid.o: ../include/openssl/safestack.h ../include/openssl/stack.h
  180. uid.o: ../include/openssl/symhacks.h uid.c