From 670d22d8eeea3beff30c5683bfaa5f3271b92666 Mon Sep 17 00:00:00 2001 From: Vladimir Sadovnikov Date: Sat, 14 Sep 2024 20:34:08 +0300 Subject: [PATCH] Updated build scripts and dependencies --- CHANGELOG | 2 +- Makefile | 3 +++ make/configure.mk | 13 +++++++++++++ make/paths.mk | 6 +++++- make/system.mk | 2 ++ src/Makefile | 2 +- 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 38a4972..7a69ae8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,7 +3,7 @@ ******************************************************************************* === 1.0.22 === - +* Updated build scripts and dependencies. === 1.0.21 === * Updated build scripts and dependencies. diff --git a/Makefile b/Makefile index 7bbe2f5..9aa59ce 100644 --- a/Makefile +++ b/Makefile @@ -141,10 +141,13 @@ help: echo "Available FEATURES:" echo " clap CLAP plugin format binaries" echo " doc Generate standalone HTML documentation" + echo " gst GStreamer plugins" echo " jack Standalone JACK plugins" echo " ladspa LADSPA plugins" echo " lv2 LV2 plugins" + echo " ui Build plugins with UI" echo " vst2 VST 2.x plugin binaries" + echo " vst3 VST 3.x plugin binaries" echo " xdg Desktop integration icons" \ No newline at end of file diff --git a/make/configure.mk b/make/configure.mk index d346dd5..6be3d72 100644 --- a/make/configure.mk +++ b/make/configure.mk @@ -127,6 +127,10 @@ define _modconfig = $(if $($(name)_OBJ_TEST),, $(eval $(name)_OBJ_TEST := "$($(name)_BIN)/$($(name)_NAME)-test.o")) $(if $($(name)_MFLAGS),, $(eval $(name)_MFLAGS := $(if $(publisher),,"-D$(name)_BUILTIN -fvisibility=hidden"))) + $(if $(HOST_$(name)_NAME),, $(eval HOST_$(name)_NAME := $($(name)_NAME))) + $(if $(HOST_$(name)_DESC),, $(eval HOST_$(name)_DESC := $($(name)_DESC))) + $(if $(HOST_$(name)_URL),, $(eval HOST_$(name)_URL := $($(name)_URL$(X_URL_SUFFIX)))) + $(if $(HOST_$(name)_PATH),, $(eval HOST_$(name)_PATH := $(MODULES)/$($(name)_NAME))) $(if $(HOST_$(name)_INC),, $(eval HOST_$(name)_INC := $(HOST_$(name)_PATH)/include)) $(if $(HOST_$(name)_SRC),, $(eval HOST_$(name)_SRC := $(HOST_$(name)_PATH)/src)) @@ -164,6 +168,10 @@ define hdrconfig = $(if $($(name)_TESTING),, $(eval $(name)_TESTING := 0)) $(if $($(name)_CFLAGS),, $(eval $(name)_CFLAGS := "$(if $($(name)_INC_OPT),$($(name)_INC_OPT) ,-I )\"$($(name)_INC)\""$(if $(publisher), "-D$(name)_PUBLISHER"))) $(if $($(name)_MFLAGS),, $(eval $(name)_MFLAGS := "-D$(name)_BUILTIN -fvisibility=hidden")) + + $(if $(HOST_$(name)_NAME),, $(eval HOST_$(name)_NAME := $($(name)_NAME))) + $(if $(HOST_$(name)_DESC),, $(eval HOST_$(name)_DESC := $($(name)_DESC))) + $(if $(HOST_$(name)_URL),, $(eval HOST_$(name)_URL := $($(name)_URL$(X_URL_SUFFIX)))) $(if $(HOST_$(name)_PATH),, $(eval HOST_$(name)_PATH := $(MODULES)/$($(name)_NAME))) $(if $(HOST_$(name)_INC),, $(eval HOST_$(name)_INC := $(HOST_$(name)_PATH)/include)) @@ -192,6 +200,9 @@ define plugconfig = $(if $($(name)_OBJ_UI),, $(eval $(name)_OBJ_UI := "$($(name)_BIN)/$($(name)_NAME)-ui.o")) $(if $($(name)_OBJ_TEST),, $(eval $(name)_OBJ_TEST := "$($(name)_BIN)/$($(name)_NAME)-test.o")) $(if $($(name)_MFLAGS),, $(eval $(name)_MFLAGS := $(if $(publisher),,"-D$(name)_BUILTIN -fvisibility=hidden"))) + + $(if $(HOST_$(name)_NAME),, $(eval HOST_$(name)_NAME := $($(name)_NAME))) + $(if $(HOST_$(name)_DESC),, $(eval HOST_$(name)_DESC := $($(name)_DESC))) $(if $(HOST_$(name)_PATH),, $(eval HOST_$(name)_PATH := $(MODULES)/$($(name)_NAME))) $(if $(HOST_$(name)_INC),, $(eval HOST_$(name)_INC := $(HOST_$(name)_PATH)/include)) @@ -277,6 +288,8 @@ CONFIG_VARS = \ $(name)_OBJ_UI \ $(name)_OBJ_TEST \ \ + HOST_$(name)_NAME \ + HOST_$(name)_DESC \ HOST_$(name)_PATH \ HOST_$(name)_INC \ HOST_$(name)_SRC \ diff --git a/make/paths.mk b/make/paths.mk index 909e079..bc60eae 100644 --- a/make/paths.mk +++ b/make/paths.mk @@ -42,7 +42,11 @@ SHAREDDIR := $(PREFIX)/share INCDIR := $(PREFIX)/include BUILDDIR := $(BASEDIR)/.build TARGET_BUILDDIR := $(BUILDDIR)/target -HOST_BUILDDIR := $(BUILDDIR)/host +ifeq ($(CROSS_COMPILE),1) + HOST_BUILDDIR := $(BUILDDIR)/host +else + HOST_BUILDDIR := $(TARGET_BUILDDIR) +endif MODULES := $(BASEDIR)/modules CONFIG := $(BASEDIR)/.config.mk diff --git a/make/system.mk b/make/system.mk index 6555e5e..fd76c05 100644 --- a/make/system.mk +++ b/make/system.mk @@ -180,6 +180,7 @@ COMMON_VARS = \ ARCHITECTURE \ ARCHITECTURE_FAMILY \ ARCHITECTURE_CFLAGS \ + CROSS_COMPILE \ DEBUG \ EXECUTABLE_EXT \ EXPORT_SYMBOLS \ @@ -205,6 +206,7 @@ sysvars: echo " ARCHITECTURE_CFLAGS compiler flags to specify architecture" echo " ARCHITECTURE_FAMILY compiler flags to specify architecture family" echo " ARCHITECTURE_LDFLAGS linker flags to specify architecture" + echo " CROSS_COMPILE enable/disable cross-compilation" echo " DEBUG build with debug options" echo " DEVEL build with modules checked out for read/write URL" echo " EXECUTABLE_EXT file extension for executable files" diff --git a/src/Makefile b/src/Makefile index 0d861b5..ca28787 100644 --- a/src/Makefile +++ b/src/Makefile @@ -51,7 +51,7 @@ endif DEPENDENCIES = $(UNIQ_DEPENDENCIES) -ARTIFACT_BIN = $($(ARTIFACT_ID)_BIN) +ARTIFACT_BIN = $($(HOST)$(ARTIFACT_ID)_BIN) ARTIFACT_NAME = $($(ARTIFACT_ID)_NAME) ARTIFACT_OBJ_META = $(ARTIFACT_BIN)/$($(ARTIFACT_ID)_NAME)-meta.o ARTIFACT_OBJ_DSP = $(ARTIFACT_BIN)/$($(ARTIFACT_ID)_NAME)-dsp.o