You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dep.mk 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. include $(RACK_DIR)/arch.mk
  2. # The install location for `make install`
  3. DEP_LOCAL ?= .
  4. DEP_PATH := $(shell pwd)/$(DEP_LOCAL)
  5. DEP_FLAGS += -g -O3 -march=nocona
  6. ifeq ($(ARCH), mac)
  7. DEP_MAC_SDK_FLAGS := -mmacosx-version-min=10.7
  8. DEP_FLAGS += $(DEP_MAC_SDK_FLAGS) -stdlib=libc++
  9. DEP_LDFLAGS += $(DEP_MAC_SDK_FLAGS) -stdlib=libc++
  10. endif
  11. DEP_CFLAGS += $(DEP_FLAGS)
  12. DEP_CXXFLAGS += $(DEP_FLAGS)
  13. # Commands
  14. WGET := wget -c
  15. UNTAR := tar xf
  16. UNZIP := unzip -o
  17. CONFIGURE := ./configure --prefix="$(DEP_PATH)"
  18. ifdef ARCH_WIN
  19. CMAKE := cmake -G 'MSYS Makefiles' -DCMAKE_INSTALL_PREFIX="$(DEP_PATH)"
  20. else
  21. CMAKE := cmake -DCMAKE_INSTALL_PREFIX="$(DEP_PATH)"
  22. endif
  23. # Some platforms try to install to lib64
  24. CMAKE += -DCMAKE_INSTALL_LIBDIR=lib
  25. ifdef ARCH_MAC
  26. SHA256SUM := shasum -a 256
  27. else
  28. SHA256SUM := sha256sum
  29. endif
  30. SHA256 := sha256check() { echo "$$2 $$1" | $(SHA256SUM) -c; }; sha256check
  31. # Export environment for all dependency targets
  32. $(DEPS): export CFLAGS = $(DEP_CFLAGS)
  33. $(DEPS): export CXXFLAGS = $(DEP_CXXFLAGS)
  34. $(DEPS): export LDFLAGS = $(DEP_LDFLAGS)
  35. dep: $(DEPS)
  36. $(DEPS): | dep_create_dir
  37. dep_create_dir:
  38. mkdir -p $(DEP_LOCAL)
  39. .PHONY: dep