|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- #!/usr/bin/make -f
- # Makefile for carla-discovery #
- # ---------------------------- #
- # Created by falkTX
- #
-
- ifeq ($(WIN64),true)
- winv=64
- else
- winv=32
- endif
-
- CWD=..
- MODULENAME=carla-discovery
- include $(CWD)/Makefile.mk
-
- # ----------------------------------------------------------------------------------------------------------------------------
-
- BINDIR := $(CWD)/../bin
-
- ifeq ($(DEBUG),true)
- OBJDIR := $(CWD)/../build/discovery/Debug
- MODULEDIR := $(CWD)/../build/modules/Debug
- else
- OBJDIR := $(CWD)/../build/discovery/Release
- MODULEDIR := $(CWD)/../build/modules/Release
- endif
-
- # ----------------------------------------------------------------------------------------------------------------------------
-
- BUILD_CXX_FLAGS += -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils
-
- ifeq ($(MACOS),true)
- BUILD_CXX_FLAGS += -ObjC++
- endif
-
- 32BIT_FLAGS += -DBUILD_BRIDGE -DBUILD_BRIDGE_ALTERNATIVE_ARCH
- 64BIT_FLAGS += -DBUILD_BRIDGE -DBUILD_BRIDGE_ALTERNATIVE_ARCH
-
- # ----------------------------------------------------------------------------------------------------------------------------
-
- NATIVE_BUILD_FLAGS =
- NATIVE_LINK_FLAGS =
-
- ifeq ($(HAVE_FLUIDSYNTH),true)
- NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS)
- NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
- endif
-
- # ----------------------------------------------------------------------------------------------------------------------------
-
- LIBS_native = $(MODULEDIR)/lilv.a
- LIBS_posix32 = $(MODULEDIR)/lilv.posix32.a
- LIBS_posix64 = $(MODULEDIR)/lilv.posix64.a
- LIBS_win32 = $(MODULEDIR)/lilv.win32.a
- LIBS_win64 = $(MODULEDIR)/lilv.win64.a
- LINK_FLAGS += $(LILV_LIBS)
-
- LIBS_native += $(MODULEDIR)/water.files.a
- LINK_FLAGS += $(WATER_LIBS)
-
- LINK_FLAGS += $(LIBDL_LIBS)
-
- # ----------------------------------------------------------------------------------------------------------------------------
-
- OBJS_native = $(OBJDIR)/$(MODULENAME).cpp.o
- OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o
- OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o
- OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o
- OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o
-
- # ----------------------------------------------------------------------------------------------------------------------------
-
- all: native
-
- # ----------------------------------------------------------------------------------------------------------------------------
-
- clean:
- rm -f $(OBJDIR)/*.o $(BINDIR)/$(MODULENAME)-*
-
- debug:
- $(MAKE) DEBUG=true
-
- # ----------------------------------------------------------------------------------------------------------------------------
-
- native: $(BINDIR)/$(MODULENAME)-native$(APP_EXT)
- posix32: $(BINDIR)/$(MODULENAME)-posix32
- posix64: $(BINDIR)/$(MODULENAME)-posix64
- win32: $(BINDIR)/$(MODULENAME)-win32.exe
- win64: $(BINDIR)/$(MODULENAME)-win64.exe
-
- # ----------------------------------------------------------------------------------------------------------------------------
-
- $(BINDIR)/$(MODULENAME)-native: $(OBJS_native) $(LIBS_native)
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-native"
- @$(CXX) $< $(LIBS_START) $(LIBS_native) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@
-
- $(BINDIR)/$(MODULENAME)-native.exe: $(OBJS_native) $(LIBS_native)
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-native.exe"
- @$(CXX) $< $(LIBS_START) $(LIBS_native) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@
- @echo "Symlinking $(MODULENAME)-win$(winv).exe"
- @rm -f $(BINDIR)/$(MODULENAME)-win$(winv).exe
- @ln -s $(MODULENAME)-native.exe $(BINDIR)/$(MODULENAME)-win$(winv).exe
-
- $(BINDIR)/$(MODULENAME)-posix32: $(OBJS_posix32) $(LIBS_posix32)
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-posix32"
- @$(CXX) $< $(LIBS_START) $(LIBS_posix32) $(LIBS_END) $(LINK_FLAGS) $(32BIT_FLAGS) -o $@
-
- $(BINDIR)/$(MODULENAME)-posix64: $(OBJS_posix64) $(LIBS_posix64)
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-posix64"
- @$(CXX) $< $(LIBS_START) $(LIBS_posix64) $(LIBS_END) $(LINK_FLAGS) $(64BIT_FLAGS) -o $@
-
- $(BINDIR)/$(MODULENAME)-win32.exe: $(OBJS_win32) $(LIBS_win32)
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-win32.exe"
- @$(CXX) $< $(LIBS_START) $(LIBS_win32) $(LIBS_END) $(LINK_FLAGS) $(32BIT_FLAGS) -o $@
-
- $(BINDIR)/$(MODULENAME)-win64.exe: $(OBJS_win64) $(LIBS_win64)
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-win64.exe"
- @$(CXX) $< $(LIBS_START) $(LIBS_win64) $(LIBS_END) $(LINK_FLAGS) $(64BIT_FLAGS) -o $@
-
- # ----------------------------------------------------------------------------------------------------------------------------
-
- $(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $<"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
-
- $(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (32bit)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
-
- $(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (64bit)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
-
- # ----------------------------------------------------------------------------------------------------------------------------
-
- -include $(OBJS_native:%.o=%.d)
- -include $(OBJS_posix32:%.o=%.d)
- -include $(OBJS_posix64:%.o=%.d)
- -include $(OBJS_win32:%.o=%.d)
- -include $(OBJS_win64:%.o=%.d)
-
- # ----------------------------------------------------------------------------------------------------------------------------
|