-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (22 loc) · 906 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
CC := g++
LD := g++
CFLAGS := -c -Wall -g -fPIC
LDFLAGS := -L/usr/local/opt/libffi/lib -lffi -framework CoreMIDI -framework CoreAudio -framework CoreFoundation
SRC_DIR := src/main/c
TEST_DIR := src/test/c
BUILD_DIR := target/native/macosx/x86_64
OBJ := $(addprefix $(SRC_DIR)/, traktor/midi/tempo.o \
traktor/midi/decks.o \
traktor/midi/utils.o \
rtmidi/RtMidi.o)
INCLUDES := -I$(SRC_DIR) -I/usr/local/opt/libffi/lib/libffi-3.0.11/include
all: $(BUILD_DIR)/libtraktor_midi.dylib
$(BUILD_DIR)/libtraktor_midi.dylib: $(OBJ)
mkdir -p $(BUILD_DIR)
$(LD) $(LDFLAGS) -dynamiclib $^ -o $@
%.o: %.cpp
$(CC) $(CFLAGS) $(INCLUDES) -D__MACOSX_CORE__ $< -o $@
clean:
rm -rf $(SRC_DIR)/rtmidi/*.o \
$(SRC_DIR)/traktor/midi/*.o \
$(BUILD_DIR)