diff --git a/Makefile b/Makefile index 4d8efafee..e03e66e2c 100644 --- a/Makefile +++ b/Makefile @@ -49,10 +49,10 @@ ALL_LIBS = $(MODULEDIR)/carla_engine.a ALL_LIBS += $(MODULEDIR)/carla_engine_plugin.a ALL_LIBS += $(MODULEDIR)/carla_plugin.a ALL_LIBS += $(MODULEDIR)/jackbridge.a +ALL_LIBS += $(MODULEDIR)/juce_audio_basics.a +ALL_LIBS += $(MODULEDIR)/juce_audio_formats.a +ALL_LIBS += $(MODULEDIR)/juce_core.a -# ALL_LIBS += $(MODULEDIR)/juce_audio_basics.a -# ALL_LIBS += $(MODULEDIR)/juce_audio_formats.a -# ALL_LIBS += $(MODULEDIR)/juce_core.a # ALL_LIBS += $(MODULEDIR)/lilv.a # ALL_LIBS += $(MODULEDIR)/native-plugins.a # ALL_LIBS += $(MODULEDIR)/rtmempool.a @@ -83,49 +83,45 @@ ALL_LIBS += $(MODULEDIR)/jackbridge.a libs: $(ALL_LIBS) $(MODULEDIR)/carla_engine.a: .FORCE - @echo "Building CarlaEngine" @$(MAKE) -C source/backend/engine $(MODULEDIR)/carla_engine_plugin.a: $(MODULEDIR)/carla_engine.a .FORCE - @echo "Building CarlaEnginePlugin" @$(MAKE) -C source/backend/engine $(MODULEDIR)/carla_plugin.a: .FORCE - @echo "Building CarlaPlugin" @$(MAKE) -C source/backend/plugin $(MODULEDIR)/%.qt4.a: .FORCE - $(MAKE) -C source/modules/$* qt4 + @$(MAKE) -C source/modules/$* qt4 $(MODULEDIR)/%.qt5.a: .FORCE - $(MAKE) -C source/modules/$* qt5 + @$(MAKE) -C source/modules/$* qt5 $(MODULEDIR)/%.posix32.a: .FORCE - $(MAKE) -C source/modules/$* posix32 + @$(MAKE) -C source/modules/$* posix32 $(MODULEDIR)/%.posix32e.a: .FORCE - $(MAKE) -C source/modules/$* posix32e + @$(MAKE) -C source/modules/$* posix32e $(MODULEDIR)/%.posix64.a: .FORCE - $(MAKE) -C source/modules/$* posix64 + @$(MAKE) -C source/modules/$* posix64 $(MODULEDIR)/%.posix64e.a: .FORCE - $(MAKE) -C source/modules/$* posix64e + @$(MAKE) -C source/modules/$* posix64e $(MODULEDIR)/%.win32.a: .FORCE - $(MAKE) -C source/modules/$* win32 + @$(MAKE) -C source/modules/$* win32 $(MODULEDIR)/%.win32e.a: .FORCE - $(MAKE) -C source/modules/$* win32e + @$(MAKE) -C source/modules/$* win32e $(MODULEDIR)/%.win64.a: .FORCE - $(MAKE) -C source/modules/$* win64 + @$(MAKE) -C source/modules/$* win64 $(MODULEDIR)/%.win64e.a: .FORCE - $(MAKE) -C source/modules/$* win64e + @$(MAKE) -C source/modules/$* win64e $(MODULEDIR)/%.a: .FORCE - @echo "Building $*" @$(MAKE) -C source/modules/$* # ---------------------------------------------------------------------------------------------------------------------------- diff --git a/source/modules/Makefile b/source/modules/Makefile index 84c5e4abb..8e0a5160f 100644 --- a/source/modules/Makefile +++ b/source/modules/Makefile @@ -4,62 +4,11 @@ # Created by falkTX # -all: - -# -------------------------------------------------------------- - -theme: - $(MAKE) -C theme - -theme.qt4: - $(MAKE) -C theme qt4 - -theme.qt5: - $(MAKE) -C theme qt5 - -# -------------------------------------------------------------- - -jackbridge: - $(MAKE) -C jackbridge - -# -------------------------------------------------------------- - -jackbridge-posix32: - $(MAKE) -C jackbridge posix32 - -jackbridge-posix64: - $(MAKE) -C jackbridge posix64 - -jackbridge-posix32e: - $(MAKE) -C jackbridge posix32e +# ---------------------------------------------------------------------------------------------------------------------------- -jackbridge-posix64e: - $(MAKE) -C jackbridge posix64e - -# -------------------------------------------------------------- - -jackbridge-win32: - $(MAKE) -C jackbridge win32 - -jackbridge-win64: - $(MAKE) -C jackbridge win64 - -jackbridge-win32e: - $(MAKE) -C jackbridge win32e - -jackbridge-win64e: - $(MAKE) -C jackbridge win64e - -jackbridge-wine32: - $(MAKE) -C jackbridge wine32 - -jackbridge-wine64: - $(MAKE) -C jackbridge wine64 - -# -------------------------------------------------------------- +all: clean: - rm -f *.a *.def *.dll *.dylib *.so $(MAKE) clean -C jackbridge $(MAKE) clean -C juce_audio_basics $(MAKE) clean -C juce_audio_devices @@ -78,10 +27,4 @@ clean: $(MAKE) clean -C rtmidi $(MAKE) clean -C theme -# -------------------------------------------------------------- - -.PHONY: \ - jackbridge lilv native-plugins rtaudio rtmempool rtmidi theme \ - juce_audio_basics juce_audio_devices juce_audio_formats juce_audio_processors juce_core juce_data_structures juce_events juce_graphics juce_gui_basics juce_gui_extra - -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- diff --git a/source/modules/Makefile.mk b/source/modules/Makefile.mk index 36398321b..8da21d69a 100644 --- a/source/modules/Makefile.mk +++ b/source/modules/Makefile.mk @@ -1,5 +1,5 @@ #!/usr/bin/make -f -# Makefile for carla-modules # +# Makefile for carla modules # # -------------------------- # # Created by falkTX # diff --git a/source/modules/jackbridge/Makefile b/source/modules/jackbridge/Makefile index 54d395073..92860a6cf 100644 --- a/source/modules/jackbridge/Makefile +++ b/source/modules/jackbridge/Makefile @@ -42,97 +42,94 @@ OBJS_win32e = $(OBJDIR)/JackBridgeExport.cpp.win32e.o # ---------------------------------------------------------------------------------------------------------------------------- -all: $(MODULEDIR)/jackbridge.a - -posix32: $(MODULEDIR)/jackbridge.posix32.a -posix64: $(MODULEDIR)/jackbridge.posix64.a -posix32e: $(MODULEDIR)/jackbridge.posix32e.a -posix64e: $(MODULEDIR)/jackbridge.posix64e.a - -win32: $(MODULEDIR)/jackbridge.win32.a -win64: $(MODULEDIR)/jackbridge.win64.a -win32e: $(MODULEDIR)/jackbridge.win32e.a -win64e: $(MODULEDIR)/jackbridge.win64e.a - -wine32: $(MODULEDIR)/jackbridge-wine32.dll$(LIB_EXT) -wine64: $(MODULEDIR)/jackbridge-wine64.dll$(LIB_EXT) +all: $(MODULEDIR)/$(MODULENAME).a +posix32: $(MODULEDIR)/$(MODULENAME).posix32.a +posix64: $(MODULEDIR)/$(MODULENAME).posix64.a +posix32e: $(MODULEDIR)/$(MODULENAME).posix32e.a +posix64e: $(MODULEDIR)/$(MODULENAME).posix64e.a +win32: $(MODULEDIR)/$(MODULENAME).win32.a +win64: $(MODULEDIR)/$(MODULENAME).win64.a +win32e: $(MODULEDIR)/$(MODULENAME).win32e.a +win64e: $(MODULEDIR)/$(MODULENAME).win64e.a +wine32: $(MODULEDIR)/$(MODULENAME)-wine32.dll$(LIB_EXT) +wine64: $(MODULEDIR)/$(MODULENAME)-wine64.dll$(LIB_EXT) # ---------------------------------------------------------------------------------------------------------------------------- clean: - rm -f $(OBJDIR)/JackBridge*.o $(MODULEDIR)/jackbridge*.* + rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.* debug: $(MAKE) DEBUG=true # ---------------------------------------------------------------------------------------------------------------------------- -$(MODULEDIR)/jackbridge.a: $(OBJS) +$(MODULEDIR)/$(MODULENAME).a: $(OBJS) -@mkdir -p $(MODULEDIR) - @echo "Creating jackbridge.a" + @echo "Creating $(MODULENAME).a" @rm -f $@ @$(AR) crs $@ $^ -$(MODULEDIR)/jackbridge.posix32.a: $(OBJS_posix32) +$(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32) -@mkdir -p $(MODULEDIR) - @echo "Creating jackbridge.posix32.a" + @echo "Creating $(MODULENAME).posix32.a" @rm -f $@ @$(AR) crs $@ $^ -$(MODULEDIR)/jackbridge.posix64.a: $(OBJS_posix64) +$(MODULEDIR)/$(MODULENAME).posix64.a: $(OBJS_posix64) -@mkdir -p $(MODULEDIR) - @echo "Creating jackbridge.posix64.a" + @echo "Creating $(MODULENAME).posix64.a" @rm -f $@ @$(AR) crs $@ $^ -$(MODULEDIR)/jackbridge.win32.a: $(OBJS_win32) +$(MODULEDIR)/$(MODULENAME).win32.a: $(OBJS_win32) -@mkdir -p $(MODULEDIR) - @echo "Creating jackbridge.win32.a" + @echo "Creating $(MODULENAME).win32.a" @rm -f $@ @$(AR) crs $@ $^ -$(MODULEDIR)/jackbridge.win64.a: $(OBJS_win64) +$(MODULEDIR)/$(MODULENAME).win64.a: $(OBJS_win64) -@mkdir -p $(MODULEDIR) - @echo "Creating jackbridge.win64.a" + @echo "Creating $(MODULENAME).win64.a" @rm -f $@ @$(AR) crs $@ $^ # ---------------------------------------------------------------------------------------------------------------------------- -$(MODULEDIR)/jackbridge.posix32e.a: $(OBJS_posix32e) +$(MODULEDIR)/$(MODULENAME).posix32e.a: $(OBJS_posix32e) -@mkdir -p $(MODULEDIR) - @echo "Creating jackbridge.posix32e.a" + @echo "Creating $(MODULENAME).posix32e.a" @rm -f $@ @$(AR) crs $@ $^ -$(MODULEDIR)/jackbridge.posix64e.a: $(OBJS_posix64e) +$(MODULEDIR)/$(MODULENAME).posix64e.a: $(OBJS_posix64e) -@mkdir -p $(MODULEDIR) - @echo "Creating jackbridge.posix64e.a" + @echo "Creating $(MODULENAME).posix64e.a" @rm -f $@ @$(AR) crs $@ $^ -$(MODULEDIR)/jackbridge.win32e.a: $(OBJS_win32e) +$(MODULEDIR)/$(MODULENAME).win32e.a: $(OBJS_win32e) -@mkdir -p $(MODULEDIR) - @echo "Creating jackbridge.win32e.a" + @echo "Creating $(MODULENAME).win32e.a" @rm -f $@ @$(AR) crs $@ $^ -$(MODULEDIR)/jackbridge.win64e.a: $(OBJS_win64e) +$(MODULEDIR)/$(MODULENAME).win64e.a: $(OBJS_win64e) -@mkdir -p $(MODULEDIR) - @echo "Creating jackbridge.win64e.a" + @echo "Creating $(MODULENAME).win64e.a" @rm -f $@ @$(AR) crs $@ $^ # ---------------------------------------------------------------------------------------------------------------------------- -$(MODULEDIR)/jackbridge-wine32.dll$(LIB_EXT): $(OBJS_wine32) JackBridgeExport.def +$(MODULEDIR)/$(MODULENAME)-wine32.dll$(LIB_EXT): $(OBJS_wine32) JackBridgeExport.def -@mkdir -p $(MODULEDIR) - @echo "Linking jackbridge-wine32.dll$(LIB_EXT)" + @echo "Linking $(MODULENAME)-wine32.dll$(LIB_EXT)" @$(WINECXX) $^ $(WINE_32BIT_FLAGS) $(WINE_LINK_FLAGS) $(SHARED) -o $@ -$(MODULEDIR)/jackbridge-wine64.dll$(LIB_EXT): $(OBJS_wine64) JackBridgeExport.def +$(MODULEDIR)/$(MODULENAME)-wine64.dll$(LIB_EXT): $(OBJS_wine64) JackBridgeExport.def -@mkdir -p $(MODULEDIR) - @echo "Linking jackbridge-wine64.dll$(LIB_EXT)" + @echo "Linking $(MODULENAME)-wine64.dll$(LIB_EXT)" @$(WINECXX) $^ $(WINE_64BIT_FLAGS) $(WINE_LINK_FLAGS) $(SHARED) -o $@ # ---------------------------------------------------------------------------------------------------------------------------- diff --git a/source/modules/juce_audio_basics/Makefile b/source/modules/juce_audio_basics/Makefile index 01a1de93d..5743cc51b 100644 --- a/source/modules/juce_audio_basics/Makefile +++ b/source/modules/juce_audio_basics/Makefile @@ -4,88 +4,122 @@ # Created by falkTX # -include ../../Makefile.mk +CWD=../.. +MODULENAME=juce_audio_basics +include ../Makefile.mk -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- -BUILD_CXX_FLAGS += $(JUCE_AUDIO_BASICS_FLAGS) -I. -w +BUILD_CXX_FLAGS += $(JUCE_AUDIO_BASICS_FLAGS) -w -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- ifeq ($(MACOS),true) -OBJS = juce_audio_basics.mm.o -OBJS_posix32 = juce_audio_basics.mm.posix32.o -OBJS_posix64 = juce_audio_basics.mm.posix64.o +OBJS = $(OBJDIR)/$(MODULENAME).mm.o +OBJS_posix32 = $(OBJDIR)/$(MODULENAME).mm.posix32.o +OBJS_posix64 = $(OBJDIR)/$(MODULENAME).mm.posix64.o else -OBJS = juce_audio_basics.cpp.o -OBJS_posix32 = juce_audio_basics.cpp.posix32.o -OBJS_posix64 = juce_audio_basics.cpp.posix64.o +OBJS = $(OBJDIR)/$(MODULENAME).cpp.o +OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o +OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o endif -OBJS_win32 = juce_audio_basics.cpp.win32.o -OBJS_win64 = juce_audio_basics.cpp.win64.o +OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o +OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- -all: ../juce_audio_basics.a -posix32: ../juce_audio_basics.posix32.a -posix64: ../juce_audio_basics.posix64.a -win32: ../juce_audio_basics.win32.a -win64: ../juce_audio_basics.win64.a +all: $(MODULEDIR)/$(MODULENAME).a +posix32: $(MODULEDIR)/$(MODULENAME).posix32.a +posix64: $(MODULEDIR)/$(MODULENAME).posix64.a +win32: $(MODULEDIR)/$(MODULENAME).win32.a +win64: $(MODULEDIR)/$(MODULENAME).win64.a -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- clean: - $(RM) *.o ../juce_audio_basics*.a + rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a debug: $(MAKE) DEBUG=true -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- + +$(MODULEDIR)/$(MODULENAME).a: $(OBJS) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).a" + @rm -f $@ + @$(AR) crs $@ $^ + +$(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).posix32.a" + @rm -f $@ + @$(AR) crs $@ $^ + +$(MODULEDIR)/$(MODULENAME).posix64.a: $(OBJS_posix64) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).posix64.a" + @rm -f $@ + @$(AR) crs $@ $^ + +$(MODULEDIR)/$(MODULENAME).win32.a: $(OBJS_win32) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).win32.a" + @rm -f $@ + @$(AR) crs $@ $^ + +$(MODULEDIR)/$(MODULENAME).win64.a: $(OBJS_win64) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).win64.a" + @rm -f $@ + @$(AR) crs $@ $^ + +# ---------------------------------------------------------------------------------------------------------------------------- + +$(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $<" + @$(CXX) $< $(BUILD_CXX_FLAGS) -MMD -c -o $@ + +$(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $< (32bit)" + @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -c -o $@ + +$(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $< (64bit)" + @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -c -o $@ + +# ---------------------------------------------------------------------------------------------------------------------------- + +$(OBJDIR)/$(MODULENAME).mm.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $<" + @$(CXX) $< $(BUILD_CXX_FLAGS) -MMD -ObjC++ -c -o $@ + +$(OBJDIR)/$(MODULENAME).mm.%32.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $< (32bit)" + @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -ObjC++ -c -o $@ + +$(OBJDIR)/$(MODULENAME).mm.%64.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $< (64bit)" + @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -ObjC++ -c -o $@ + +# ---------------------------------------------------------------------------------------------------------------------------- -../juce_audio_basics.a: $(OBJS) - $(RM) $@ - $(AR) crs $@ $^ - -../juce_audio_basics.posix32.a: $(OBJS_posix32) - $(RM) $@ - $(AR) crs $@ $^ - -../juce_audio_basics.posix64.a: $(OBJS_posix64) - $(RM) $@ - $(AR) crs $@ $^ - -../juce_audio_basics.win32.a: $(OBJS_win32) - $(RM) $@ - $(AR) crs $@ $^ - -../juce_audio_basics.win64.a: $(OBJS_win64) - $(RM) $@ - $(AR) crs $@ $^ - -# -------------------------------------------------------------- - -CPP_DEPS = juce_audio_basics.cpp juce_audio_basics.h AppConfig.h */*.cpp */*.h - -juce_audio_basics.cpp.o: $(CPP_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ - -juce_audio_basics.cpp.%32.o: $(CPP_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@ - -juce_audio_basics.cpp.%64.o: $(CPP_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@ - -# -------------------------------------------------------------- - -MM_DEPS = juce_audio_basics.cpp juce_audio_basics.h AppConfig.h */*.cpp */*.h - -juce_audio_basics.mm.o: $(MM_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@ - -juce_audio_basics.mm.%32.o: $(MM_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ $(32BIT_FLAGS) -c -o $@ - -juce_audio_basics.mm.%64.o: $(MM_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ $(64BIT_FLAGS) -c -o $@ +ifeq ($(MACOS),true) +-include $(OBJDIR)/$(MODULENAME).mm.d +-include $(OBJDIR)/$(MODULENAME).mm.posix32.d +-include $(OBJDIR)/$(MODULENAME).mm.posix64.d +else +-include $(OBJDIR)/$(MODULENAME).cpp.d +-include $(OBJDIR)/$(MODULENAME).cpp.posix32.d +-include $(OBJDIR)/$(MODULENAME).cpp.posix64.d +endif +-include $(OBJDIR)/$(MODULENAME).cpp.win32.d +-include $(OBJDIR)/$(MODULENAME).cpp.win64.d -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- diff --git a/source/modules/juce_audio_formats/Makefile b/source/modules/juce_audio_formats/Makefile index 95f6cb906..382293f54 100644 --- a/source/modules/juce_audio_formats/Makefile +++ b/source/modules/juce_audio_formats/Makefile @@ -4,88 +4,122 @@ # Created by falkTX # -include ../../Makefile.mk +CWD=../.. +MODULENAME=juce_audio_formats +include ../Makefile.mk -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- -BUILD_CXX_FLAGS += $(JUCE_AUDIO_FORMATS_FLAGS) -I. -w +BUILD_CXX_FLAGS += $(JUCE_AUDIO_FORMATS_FLAGS) -w -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- ifeq ($(MACOS),true) -OBJS = juce_audio_formats.mm.o -OBJS_posix32 = juce_audio_formats.mm.posix32.o -OBJS_posix64 = juce_audio_formats.mm.posix64.o +OBJS = $(OBJDIR)/$(MODULENAME).mm.o +OBJS_posix32 = $(OBJDIR)/$(MODULENAME).mm.posix32.o +OBJS_posix64 = $(OBJDIR)/$(MODULENAME).mm.posix64.o else -OBJS = juce_audio_formats.cpp.o -OBJS_posix32 = juce_audio_formats.cpp.posix32.o -OBJS_posix64 = juce_audio_formats.cpp.posix64.o +OBJS = $(OBJDIR)/$(MODULENAME).cpp.o +OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o +OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o endif -OBJS_win32 = juce_audio_formats.cpp.win32.o -OBJS_win64 = juce_audio_formats.cpp.win64.o +OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o +OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- -all: ../juce_audio_formats.a -posix32: ../juce_audio_formats.posix32.a -posix64: ../juce_audio_formats.posix64.a -win32: ../juce_audio_formats.win32.a -win64: ../juce_audio_formats.win64.a +all: $(MODULEDIR)/$(MODULENAME).a +posix32: $(MODULEDIR)/$(MODULENAME).posix32.a +posix64: $(MODULEDIR)/$(MODULENAME).posix64.a +win32: $(MODULEDIR)/$(MODULENAME).win32.a +win64: $(MODULEDIR)/$(MODULENAME).win64.a -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- clean: - $(RM) *.o ../juce_audio_formats*.a + rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a debug: $(MAKE) DEBUG=true -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- + +$(MODULEDIR)/$(MODULENAME).a: $(OBJS) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).a" + @rm -f $@ + @$(AR) crs $@ $^ + +$(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).posix32.a" + @rm -f $@ + @$(AR) crs $@ $^ + +$(MODULEDIR)/$(MODULENAME).posix64.a: $(OBJS_posix64) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).posix64.a" + @rm -f $@ + @$(AR) crs $@ $^ + +$(MODULEDIR)/$(MODULENAME).win32.a: $(OBJS_win32) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).win32.a" + @rm -f $@ + @$(AR) crs $@ $^ + +$(MODULEDIR)/$(MODULENAME).win64.a: $(OBJS_win64) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).win64.a" + @rm -f $@ + @$(AR) crs $@ $^ + +# ---------------------------------------------------------------------------------------------------------------------------- + +$(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $<" + @$(CXX) $< $(BUILD_CXX_FLAGS) -MMD -c -o $@ + +$(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $< (32bit)" + @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -c -o $@ + +$(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $< (64bit)" + @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -c -o $@ + +# ---------------------------------------------------------------------------------------------------------------------------- + +$(OBJDIR)/$(MODULENAME).mm.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $<" + @$(CXX) $< $(BUILD_CXX_FLAGS) -MMD -ObjC++ -c -o $@ + +$(OBJDIR)/$(MODULENAME).mm.%32.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $< (32bit)" + @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -ObjC++ -c -o $@ + +$(OBJDIR)/$(MODULENAME).mm.%64.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $< (64bit)" + @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -ObjC++ -c -o $@ + +# ---------------------------------------------------------------------------------------------------------------------------- -../juce_audio_formats.a: $(OBJS) - $(RM) $@ - $(AR) crs $@ $^ - -../juce_audio_formats.posix32.a: $(OBJS_posix32) - $(RM) $@ - $(AR) crs $@ $^ - -../juce_audio_formats.posix64.a: $(OBJS_posix64) - $(RM) $@ - $(AR) crs $@ $^ - -../juce_audio_formats.win32.a: $(OBJS_win32) - $(RM) $@ - $(AR) crs $@ $^ - -../juce_audio_formats.win64.a: $(OBJS_win64) - $(RM) $@ - $(AR) crs $@ $^ - -# -------------------------------------------------------------- - -CPP_DEPS = juce_audio_formats.cpp juce_audio_formats.h AppConfig.h */*.cpp */*.h - -juce_audio_formats.cpp.o: $(CPP_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ - -juce_audio_formats.cpp.%32.o: $(CPP_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@ - -juce_audio_formats.cpp.%64.o: $(CPP_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@ - -# -------------------------------------------------------------- - -MM_DEPS = juce_audio_formats.cpp juce_audio_formats.h AppConfig.h */*.cpp */*.h - -juce_audio_formats.mm.o: $(MM_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@ - -juce_audio_formats.mm.%32.o: $(MM_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ $(32BIT_FLAGS) -c -o $@ - -juce_audio_formats.mm.%64.o: $(MM_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ $(64BIT_FLAGS) -c -o $@ +ifeq ($(MACOS),true) +-include $(OBJDIR)/$(MODULENAME).mm.d +-include $(OBJDIR)/$(MODULENAME).mm.posix32.d +-include $(OBJDIR)/$(MODULENAME).mm.posix64.d +else +-include $(OBJDIR)/$(MODULENAME).cpp.d +-include $(OBJDIR)/$(MODULENAME).cpp.posix32.d +-include $(OBJDIR)/$(MODULENAME).cpp.posix64.d +endif +-include $(OBJDIR)/$(MODULENAME).cpp.win32.d +-include $(OBJDIR)/$(MODULENAME).cpp.win64.d -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- diff --git a/source/modules/juce_core/Makefile b/source/modules/juce_core/Makefile index cafb56911..9a343966e 100644 --- a/source/modules/juce_core/Makefile +++ b/source/modules/juce_core/Makefile @@ -4,88 +4,122 @@ # Created by falkTX # -include ../../Makefile.mk +CWD=../.. +MODULENAME=juce_core +include ../Makefile.mk -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- -BUILD_CXX_FLAGS += $(JUCE_CORE_FLAGS) -I. -w +BUILD_CXX_FLAGS += $(JUCE_CORE_FLAGS) -w -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- ifeq ($(MACOS),true) -OBJS = juce_core.mm.o -OBJS_posix32 = juce_core.mm.posix32.o -OBJS_posix64 = juce_core.mm.posix64.o +OBJS = $(OBJDIR)/$(MODULENAME).mm.o +OBJS_posix32 = $(OBJDIR)/$(MODULENAME).mm.posix32.o +OBJS_posix64 = $(OBJDIR)/$(MODULENAME).mm.posix64.o else -OBJS = juce_core.cpp.o -OBJS_posix32 = juce_core.cpp.posix32.o -OBJS_posix64 = juce_core.cpp.posix64.o +OBJS = $(OBJDIR)/$(MODULENAME).cpp.o +OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o +OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o endif -OBJS_win32 = juce_core.cpp.win32.o -OBJS_win64 = juce_core.cpp.win64.o +OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o +OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- -all: ../juce_core.a -posix32: ../juce_core.posix32.a -posix64: ../juce_core.posix64.a -win32: ../juce_core.win32.a -win64: ../juce_core.win64.a +all: $(MODULEDIR)/$(MODULENAME).a +posix32: $(MODULEDIR)/$(MODULENAME).posix32.a +posix64: $(MODULEDIR)/$(MODULENAME).posix64.a +win32: $(MODULEDIR)/$(MODULENAME).win32.a +win64: $(MODULEDIR)/$(MODULENAME).win64.a -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- clean: - $(RM) *.o ../juce_core*.a + rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a debug: $(MAKE) DEBUG=true -# -------------------------------------------------------------- +# ---------------------------------------------------------------------------------------------------------------------------- + +$(MODULEDIR)/$(MODULENAME).a: $(OBJS) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).a" + @rm -f $@ + @$(AR) crs $@ $^ + +$(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).posix32.a" + @rm -f $@ + @$(AR) crs $@ $^ + +$(MODULEDIR)/$(MODULENAME).posix64.a: $(OBJS_posix64) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).posix64.a" + @rm -f $@ + @$(AR) crs $@ $^ + +$(MODULEDIR)/$(MODULENAME).win32.a: $(OBJS_win32) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).win32.a" + @rm -f $@ + @$(AR) crs $@ $^ + +$(MODULEDIR)/$(MODULENAME).win64.a: $(OBJS_win64) + -@mkdir -p $(MODULEDIR) + @echo "Creating $(MODULENAME).win64.a" + @rm -f $@ + @$(AR) crs $@ $^ + +# ---------------------------------------------------------------------------------------------------------------------------- + +$(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $<" + @$(CXX) $< $(BUILD_CXX_FLAGS) -MMD -c -o $@ + +$(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $< (32bit)" + @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -c -o $@ + +$(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $< (64bit)" + @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -c -o $@ + +# ---------------------------------------------------------------------------------------------------------------------------- + +$(OBJDIR)/$(MODULENAME).mm.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $<" + @$(CXX) $< $(BUILD_CXX_FLAGS) -MMD -ObjC++ -c -o $@ + +$(OBJDIR)/$(MODULENAME).mm.%32.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $< (32bit)" + @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -ObjC++ -c -o $@ + +$(OBJDIR)/$(MODULENAME).mm.%64.o: $(MODULENAME).cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling $< (64bit)" + @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -ObjC++ -c -o $@ + +# ---------------------------------------------------------------------------------------------------------------------------- -../juce_core.a: $(OBJS) - $(RM) $@ - $(AR) crs $@ $^ - -../juce_core.posix32.a: $(OBJS_posix32) - $(RM) $@ - $(AR) crs $@ $^ - -../juce_core.posix64.a: $(OBJS_posix64) - $(RM) $@ - $(AR) crs $@ $^ - -../juce_core.win32.a: $(OBJS_win32) - $(RM) $@ - $(AR) crs $@ $^ - -../juce_core.win64.a: $(OBJS_win64) - $(RM) $@ - $(AR) crs $@ $^ - -# -------------------------------------------------------------- - -CPP_DEPS = juce_core.cpp juce_core.h AppConfig.h */*.cpp */*.h - -juce_core.cpp.o: $(CPP_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ - -juce_core.cpp.%32.o: $(CPP_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@ - -juce_core.cpp.%64.o: $(CPP_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@ - -# -------------------------------------------------------------- - -MM_DEPS = juce_core.cpp juce_core.h AppConfig.h */*.mm */*.cpp */*.h - -juce_core.mm.o: $(MM_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@ - -juce_core.mm.%32.o: $(MM_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ $(32BIT_FLAGS) -c -o $@ - -juce_core.mm.%64.o: $(MM_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ $(64BIT_FLAGS) -c -o $@ +ifeq ($(MACOS),true) +-include $(OBJDIR)/$(MODULENAME).mm.d +-include $(OBJDIR)/$(MODULENAME).mm.posix32.d +-include $(OBJDIR)/$(MODULENAME).mm.posix64.d +else +-include $(OBJDIR)/$(MODULENAME).cpp.d +-include $(OBJDIR)/$(MODULENAME).cpp.posix32.d +-include $(OBJDIR)/$(MODULENAME).cpp.posix64.d +endif +-include $(OBJDIR)/$(MODULENAME).cpp.win32.d +-include $(OBJDIR)/$(MODULENAME).cpp.win64.d -# -------------------------------------------------------------- +# ----------------------------------------------------------------------------------------------------------------------------