-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2ec6ba
commit 2181ffa
Showing
2 changed files
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,12 @@ SOURCES += imgui/examples/libs/gl3w/GL/gl3w.c | |
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) | ||
|
||
UNAME_S := $(shell uname -s) | ||
$(info Building for ${UNAME_S}) | ||
|
||
|
||
ifeq ($(UNAME_S), Linux) #LINUX | ||
#untested - rotted now | ||
ECHO_MESSAGE = "Linux" | ||
LIBS = -lGL `pkg-config --static --libs glfw3` | ||
LIBS = -lGL -lpthread -lportmidi `pkg-config --static --libs glfw3` | ||
|
||
CXXFLAGS = -Iimgui/ -Iimgui/examples/libs/gl3w `pkg-config --cflags glfw3` | ||
CXXFLAGS += -Wall -Wformat -O2 | ||
|
@@ -47,6 +47,7 @@ all: $(EXE) | |
|
||
$(EXE): $(OBJS) $(EXE).icns Info.plist | ||
$(CXX) -o $@ $(OBJS) $(CXXFLAGS) $(LIBS) | ||
ifeq ($(UNAME_S), Darwin) #APPLE | ||
mkdir -p midi2osc.app/Contents/MacOS/ | ||
mkdir -p midi2osc.app/Contents/Resources/ | ||
cp midi2osc midi2osc.app/Contents/MacOS/ | ||
|
@@ -56,12 +57,14 @@ $(EXE): $(OBJS) $(EXE).icns Info.plist | |
-cp /usr/local/opt/portmidi/lib/libportmidi.dylib midi2osc.app/Contents/MacOS/ | ||
install_name_tool -change /usr/local/opt/glfw3/lib/libglfw3.3.dylib @executable_path/libglfw3.3.dylib midi2osc.app/Contents/MacOS/midi2osc | ||
install_name_tool -change /usr/local/opt/portmidi/lib/libportmidi.dylib @executable_path/libportmidi.dylib midi2osc.app/Contents/MacOS/midi2osc | ||
endif | ||
|
||
clean: | ||
rm -f $(EXE) $(OBJS) | ||
rm -f $(EXE).icns | ||
|
||
$(EXE).icns: $(EXE)Icon.png | ||
ifeq ($(UNAME_S), Darwin) #APPLE | ||
rm -rf $(EXE).iconset | ||
mkdir $(EXE).iconset | ||
sips -z 16 16 $(EXE)Icon.png --out $(EXE).iconset/icon_16x16.png | ||
|
@@ -74,6 +77,7 @@ $(EXE).icns: $(EXE)Icon.png | |
sips -z 512 512 $(EXE)Icon.png --out $(EXE).iconset/[email protected] | ||
sips -z 512 512 $(EXE)Icon.png --out $(EXE).iconset/icon_512x512.png | ||
sips -z 1024 1024 $(EXE)Icon.png --out $(EXE).iconset/[email protected] | ||
#cp $(EXE)Icon.png $(EXE).iconset/[email protected] | ||
cp $(EXE)Icon.png $(EXE).iconset/[email protected] | ||
iconutil -c icns -o $(EXE).icns $(EXE).iconset | ||
rm -r $(EXE).iconset | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters