-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (33 loc) · 1.08 KB
/
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
41
CC ?= clang
CXX ?= clang++
CXXFLAGS += -I Sources -DLINUX -DRASPBERRY -D__LINUX_ALSA__
LDFLAGS += -lrt -lpthread -lwiringPi -lasound -lpthread
ifeq ($(build),release)
CXXFLAGS += -c -O3 -w
LDFLAGS += -s
else
CXXFLAGS += -c -g2 -O0 -Wall -Wextra -pedantic -Werror
CXXFLAGS += -Wno-vla-extension -Wno-format-security -Wno-unused-function # to make Blynk compile
endif
CXXFLAGS += -I Libraries/Blynk/src -I Libraries/Blynk/linux -I Libraries/rtmidi
SOURCES = Libraries/Blynk/src/utility/BlynkDebug.cpp \
Libraries/Blynk/src/utility/BlynkHandlers.cpp \
Libraries/Blynk/src/utility/BlynkTimer.cpp \
Libraries/rtmidi/RtMidi.cpp \
\
Sources/main.cpp \
Sources/Core/Sequencer.cpp \
Sources/Core/Pattern.cpp \
Sources/Core/Note.cpp \
Sources/Blynk/BlynkApp.cpp \
Sources/Platform/MidiInterface.cpp \
Sources/Platform/MidiNote.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=sequencer
all: $(SOURCES) $(EXECUTABLE)
clean:
-rm $(OBJECTS) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CXX) $(OBJECTS) $(LDFLAGS) -o $@
.cpp.o:
$(CXX) $(CXXFLAGS) $< -o $@