Browse Source

Full static build on Linux

tags/v0.6.1
Andrew Belt 6 years ago
parent
commit
7e186b49d3
3 changed files with 25 additions and 26 deletions
  1. +5
    -13
      Makefile
  2. +0
    -2
      Rack.sh
  3. +20
    -11
      dep/Makefile

+ 5
- 13
Makefile View File

@@ -22,9 +22,11 @@ ifeq ($(ARCH), lin)
SOURCES += dep/osdialog/osdialog_gtk2.c
CFLAGS += $(shell pkg-config --cflags gtk+-2.0)
LDFLAGS += -rdynamic \
-lpthread -lGL -ldl \
-lpthread -lGL -ldl -lX11 -lasound \
$(shell pkg-config --libs gtk+-2.0) \
-Ldep/lib -lGLEW -lglfw -ljansson -lspeexdsp -lcurl -lzip -lrtaudio -lrtmidi -lcrypto -lssl
-Ldep/lib \
-Wl,-Bstatic -lglfw3 -lGLEW -ljansson -lspeexdsp -lzip -lz -lrtmidi -lrtaudio -lcurl -lssl -lcrypto \
-Wl,-Bdynamic
TARGET := Rack
endif

@@ -182,18 +184,8 @@ endif
ifeq ($(ARCH), lin)
mkdir -p dist/Rack
cp -R LICENSE* res dist/Rack/
cp $(TARGET) Rack.sh dist/Rack/
cp $(TARGET) dist/Rack/
$(STRIP) -s dist/Rack/$(TARGET)
cp dep/lib/libspeexdsp.so dist/Rack/
cp dep/lib/libjansson.so.4 dist/Rack/
cp dep/lib/libGLEW.so.2.1 dist/Rack/
cp dep/lib/libglfw.so.3 dist/Rack/
cp dep/lib/libcurl.so.4 dist/Rack/
cp dep/lib/libzip.so.5 dist/Rack/
cp dep/lib/librtaudio.so dist/Rack/
cp dep/lib/librtmidi.so.4 dist/Rack/
cp dep/lib/libssl.so.1.1 dist/Rack/
cp dep/lib/libcrypto.so.1.1 dist/Rack/
cp plugins/Fundamental/dist/Fundamental-*.zip dist/Rack/Fundamental.zip
# Make ZIP
cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip Rack


+ 0
- 2
Rack.sh View File

@@ -1,2 +0,0 @@
#!/bin/bash
LD_LIBRARY_PATH=. ./Rack

+ 20
- 11
dep/Makefile View File

@@ -7,15 +7,16 @@ RACK_DIR ?= ..
include $(RACK_DIR)/arch.mk

ifeq ($(ARCH), lin)
glew = lib/libGLEW.so
glfw = lib/libglfw.so
jansson = lib/libjansson.so
libspeexdsp = lib/libspeexdsp.so
libcurl = lib/libcurl.so
libzip = lib/libzip.so
rtmidi = lib/librtmidi.so
rtaudio = lib/librtaudio.so
openssl = lib/libssl.so
glew = lib/libGLEW.a
glfw = lib/libglfw3.a
jansson = lib/libjansson.a
libspeexdsp = lib/libspeexdsp.a
libcurl = lib/libcurl.a
libzip = lib/libzip.a
zlib = lib/libz.a
rtmidi = lib/librtmidi.a
rtaudio = lib/librtaudio.a
openssl = lib/libssl.a
endif

ifeq ($(ARCH), mac)
@@ -62,7 +63,6 @@ $(glew):

$(glfw):
cd glfw && $(CMAKE) . \
-DBUILD_SHARED_LIBS=ON \
-DGLFW_COCOA_CHDIR_RESOURCES=OFF -DGLFW_COCOA_MENUBAR=ON -DGLFW_COCOA_RETINA_FRAMEBUFFER=ON
$(MAKE) -C glfw
$(MAKE) -C glfw install
@@ -98,13 +98,20 @@ $(libcurl): $(openssl)
$(MAKE) -C curl-7.56.0
$(MAKE) -C curl-7.56.0 install

$(libzip):
$(libzip): $(zlib)
$(WGET) https://nih.at/libzip/libzip-1.2.0.tar.gz
$(UNTAR) libzip-1.2.0.tar.gz
cd libzip-1.2.0 && $(CONFIGURE)
$(MAKE) -C libzip-1.2.0
$(MAKE) -C libzip-1.2.0 install

$(zlib):
$(WGET) https://www.zlib.net/zlib-1.2.11.tar.gz
$(UNTAR) zlib-1.2.11.tar.gz
cd zlib-1.2.11 && $(CONFIGURE)
$(MAKE) -C zlib-1.2.11
$(MAKE) -C zlib-1.2.11 install

$(rtmidi):
$(WGET) https://vcvrack.com/downloads/dep/rtmidi.tgz
$(UNTAR) rtmidi.tgz
@@ -136,6 +143,8 @@ $(rtaudio):
cd rtaudio/build && $(CMAKE) $(RTAUDIO_FLAGS) ..
$(MAKE) -C rtaudio/build
$(MAKE) -C rtaudio/build install
# For some reason, it doesn't install the static library
cp rtaudio/build/librtaudio_static.a lib/librtaudio.a

$(nanovg):
cp nanovg/src/*.h include/


Loading…
Cancel
Save