diff --git a/Makefile b/Makefile index cc59092d..ad102ea7 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,6 @@ FLAGS += -Iinclude -Idep/include include arch.mk -SED := perl -pi -e - # Sources and build flags SOURCES += dep/nanovg/src/nanovg.c @@ -27,6 +25,7 @@ FLAGS += -fPIC LDFLAGS += -shared ifdef ARCH_LIN + SED := sed -i TARGET := libRack.so SOURCES += dep/osdialog/osdialog_gtk3.c @@ -47,6 +46,7 @@ build/dep/osdialog/osdialog_gtk3.c.o: FLAGS += $(shell pkg-config --cflags gtk+- endif ifdef ARCH_MAC + SED := sed -i '' TARGET := libRack.dylib SOURCES += dep/osdialog/osdialog_mac.m @@ -62,6 +62,7 @@ ifdef ARCH_MAC endif ifdef ARCH_WIN + SED := sed -i TARGET := libRack.dll SOURCES += dep/osdialog/osdialog_win.c diff --git a/dep.mk b/dep.mk index 306d51ea..580eb5db 100644 --- a/dep.mk +++ b/dep.mk @@ -10,7 +10,7 @@ DEP_FLAGS += -g -O3 -march=nocona # Static libs don't usually compiled with -fPIC, but since we're including them in a shared library, it's needed. DEP_FLAGS += -fPIC -ifeq ($(ARCH), mac) +ifdef ARCH_MAC 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++ @@ -35,12 +35,13 @@ CMAKE += -DCMAKE_INSTALL_LIBDIR=lib ifdef ARCH_MAC SHA256SUM := shasum -a 256 + SED := sed -i '' else SHA256SUM := sha256sum + SED := sed -i endif SHA256 := sha256check() { echo "$$2 $$1" | $(SHA256SUM) -c; }; sha256check -SED := perl -pi -e # Export environment for all dependency targets $(DEPS): export CFLAGS = $(DEP_CFLAGS)