Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Makefile 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. PWD = $(shell pwd)
  2. export CPATH = $(PWD)/openssl/include
  3. export LIBRARY_PATH = $(PWD)/openssl
  4. OPENSSL_VERSION = 1.0.2d
  5. OPENSSL_DIR = openssl-$(OPENSSL_VERSION)
  6. RUBY_MAJOR_VERSION = 2.2
  7. RUBY_VERSION = $(RUBY_MAJOR_VERSION).2
  8. RUBY_DIR = ruby-$(RUBY_VERSION)
  9. RUBY_OPENSSL_EXT_DIR = $(RUBY_DIR)/ext/openssl
  10. export LIBRARY_PATH = $(PWD)/lib
  11. export C_INCLUDE_PATH = $(PWD)/$(OPENSSL_DIR)/include
  12. .SECONDARY:
  13. all: libs ext
  14. clean:
  15. rm -rf $(RUBY_DIR) $(OPENSSL_DIR)
  16. clean-libs:
  17. find $(OPENSSL_DIR) \( -name "*.o" -o -name "*.so" \) -delete
  18. rm -f lib/libcrypto.so lib/libssl.so
  19. clean-ext:
  20. find $(RUBY_OPENSSL_EXT_DIR) \( -name "*.o" -o -name "*.so" \) -delete
  21. rm -f lib/openssl.so
  22. mr-proper: clean
  23. rm -rf lib/libcrypto.so lib/libssl.so lib/openssl.so
  24. $(OPENSSL_DIR)/:
  25. wget https://www.openssl.org/source/$(OPENSSL_DIR).tar.gz
  26. tar xf $(OPENSSL_DIR).tar.gz
  27. rm -rf $(OPENSSL_DIR).tar.gz
  28. $(OPENSSL_DIR)/Makefile: | $(OPENSSL_DIR)/
  29. cd $(OPENSSL_DIR); ./config shared
  30. $(OPENSSL_DIR)/libssl.so $(OPENSSL_DIR)/libcrypto.so: $(OPENSSL_DIR)/Makefile
  31. $(MAKE) -C $(OPENSSL_DIR) depend build_libs
  32. lib/%.so: $(OPENSSL_DIR)/%.so
  33. cp $< $@
  34. lib/%.so.1.0.0: $(OPENSSL_DIR)/%.so.1.0.0
  35. cp $< $@
  36. libs: lib/libssl.so lib/libcrypto.so lib/libssl.so.1.0.0 lib/libcrypto.so.1.0.0
  37. $(RUBY_DIR)/:
  38. wget http://cache.ruby-lang.org/pub/ruby/$(RUBY_MAJOR_VERSION)/$(RUBY_DIR).tar.gz
  39. tar xf $(RUBY_DIR).tar.gz
  40. rm -f $(RUBY_DIR).tar.gz
  41. $(RUBY_OPENSSL_EXT_DIR)/Makefile: libs | $(RUBY_DIR)/
  42. cd $(RUBY_OPENSSL_EXT_DIR); ruby extconf.rb
  43. patch -p0 -d $(RUBY_OPENSSL_EXT_DIR) < patch
  44. $(RUBY_OPENSSL_EXT_DIR)/openssl.so: libs $(RUBY_OPENSSL_EXT_DIR)/Makefile
  45. $(MAKE) -C $(RUBY_OPENSSL_EXT_DIR)
  46. lib/openssl.so: $(RUBY_OPENSSL_EXT_DIR)/openssl.so
  47. cp $< $@
  48. ext: lib/openssl.so