-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
91 lines (70 loc) · 2.75 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/usr/bin/make -f
# Makefile for sassy #
# ------------------ #
# Created by falkTX
#
include Makefile.mk
DESTDIR =
PREFIX = /usr
# ---------------------------------------------------------------------------------------------------------------------
BUILD_CXX_FLAGS += -Isrc/fftreal
BUILD_CXX_FLAGS += -Isrc/libsamplerate
BUILD_CXX_FLAGS += -Isrc/ocornut_imgui
BUILD_CXX_FLAGS += -Isrc/ocornut_imgui/backends
BUILD_CXX_FLAGS += -Isrc/rtmidi
BUILD_CXX_FLAGS += -Isrc/tinyfiledialogs
BUILD_CXX_FLAGS += -Wno-shadow
BUILD_CXX_FLAGS += -Wno-unused-parameter
BUILD_CXX_FLAGS += $(shell pkg-config --cflags sdl2) -pthread
LINK_FLAGS += $(shell pkg-config --libs sdl2) -pthread
ifeq ($(MACOS),true)
BUILD_CXX_FLAGS += -D__MACOSX_CORE__
LINK_FLAGS += -framework CoreMIDI
else ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -D__WINDOWS_MM__
LINK_FLAGS += -lwinmm
else
BUILD_CXX_FLAGS += -D__LINUX_ALSA__
BUILD_CXX_FLAGS += $(shell pkg-config --cflags alsa gl) -pthread
LINK_FLAGS += $(shell pkg-config --libs alsa gl) -pthread
endif
# ---------------------------------------------------------------------------------------------------------------------
FILES = src/sassy.cpp
FILES += src/akwfdata.c
FILES += src/well512.cpp
FILES += src/ayumi/ayumi.c
FILES += src/klatt/darray.cpp
FILES += src/klatt/klatt.cpp
FILES += src/klatt/resonator.cpp
FILES += src/klatt/tts.cpp
FILES += src/padsynth/PADsynth.cpp
FILES += src/rtmidi/RtMidi.cpp
FILES += src/stb/stb_vorbis.c
FILES += src/tinyfiledialogs/tinyfiledialogs.c
FILES += $(wildcard src/eval_impl_*.cpp)
FILES += $(wildcard src/sassy_*.cpp)
FILES += $(wildcard src/libsamplerate/*.c)
FILES += $(wildcard src/ocornut_imgui/*.cpp)
FILES += $(wildcard src/ocornut_imgui/backends/*.cpp)
OBJS = $(FILES:%=build-tmp/%.o)
# ---------------------------------------------------------------------------------------------------------------------
all: sassy$(APP_EXT)
clean:
rm -f $(OBJS)
rm -rf build-tmp
# ---------------------------------------------------------------------------------------------------------------------
sassy$(APP_EXT): $(OBJS)
@echo "Linking $@"
$(SILENT)$(CXX) $^ $(LINK_FLAGS) -o $@
# ---------------------------------------------------------------------------------------------------------------------
build-tmp/%.c.o: %.c
-@mkdir -p $(shell dirname $@)
@echo "Compiling $<"
$(SILENT)$(CC) $< $(BUILD_C_FLAGS) -c -o $@
build-tmp/%.cpp.o: %.cpp
-@mkdir -p $(shell dirname $@)
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
# ---------------------------------------------------------------------------------------------------------------------
-include $(OBJS:%.o=%.d)
# ---------------------------------------------------------------------------------------------------------------------