Browse Source

Added working `make dist` for Linux

tags/v0.3.0
Andrew Belt 7 years ago
parent
commit
5ef5c17ce6
1 changed files with 62 additions and 1 deletions
  1. +62
    -1
      Makefile

+ 62
- 1
Makefile View File

@@ -25,6 +25,7 @@ ifeq ($(ARCH), mac)
-framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo \ -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo \
-Ldep/lib -lGLEW -lglfw -ljansson -lsamplerate -lcurl -lzip -lportaudio -lportmidi -Ldep/lib -lGLEW -lglfw -ljansson -lsamplerate -lcurl -lzip -lportaudio -lportmidi
TARGET = Rack TARGET = Rack
BUNDLE = $(TARGET).app
endif endif


ifeq ($(ARCH), win) ifeq ($(ARCH), win)
@@ -53,10 +54,70 @@ ifeq ($(ARCH), win)
endif endif


clean: clean:
rm -rf $(TARGET) build
rm -rf $(TARGET) build dist


# For Windows resources # For Windows resources
%.res: %.rc %.res: %.rc
windres $^ -O coff -o $@ windres $^ -O coff -o $@


include compile.mk include compile.mk


dist: all
ifndef VERSION
$(error VERSION is not set.)
endif
mkdir -p dist/Rack
mkdir -p dist/Rack/plugins
cp -R LICENSE* res dist/Rack/
ifeq ($(ARCH), lin)
cp Rack Rack.sh dist/Rack/
cp dep/lib/libsamplerate.so.0 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/libportaudio.so.2 dist/Rack/
cp dep/lib/libportmidi.so dist/Rack/
cp dep/lib/libsamplerate.so.0 dist/Rack/
cp dep/lib/libsamplerate.so.0 dist/Rack/
endif
ifeq ($(ARCH), mac)
mkdir -p $(BUNDLE)/Contents
cp Info.plist $(BUNDLE)/Contents/

mkdir -p $(BUNDLE)/Contents/MacOS
cp Rack $(BUNDLE)/Contents/MacOS/

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

# cp /usr/local/opt/glew/lib/libGLEW.2.0.0.dylib $(BUNDLE)/Contents/MacOS/
# cp /usr/local/opt/jansson/lib/libjansson.4.dylib $(BUNDLE)/Contents/MacOS/
# cp /usr/local/opt/portaudio/lib/libportaudio.2.dylib $(BUNDLE)/Contents/MacOS/
# cp /usr/local/opt/portmidi/lib/libportmidi.dylib $(BUNDLE)/Contents/MacOS/
# cp /usr/local/opt/libsamplerate/lib/libsamplerate.0.dylib $(BUNDLE)/Contents/MacOS/
# cp /usr/local/opt/libzip/lib/libzip.4.dylib $(BUNDLE)/Contents/MacOS/

# install_name_tool -change /usr/local/opt/glew/lib/libGLEW.2.0.0.dylib @executable_path/libGLEW.2.0.0.dylib $(BUNDLE)/Contents/MacOS/Rack
# install_name_tool -change /usr/local/opt/jansson/lib/libjansson.4.dylib @executable_path/libjansson.4.dylib $(BUNDLE)/Contents/MacOS/Rack
# install_name_tool -change /usr/local/opt/portaudio/lib/libportaudio.2.dylib @executable_path/libportaudio.2.dylib $(BUNDLE)/Contents/MacOS/Rack
# install_name_tool -change /usr/local/opt/portmidi/lib/libportmidi.dylib @executable_path/libportmidi.dylib $(BUNDLE)/Contents/MacOS/Rack
# install_name_tool -change /usr/local/opt/libsamplerate/lib/libsamplerate.0.dylib @executable_path/libsamplerate.0.dylib $(BUNDLE)/Contents/MacOS/Rack
# install_name_tool -change /usr/local/opt/libzip/lib/libzip.4.dylib @executable_path/libzip.4.dylib $(BUNDLE)/Contents/MacOS/Rack

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

cp -R Rack.app dist/Rack/
endif
ifeq ($(ARCH), win)
# TODO Copy dlls
cp Rack/*.dll dist/Rack/
cp Rack/Rack.exe dist/Rack/
endif

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

cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip Rack

Loading…
Cancel
Save