Browse Source

Make Windows build link to libstdc++ etc.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
0cfd3bc20d
2 changed files with 19 additions and 21 deletions
  1. +16
    -18
      Makefile
  2. +3
    -3
      plugin.mk

+ 16
- 18
Makefile View File

@@ -16,6 +16,17 @@ SOURCES += dep/osdialog/osdialog.c
SOURCES += $(wildcard dep/jpommier-pffft-*/pffft.c) $(wildcard dep/jpommier-pffft-*/fftpack.c)
SOURCES += $(wildcard src/*.cpp src/*/*.cpp)

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

ifdef ARCH_MAC
SOURCES += dep/osdialog/osdialog_mac.m
LDFLAGS += -lpthread -ldl \
@@ -27,26 +38,13 @@ endif

ifdef ARCH_WIN
SOURCES += dep/osdialog/osdialog_win.c
LDFLAGS += -static \
-Wl,--export-all-symbols,--out-implib,libRack.a -mwindows \
-Ldep/lib -lglew32 -lglfw3 -ljansson -lspeexdsp -lzip -lz -lcurl -lssl -lcrypto -lrtaudio -lrtmidi \
LDFLAGS += -Wl,--export-all-symbols,--out-implib,libRack.a -mwindows \
dep/lib/libglew32.a dep/lib/libglfw3.a dep/lib/libjansson.a dep/lib/libspeexdsp.a dep/lib/libzip.a dep/lib/libz.a dep/lib/libcurl.a dep/lib/libssl.a dep/lib/libcrypto.a dep/lib/librtaudio.a dep/lib/librtmidi.a \
-lpthread -lopengl32 -lgdi32 -lws2_32 -lcomdlg32 -lole32 -ldsound -lwinmm -lksuser -lshlwapi -lmfplat -lmfuuid -lwmcodecdspuuid -ldbghelp
TARGET := Rack.exe
OBJECTS += Rack.res
endif

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


# Convenience targets

all: $(TARGET)
@@ -141,9 +139,9 @@ ifdef ARCH_WIN
cp $(TARGET) dist/Rack/
$(STRIP) -s dist/Rack/$(TARGET)
cp -R LICENSE* res template.vcv dist/Rack/
# cp /mingw64/bin/libwinpthread-1.dll dist/Rack/
# cp /mingw64/bin/libstdc++-6.dll dist/Rack/
# cp /mingw64/bin/libgcc_s_seh-1.dll dist/Rack/
cp /mingw64/bin/libwinpthread-1.dll dist/Rack/
cp /mingw64/bin/libstdc++-6.dll dist/Rack/
cp /mingw64/bin/libgcc_s_seh-1.dll dist/Rack/
cp plugins/Fundamental/dist/*.zip dist/Rack/Fundamental.zip
# mkdir -p dist/Rack/Bridge
# cp Bridge/VST/dist/VCV-Bridge-{32,64,fx-32,fx-64}.dll dist/Rack/Bridge/


+ 3
- 3
plugin.mk View File

@@ -2,8 +2,8 @@ ifndef RACK_DIR
$(error RACK_DIR is not defined)
endif

SLUG := $(shell jq ".slug" plugin.json)
VERSION := $(shell jq ".version" plugin.json)
SLUG := $(shell jq .slug plugin.json)
VERSION := $(shell jq .version plugin.json)

DISTRIBUTABLES += plugin.json

@@ -27,7 +27,7 @@ endif
ifdef ARCH_WIN
LDFLAGS += -shared -L$(RACK_DIR) -lRack
TARGET := plugin.dll
RACK_USER_DIR ?= $(USERPROFILE)/Documents/Rack
RACK_USER_DIR ?= "$(USERPROFILE)"/Documents/Rack
endif




Loading…
Cancel
Save