Browse Source

Add libomp to dep on MacOS. Use -Xpreprocessor flag for compiling OpenMP code

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
3c04fda563
3 changed files with 20 additions and 7 deletions
  1. +1
    -0
      .gitignore
  2. +5
    -7
      Makefile
  3. +14
    -0
      dep/Makefile

+ 1
- 0
.gitignore View File

@@ -11,3 +11,4 @@
/patches /patches
/design /design
.DS_Store .DS_Store
/dist

+ 5
- 7
Makefile View File

@@ -17,10 +17,11 @@ SOURCES += $(wildcard dep/jpommier-pffft-*/pffft.c) $(wildcard dep/jpommier-pfff
SOURCES += $(wildcard src/*.cpp src/*/*.cpp) SOURCES += $(wildcard src/*.cpp src/*/*.cpp)


ifdef ARCH_MAC ifdef ARCH_MAC
FLAGS += -Xpreprocessor -fopenmp
SOURCES += dep/osdialog/osdialog_mac.m SOURCES += dep/osdialog/osdialog_mac.m
LDFLAGS += -lpthread -ldl \ LDFLAGS += -lpthread -ldl \
-framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -framework CoreAudio -framework CoreMIDI \ -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -framework CoreAudio -framework CoreMIDI \
-Ldep/lib dep/lib/libglfw3.a dep/lib/libGLEW.a dep/lib/libjansson.a dep/lib/libspeexdsp.a dep/lib/libzip.a dep/lib/libz.a dep/lib/librtaudio.a dep/lib/librtmidi.a dep/lib/libcrypto.a dep/lib/libssl.a dep/lib/libcurl.a
-Ldep/lib dep/lib/libglfw3.a dep/lib/libGLEW.a dep/lib/libjansson.a dep/lib/libspeexdsp.a dep/lib/libzip.a dep/lib/libz.a dep/lib/librtaudio.a dep/lib/librtmidi.a dep/lib/libcrypto.a dep/lib/libssl.a dep/lib/libcurl.a dep/lib/libomp.a
TARGET := Rack TARGET := Rack
BUNDLE := dist/$(TARGET).app BUNDLE := dist/$(TARGET).app
endif endif
@@ -98,9 +99,6 @@ dist: all
rm -rf dist rm -rf dist
mkdir -p dist mkdir -p dist


@# Rack
$(MAKE) -C plugins/Fundamental dist

ifdef ARCH_MAC ifdef ARCH_MAC
mkdir -p $(BUNDLE) mkdir -p $(BUNDLE)
mkdir -p $(BUNDLE)/Contents mkdir -p $(BUNDLE)/Contents
@@ -115,7 +113,7 @@ ifdef ARCH_MAC


otool -L $(BUNDLE)/Contents/MacOS/$(TARGET) otool -L $(BUNDLE)/Contents/MacOS/$(TARGET)


cp plugins/Fundamental/dist/Fundamental-*.zip $(BUNDLE)/Contents/Resources/Fundamental.zip
cp Fundamental-*.zip $(BUNDLE)/Contents/Resources/Fundamental.zip
cp -R Bridge/AU/dist/VCV-Bridge.component dist/ cp -R Bridge/AU/dist/VCV-Bridge.component dist/
cp -R Bridge/VST/dist/VCV-Bridge.vst dist/ cp -R Bridge/VST/dist/VCV-Bridge.vst dist/
cp -R Bridge/VST/dist/VCV-Bridge-fx.vst dist/ cp -R Bridge/VST/dist/VCV-Bridge-fx.vst dist/
@@ -135,7 +133,7 @@ ifdef ARCH_WIN
cp /mingw64/bin/libwinpthread-1.dll dist/Rack/ cp /mingw64/bin/libwinpthread-1.dll dist/Rack/
cp /mingw64/bin/libstdc++-6.dll dist/Rack/ cp /mingw64/bin/libstdc++-6.dll dist/Rack/
cp /mingw64/bin/libgcc_s_seh-1.dll dist/Rack/ cp /mingw64/bin/libgcc_s_seh-1.dll dist/Rack/
cp plugins/Fundamental/dist/Fundamental-*.zip dist/Rack/Fundamental.zip
cp Fundamental-*.zip dist/Rack/Fundamental.zip
@# Make ZIP @# Make ZIP
cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip Rack cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip Rack
@# Make NSIS installer @# Make NSIS installer
@@ -150,7 +148,7 @@ ifdef ARCH_LIN
cp $(TARGET) dist/Rack/ cp $(TARGET) dist/Rack/
$(STRIP) -s dist/Rack/$(TARGET) $(STRIP) -s dist/Rack/$(TARGET)
ldd dist/Rack/$(TARGET) ldd dist/Rack/$(TARGET)
cp plugins/Fundamental/dist/Fundamental-*.zip dist/Rack/Fundamental.zip
cp Fundamental-*.zip dist/Rack/Fundamental.zip
@# Make ZIP @# Make ZIP
cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip Rack cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip Rack
endif endif


+ 14
- 0
dep/Makefile View File

@@ -30,6 +30,7 @@ ifdef ARCH_MAC
rtmidi = lib/librtmidi.a rtmidi = lib/librtmidi.a
rtaudio = lib/librtaudio.a rtaudio = lib/librtaudio.a
openssl = lib/libssl.a openssl = lib/libssl.a
libomp = lib/libomp.a
endif endif


ifdef ARCH_WIN ifdef ARCH_WIN
@@ -52,6 +53,10 @@ osdialog = include/osdialog.h
pffft = include/pffft.h pffft = include/pffft.h


DEPS += $(glew) $(glfw) $(jansson) $(libspeexdsp) $(libcurl) $(libzip) $(rtmidi) $(rtaudio) $(nanovg) $(nanosvg) $(oui-blendish) $(osdialog) $(pffft) DEPS += $(glew) $(glfw) $(jansson) $(libspeexdsp) $(libcurl) $(libzip) $(rtmidi) $(rtaudio) $(nanovg) $(nanosvg) $(oui-blendish) $(osdialog) $(pffft)
ifdef ARCH_MAC
DEPS += $(libomp)
endif

include $(RACK_DIR)/dep.mk include $(RACK_DIR)/dep.mk




@@ -174,6 +179,15 @@ $(pffft):
$(UNZIP) 29e4f76ac53b.zip $(UNZIP) 29e4f76ac53b.zip
cp jpommier-pffft-29e4f76ac53b/*.h include/ cp jpommier-pffft-29e4f76ac53b/*.h include/


$(libomp):
$(WGET) "https://releases.llvm.org/7.0.1/openmp-7.0.1.src.tar.xz"
$(SHA256) openmp-7.0.1.src.tar.xz bf16b78a678da67d68405214ec7ee59d86a15f599855806192a75dcfca9b0d0c
$(UNTAR) openmp-7.0.1.src.tar.xz
cd openmp-7.0.1.src && mkdir -p build
cd openmp-7.0.1.src/build && $(CMAKE) .. -DLIBOMP_ENABLE_SHARED=OFF
$(MAKE) -C openmp-7.0.1.src/build
$(MAKE) -C openmp-7.0.1.src/build install

clean: clean:
git clean -fdx git clean -fdx
git submodule foreach git clean -fdx git submodule foreach git clean -fdx

Loading…
Cancel
Save