Building wjwwood/serial on other platforms then Linux
This commit is contained in:
parent
8157ba38db
commit
c43836dc6f
14
Makefile
14
Makefile
@ -18,20 +18,6 @@ include scripts/test.mk
|
||||
bin/$(Target): bin/$(os)/$(Target)
|
||||
ln -f $< $@
|
||||
|
||||
# http://www.music.mcgill.ca/~gary/rtmidi/#compiling
|
||||
bin/$(os)/rtmidi.o: lib/rtmidi/RtMidi.cpp lib/rtmidi/RtMidi.h
|
||||
@echo "CXX $@"
|
||||
@$(CXX) $< -c -O2 -o $@ $(CPPFLAGS) -std=c++20
|
||||
|
||||
bin/linux/serial/serial.o: lib/serial/src/serial.cc
|
||||
$(CXX) $^ -c -O2 -o $@ $(CPPFLAGS) -std=c++20
|
||||
|
||||
bin/linux/serial/unix.o: lib/serial/src/impl/unix.cc
|
||||
$(CXX) $^ -c -O2 -o $@ $(CPPFLAGS) -std=c++20
|
||||
|
||||
bin/linux/serial/list_ports.o: lib/serial/src/impl/list_ports/list_ports_linux.cc
|
||||
$(CXX) $^ -c -O2 -o $@ $(CPPFLAGS) -std=c++20
|
||||
|
||||
doc: Doxyfile musique/*.cc musique/*.hh
|
||||
doxygen
|
||||
|
||||
|
@ -1,5 +1,21 @@
|
||||
Release_Obj=$(addprefix bin/$(os)/,$(Obj))
|
||||
|
||||
# http://www.music.mcgill.ca/~gary/rtmidi/#compiling
|
||||
bin/$(os)/rtmidi.o: lib/rtmidi/RtMidi.cpp lib/rtmidi/RtMidi.h
|
||||
@echo "CXX $@"
|
||||
@$(CXX) $< -c -O2 -o $@ $(CPPFLAGS) -std=c++20
|
||||
|
||||
bin/$(os)/serial/serial.o: lib/serial/src/serial.cc
|
||||
$(CXX) $^ -c -O2 -o $@ $(CPPFLAGS) -std=c++20
|
||||
|
||||
bin/$(os)/serial/$(Serial_Impl).o: lib/serial/src/impl/$(Serial_Impl).cc
|
||||
$(CXX) $^ -c -O2 -o $@ $(CPPFLAGS) -std=c++20
|
||||
|
||||
bin/$(os)/serial/$(Serial_List_Ports).o: lib/serial/src/impl/list_ports/$(Serial_List_Ports).cc
|
||||
$(CXX) $^ -c -O2 -o $@ $(CPPFLAGS) -std=c++20
|
||||
|
||||
Serial_Obj=bin/$(os)/serial/serial.o bin/$(os)/serial/$(Serial_Impl).o bin/$(os)/serial/$(Serial_List_Ports).o
|
||||
|
||||
bin/$(os)/bestline.o: lib/bestline/bestline.c lib/bestline/bestline.h
|
||||
@echo "CC $@"
|
||||
@$(CC) $< -c -O3 -o $@
|
||||
@ -8,15 +24,15 @@ bin/$(os)/%.o: musique/%.cc
|
||||
@echo "CXX $@"
|
||||
@$(CXX) $(CXXFLAGS) $(RELEASE_FLAGS) $(CPPFLAGS) -o $@ $< -c
|
||||
|
||||
bin/$(os)/$(Target): $(Release_Obj) bin/$(os)/main.o bin/$(os)/rtmidi.o $(Bestline) bin/linux/serial/serial.o bin/linux/serial/unix.o bin/linux/serial/list_ports.o
|
||||
bin/$(os)/$(Target): $(Release_Obj) bin/$(os)/main.o bin/$(os)/rtmidi.o $(Bestline) $(Serial_Obj)
|
||||
@echo "CXX $@"
|
||||
@$(CXX) $(CXXFLAGS) $(RELEASE_FLAGS) $(CPPFLAGS) -o $@ $(Release_Obj) bin/$(os)/rtmidi.o $(Bestline) $(LDFLAGS) $(LDLIBS) bin/linux/serial/serial.o bin/linux/serial/unix.o bin/linux/serial/list_ports.o
|
||||
@$(CXX) $(CXXFLAGS) $(RELEASE_FLAGS) $(CPPFLAGS) -o $@ $(Release_Obj) bin/$(os)/rtmidi.o $(Bestline) $(Serial_Obj) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
Debug_Obj=$(addprefix bin/$(os)/debug/,$(Obj))
|
||||
|
||||
bin/$(os)/debug/$(Target): $(Debug_Obj) bin/$(os)/debug/main.o bin/$(os)/rtmidi.o $(Bestline) bin/linux/serial/serial.o bin/linux/serial/unix.o bin/linux/serial/list_ports.o
|
||||
bin/$(os)/debug/$(Target): $(Debug_Obj) bin/$(os)/debug/main.o bin/$(os)/rtmidi.o $(Bestline) $(Serial_Obj)
|
||||
@echo "CXX $@"
|
||||
@$(CXX) $(CXXFLAGS) $(DEBUG_FLAGS) $(CPPFLAGS) -o $@ $(Debug_Obj) bin/$(os)/rtmidi.o $(Bestline) $(LDFLAGS) $(LDLIBS) bin/linux/serial/serial.o bin/linux/serial/unix.o bin/linux/serial/list_ports.o
|
||||
@$(CXX) $(CXXFLAGS) $(DEBUG_FLAGS) $(CPPFLAGS) -o $@ $(Debug_Obj) bin/$(os)/rtmidi.o $(Bestline) $(Serial_Obj) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
bin/$(os)/debug/%.o: musique/%.cc
|
||||
@echo "CXX $@"
|
||||
|
@ -4,4 +4,6 @@ CPPFLAGS:=$(CPPFLAGS) -D __LINUX_ALSA__
|
||||
LDLIBS:=-lasound -lrt $(LDLIBS) -static-libgcc -static-libstdc++
|
||||
Bestline=bin/$(os)/bestline.o
|
||||
Target=musique
|
||||
Serial_List_Ports=list_ports_linux
|
||||
Serial_Impl=unix
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
CC=clang
|
||||
CXX=clang++
|
||||
CPPFLAGS:=$(CPPFLAGS) -D __MACOSX_CORE__
|
||||
LDLIBS:=-framework CoreMIDI -framework CoreAudio -framework CoreFoundation $(LDLIBS)
|
||||
LDLIBS:=-framework IOKit -framework CoreMIDI -framework CoreAudio -framework CoreFoundation $(LDLIBS)
|
||||
Release_Obj=$(addprefix bin/,$(Obj))
|
||||
Bestline=bin/$(os)/bestline.o
|
||||
Target=musique
|
||||
Serial_List_Ports=list_ports_osx
|
||||
Serial_Impl=unix
|
||||
|
@ -1,5 +1,7 @@
|
||||
CC=i686-w64-mingw32-gcc
|
||||
CXX=i686-w64-mingw32-g++
|
||||
CPPFLAGS:=$(CPPFLAGS) -D__WINDOWS_MM__
|
||||
LDLIBS:=-lwinmm $(LDLIBS) -static-libgcc -static-libstdc++ -static
|
||||
LDLIBS:=-lsetupapi -lhid -lwinmm $(LDLIBS) -static-libgcc -static-libstdc++ -static
|
||||
Target=musique.exe
|
||||
Serial_List_Ports=list_ports_win
|
||||
Serial_Impl=win
|
||||
|
Loading…
Reference in New Issue
Block a user