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.

45 lines
1.1KB

  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. SHA256 := sha256check() { echo "$$2 $$1" | shasum -a 256 -c; }; sha256check
  27. else
  28. SHA256 := sha256check() { echo "$$2 $$1" | sha256sum -c; }; sha256check
  29. endif
  30. # Export environment for all dependency targets
  31. $(DEPS): export CFLAGS = $(DEP_CFLAGS)
  32. $(DEPS): export CXXFLAGS = $(DEP_CXXFLAGS)
  33. $(DEPS): export LDFLAGS = $(DEP_LDFLAGS)
  34. dep: $(DEPS)
  35. .PHONY: dep