Update CI version
[carla.git] / source / native-plugins / Makefile
blobbc010395f6002892e127d5af8aa4c8ef5c497822
1 #!/usr/bin/make -f
2 # Makefile for native-plugins #
3 # --------------------------- #
4 # Created by falkTX
7 CWD=..
8 CWDE=..
9 MODULENAME=native-plugins
10 include ../modules/Makefile.mk
12 # ---------------------------------------------------------------------------------------------------------------------
14 BUILD_C_FLAGS += -I..
15 BUILD_CXX_FLAGS += -I.. -I$(CWD)/modules
17 ifneq ($(HAIKU),true)
18 ifneq ($(WASM),true)
19 BUILD_CXX_FLAGS += -pthread
20 endif
21 endif
23 # ---------------------------------------------------------------------------------------------------------------------
24 # Set targets
26 TARGETS = $(MODULEDIR)/$(MODULENAME).a
28 BUNDLES = \
29 $(MODULEDIR)/$(MODULENAME)_audiogain.a \
30 $(MODULEDIR)/$(MODULENAME)_files.a \
31 $(MODULEDIR)/$(MODULENAME)_miditools.a
33 # ---------------------------------------------------------------------------------------------------------------------
34 # Set objects
36 OBJS = \
37 $(OBJDIR)/_all.c.o \
38 $(OBJDIR)/_data.cpp.o \
39 $(OBJDIR)/audio-gain.c.o \
40 $(OBJDIR)/bypass.c.o \
41 $(OBJDIR)/cv-to-audio.c.o \
42 $(OBJDIR)/lfo.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
59 OBJS_audiogain = \
60 $(OBJDIR)/audio-gain.c.o
62 OBJS_files = \
63 $(OBJDIR)/audio-file.cpp.o \
64 $(OBJDIR)/midi-file.cpp.o
66 OBJS_miditools = \
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
81 else
82 $(error External plugins build requested but submodule not present, cannot build)
83 endif
84 endif
86 # ---------------------------------------------------------------------------------------------------------------------
88 all: $(TARGETS)
89 bundles: $(BUNDLES)
91 # ---------------------------------------------------------------------------------------------------------------------
93 clean:
94 rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP) $(TARGETS)
96 debug:
97 $(MAKE) DEBUG=true
99 # ---------------------------------------------------------------------------------------------------------------------
101 $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
102 -@mkdir -p $(MODULEDIR)
103 @echo "Creating $(MODULENAME).a"
104 $(SILENT)rm -f $@
105 $(SILENT)$(AR) crs $@ $^
107 $(MODULEDIR)/$(MODULENAME)_audiogain.a: $(OBJS_audiogain)
108 -@mkdir -p $(MODULEDIR)
109 @echo "Creating $(MODULENAME)_audiogain.a"
110 $(SILENT)rm -f $@
111 $(SILENT)$(AR) crs $@ $^
113 $(MODULEDIR)/$(MODULENAME)_files.a: $(OBJS_files)
114 -@mkdir -p $(MODULEDIR)
115 @echo "Creating $(MODULENAME)_files.a"
116 $(SILENT)rm -f $@
117 $(SILENT)$(AR) crs $@ $^
119 $(MODULEDIR)/$(MODULENAME)_miditools.a: $(OBJS_miditools)
120 -@mkdir -p $(MODULEDIR)
121 @echo "Creating $(MODULENAME)_miditools.a"
122 $(SILENT)rm -f $@
123 $(SILENT)$(AR) crs $@ $^
125 # ---------------------------------------------------------------------------------------------------------------------
127 $(OBJDIR)/%.c.o: %.c
128 -@mkdir -p $(OBJDIR)
129 @echo "Compiling $<"
130 $(SILENT)$(CC) $< $(BUILD_C_FLAGS) -c -o $@
132 $(OBJDIR)/%.cpp.o: %.cpp
133 -@mkdir -p $(OBJDIR)
134 @echo "Compiling $<"
135 $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
137 # ---------------------------------------------------------------------------------------------------------------------
139 -include $(OBJS:%.o=%.d)
141 # ---------------------------------------------------------------------------------------------------------------------