diff --git a/dep.mk b/dep.mk index 6ad37f06..f6fa0d0f 100644 --- a/dep.mk +++ b/dep.mk @@ -2,11 +2,14 @@ include $(RACK_DIR)/arch.mk # The install location for `make install` DEP_LOCAL ?= . +DEP_PATH := $(shell pwd)/$(DEP_LOCAL) + DEP_FLAGS += -g -O3 -march=nocona ifeq ($(ARCH), mac) - DEP_FLAGS += -mmacosx-version-min=10.7 -stdlib=libc++ - DEP_LDFLAGS += -mmacosx-version-min=10.7 -stdlib=libc++ + DEP_MAC_SDK_FLAGS := -mmacosx-version-min=10.7 + DEP_FLAGS += $(DEP_MAC_SDK_FLAGS) -stdlib=libc++ + DEP_LDFLAGS += $(DEP_MAC_SDK_FLAGS) -stdlib=libc++ endif DEP_CFLAGS += $(DEP_FLAGS) @@ -16,11 +19,11 @@ DEP_CXXFLAGS += $(DEP_FLAGS) WGET := wget -c UNTAR := tar xf UNZIP := unzip -o -CONFIGURE := ./configure --prefix="$(realpath $(DEP_LOCAL))" -ifeq ($(ARCH), win) - CMAKE := cmake -G 'MSYS Makefiles' -DCMAKE_INSTALL_PREFIX="$(realpath $(DEP_LOCAL))" +CONFIGURE := ./configure --prefix="$(DEP_PATH)" +ifdef ARCH_WIN + CMAKE := cmake -G 'MSYS Makefiles' -DCMAKE_INSTALL_PREFIX="$(DEP_PATH)" else - CMAKE := cmake -DCMAKE_INSTALL_PREFIX="$(realpath $(DEP_LOCAL))" + CMAKE := cmake -DCMAKE_INSTALL_PREFIX="$(DEP_PATH)" endif # Export environment for all dependency targets