Get rid of JUCE for discovery and utils
[carla.git] / source / backend / utils / Makefile
blob727446f7579d214c4c32258b5fc3d3f288d66c69
1 #!/usr/bin/make -f
2 # Makefile for carla-plugin #
3 # ------------------------- #
4 # Created by falkTX
7 CWD=../..
8 include ../Makefile.mk
10 # ---------------------------------------------------------------------------------------------------------------------
12 BUILD_CXX_FLAGS += $(FLUIDSYNTH_FLAGS)
13 BUILD_CXX_FLAGS += $(MAGIC_LIBS)
14 BUILD_CXX_FLAGS += $(YSFX_FLAGS)
16 # FIXME remove this after getting rid of juce
17 BUILD_CXX_FLAGS += -UUSING_JUCE
19 # ---------------------------------------------------------------------------------------------------------------------
21 OBJS = \
22 $(OBJDIR)/CachedPlugins.cpp.o \
23 $(OBJDIR)/CarlaUtils.cpp.o \
24 $(OBJDIR)/Information.cpp.o \
25 $(OBJDIR)/JUCE.cpp.o \
26 $(OBJDIR)/PipeClient.cpp.o \
27 $(OBJDIR)/PluginDiscovery.cpp.o \
28 $(OBJDIR)/System.cpp.o \
29 $(OBJDIR)/Windows.cpp.o
31 TARGETS = $(BINDIR)/libcarla_utils$(LIB_EXT)
33 # ---------------------------------------------------------------------------------------------------------------------
35 LIBS = $(MODULEDIR)/jackbridge.a
36 LIBS += $(MODULEDIR)/lilv.a
37 LIBS += $(MODULEDIR)/water.files.a
39 ifeq ($(HAVE_YSFX),true)
40 LIBS += $(MODULEDIR)/ysfx.a
41 endif
43 LINK_FLAGS += $(JACKBRIDGE_LIBS)
44 LINK_FLAGS += $(LILV_LIBS)
45 LINK_FLAGS += $(WATER_LIBS)
47 ifeq ($(HAVE_X11),true)
48 LINK_FLAGS += $(X11_LIBS)
49 endif
51 ifeq ($(HAVE_YSFX),true)
52 LINK_FLAGS += $(YSFX_GRAPHICS_LIBS)
53 endif
55 ifneq ($(HAIKU),true)
56 ifneq ($(WASM),true)
57 LINK_FLAGS += -pthread
58 endif
59 endif
61 # ---------------------------------------------------------------------------------------------------------------------
63 all: $(TARGETS)
65 # ---------------------------------------------------------------------------------------------------------------------
67 clean:
68 rm -f $(OBJS) $(TARGETS)
70 debug:
71 $(MAKE) DEBUG=true
73 # ---------------------------------------------------------------------------------------------------------------------
75 $(BINDIR)/libcarla_utils$(LIB_EXT): $(OBJS) $(LIBS)
76 -@mkdir -p $(BINDIR)
77 @echo "Linking libcarla_utils$(LIB_EXT)"
78 $(SILENT)$(CXX) $(OBJS) $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_FLAGS) $(LINK_FLAGS) $(SHARED) -o $@
80 # ---------------------------------------------------------------------------------------------------------------------
82 ifeq ($(MACOS),true)
83 $(OBJDIR)/CarlaUtils.cpp.o: BUILD_CXX_FLAGS += -ObjC++
85 $(OBJDIR)/Windows.cpp.o: BUILD_CXX_FLAGS += -ObjC++
87 endif
89 $(OBJDIR)/%.cpp.o: %.cpp
90 -@mkdir -p $(OBJDIR)
91 @echo "Compiling $<"
92 $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
94 -include $(OBJS:%.o=%.d)
96 # ---------------------------------------------------------------------------------------------------------------------