2 # Makefile for native-plugins #
3 # --------------------------- #
9 MODULENAME
=native-plugins
10 include ..
/modules
/Makefile.mk
12 # ---------------------------------------------------------------------------------------------------------------------
15 BUILD_CXX_FLAGS
+= -I..
-I
$(CWD
)/modules
19 BUILD_CXX_FLAGS
+= -pthread
23 # ---------------------------------------------------------------------------------------------------------------------
26 TARGETS
= $(MODULEDIR
)/$(MODULENAME
).a
29 $(MODULEDIR
)/$(MODULENAME
)_audiogain.a \
30 $(MODULEDIR
)/$(MODULENAME
)_files.a \
31 $(MODULEDIR
)/$(MODULENAME
)_miditools.a
33 # ---------------------------------------------------------------------------------------------------------------------
38 $(OBJDIR
)/_data.
cpp.o \
39 $(OBJDIR
)/audio-gain.c.o \
40 $(OBJDIR
)/bypass.c.o \
41 $(OBJDIR
)/cv-to-audio.c.o \
43 $(OBJDIR
)/midi-channel-filter.c.o \
44 $(OBJDIR
)/midi-channel-ab.c.o \
45 $(OBJDIR
)/midi-channelize.c.o \
46 $(OBJDIR
)/midi-gain.c.o \
47 $(OBJDIR
)/midi-join.c.o \
48 $(OBJDIR
)/midi-split.c.o \
49 $(OBJDIR
)/midi-to-cv.c.o \
50 $(OBJDIR
)/midi-through.c.o \
51 $(OBJDIR
)/midi-transpose.c.o \
52 $(OBJDIR
)/audio-file.
cpp.o \
53 $(OBJDIR
)/bigmeter.
cpp.o \
54 $(OBJDIR
)/midi-file.
cpp.o \
55 $(OBJDIR
)/midi-pattern.
cpp.o \
56 $(OBJDIR
)/notes.
cpp.o \
57 $(OBJDIR
)/xycontroller.
cpp.o
60 $(OBJDIR
)/audio-gain.c.o
63 $(OBJDIR
)/audio-file.
cpp.o \
64 $(OBJDIR
)/midi-file.
cpp.o
67 $(OBJDIR
)/midi-channel-filter.c.o \
68 $(OBJDIR
)/midi-channel-ab.c.o \
69 $(OBJDIR
)/midi-channelize.c.o \
70 $(OBJDIR
)/midi-gain.c.o \
71 $(OBJDIR
)/midi-join.c.o \
72 $(OBJDIR
)/midi-split.c.o \
73 $(OBJDIR
)/midi-transpose.c.o
75 # ---------------------------------------------------------------------------------------------------------------------
76 # Include external plugins, if present
78 ifeq ($(EXTERNAL_PLUGINS
),true
)
79 ifneq (,$(wildcard external
/Makefile.mk2
))
80 include external
/Makefile.mk2
82 $(error External plugins build requested but submodule not present
, cannot build
)
86 # ---------------------------------------------------------------------------------------------------------------------
91 # ---------------------------------------------------------------------------------------------------------------------
94 rm -f
$(OBJDIR
)/*.o
$(MODULEDIR
)/$(MODULENAME
)*.a
$(ZYN_UI_FILES_H
) $(ZYN_UI_FILES_CPP
) $(TARGETS
)
99 # ---------------------------------------------------------------------------------------------------------------------
101 $(MODULEDIR
)/$(MODULENAME
).a
: $(OBJS
)
102 -@mkdir
-p
$(MODULEDIR
)
103 @echo
"Creating $(MODULENAME).a"
105 $(SILENT
)$(AR
) crs
$@
$^
107 $(MODULEDIR
)/$(MODULENAME
)_audiogain.a
: $(OBJS_audiogain
)
108 -@mkdir
-p
$(MODULEDIR
)
109 @echo
"Creating $(MODULENAME)_audiogain.a"
111 $(SILENT
)$(AR
) crs
$@
$^
113 $(MODULEDIR
)/$(MODULENAME
)_files.a
: $(OBJS_files
)
114 -@mkdir
-p
$(MODULEDIR
)
115 @echo
"Creating $(MODULENAME)_files.a"
117 $(SILENT
)$(AR
) crs
$@
$^
119 $(MODULEDIR
)/$(MODULENAME
)_miditools.a
: $(OBJS_miditools
)
120 -@mkdir
-p
$(MODULEDIR
)
121 @echo
"Creating $(MODULENAME)_miditools.a"
123 $(SILENT
)$(AR
) crs
$@
$^
125 # ---------------------------------------------------------------------------------------------------------------------
130 $(SILENT
)$(CC
) $< $(BUILD_C_FLAGS
) -c
-o
$@
132 $(OBJDIR
)/%.
cpp.o
: %.
cpp
135 $(SILENT
)$(CXX
) $< $(BUILD_CXX_FLAGS
) -c
-o
$@
137 # ---------------------------------------------------------------------------------------------------------------------
139 -include $(OBJS
:%.o
=%.d
)
141 # ---------------------------------------------------------------------------------------------------------------------