-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (29 loc) · 843 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
STKDIR = $(HOME)/projects/stk
STKLIB = $(STKDIR)/src
STKINCLUDE = $(STKDIR)/include
INCLUDE = -I$(STKINCLUDE)
CPPFLAGS = $(INCLUDE) -Wall -g -D__LITTLE_ENDIAN__ -D__LINUX_ALSA__
LIB = -L$(STKLIB) -lstk
# Linux
ifeq ($(shell uname -s), Linux)
LIB += -lasound
endif
# OS X
ifeq ($(shell uname -s), Darwin)
LIB += -framework CoreAudio -framework CoreMIDI -framework CoreFoundation
endif
SRC = pianotest.cpp piano.cpp piano_coupled_strings.cpp piano_coefficients.cpp lookup_table.cpp piano_soundboard.cpp
OBJ = $(SRC:%.cpp=%.o)
all: pianotest
pianotest: $(OBJ)
$(CXX) -o $@ $^ $(LIB)
%.cpp: %.h
%.o: %.cpp
$(CXX) $(CPPFLAGS) -c -o $@ $^
.PHONY: clean run
clean:
-rm *.o *~ pianotest
run: pianotest
./pianotest &
vkeybd --channel 0 --addr `aconnect -o | grep RtMidi | head -n 1 | cut -d\ -f 2 | cut -d: -f1`:0
@-killall pianotest