-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
72 lines (56 loc) · 2.09 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
# If build rack yourself, it will be two levels up from us.
# If you are using the rack SDK and put is somewhere different,
# point to it here.
RACK_DIR ?= ../..
# Specify extra directories to search for include files.
FLAGS += -I./dsp
FLAGS += -I./composites
FLAGS += -I./util/dsp
FLAGS += -I./util/quant
FLAGS += -I./util/container
FLAGS += -I./util
FLAGS += -I./notes
FLAGS += -I./src/ctrl
FLAGS += -fdiagnostics-color=always
# Add .cpp and .c files to the build
# This says "all cpp files are in the src folder. You can add more files
# to that folder and they will get compiled and linked also.
SOURCES += $(wildcard src/*.cpp)
SOURCES += $(wildcard util/quant/*.cpp)
SOURCES += $(wildcard notes/*.cpp)
SOURCES += $(wildcard util/*.cpp)
# Macro to use on any target where we don't normally want asserts
ASSERTOFF = -D NDEBUG
# make _ASSERT=true will nullify our ASSERTOFF flag, thus allowing them
ifdef _ASSERT
ASSERTOFF =
endif
# This turns asserts off for make (plugin), not for test or perf
FLAGS += $(ASSERTOFF)
## $(TARGET) : FLAGS += -D __PLUGIN
FLAGS += -D __PLUGIN
# mac does not like this argument
ifdef ARCH_WIN
FLAGS += -fmax-errors=5
endif
# Add files to the ZIP package when running `make dist`
# The compiled plugin is automatically added.
DISTRIBUTABLES += $(wildcard LICENSE*) res presets
# Include the VCV Rack plugin Makefile framework
# This makefile from VCV has many compiler flags and command
# line variables. You should/must use this file.
include $(RACK_DIR)/plugin.mk
# ---- for ASAN on linux, just uncomment
# using the static library is a hack for getting the libraries to load.
# Trying other hacks first is a good idea. Building Rack.exe with asan is a pretty easy way
# ASAN_FLAGS = -fsanitize=address -fno-omit-frame-pointer -Wno-format-security
# FLAGS += $(ASAN_FLAGS)
# LDFLAGS += $(ASAN_FLAGS)
# CFLAGS += $(ASAN_FLAGS)
# LDFLAGS += -static-libasan
## FLAGS += -std=c++17
#CXXFLAGS := $(filter-out -std=c++11,$(CXXFLAGS))
#CXXFLAGS += -std=c++17
## change c++ version here, after others have been included
CXXFLAGS := $(filter-out -std=c++11,$(CXXFLAGS))
CXXFLAGS += -std=c++17