-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated module versions in dependencies.
- Loading branch information
Showing
32 changed files
with
3,753 additions
and
1,144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# | ||
# Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
# (C) 2020 Vladimir Sadovnikov <[email protected]> | ||
# Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
# (C) 2024 Vladimir Sadovnikov <[email protected]> | ||
# | ||
# This file is part of lsp-plugin-shared | ||
# | ||
|
@@ -21,45 +21,35 @@ ifneq ($(VERBOSE),1) | |
.SILENT: | ||
endif | ||
|
||
# Definitions | ||
PREFIX := /usr/local | ||
LIBDIR := $(PREFIX)/lib | ||
BINDIR := $(PREFIX)/bin | ||
SHAREDDIR := $(PREFIX)/share | ||
INCDIR := $(PREFIX)/include | ||
ETCDIR := /etc | ||
BASEDIR := $(CURDIR) | ||
ROOTDIR := $(CURDIR) | ||
BUILDDIR := $(BASEDIR)/.build | ||
TARGET_BUILDDIR := $(BUILDDIR)/target | ||
HOST_BUILDDIR := $(BUILDDIR)/host | ||
MODULES := $(BASEDIR)/modules | ||
CONFIG := $(BASEDIR)/.config.mk | ||
TEST := 0 | ||
DEBUG := 0 | ||
PROFILE := 0 | ||
TRACE := 0 | ||
|
||
ifeq ($(DEVEL),1) | ||
X_URL_SUFFIX = _RW | ||
else | ||
X_URL_SUFFIX = _RO | ||
endif | ||
|
||
# Configure system settings | ||
include $(BASEDIR)/project.mk | ||
include $(BASEDIR)/make/functions.mk | ||
include $(BASEDIR)/make/system.mk | ||
include $(BASEDIR)/make/paths.mk | ||
include $(BASEDIR)/make/tools.mk | ||
include $(BASEDIR)/modules.mk | ||
include $(BASEDIR)/dependencies.mk | ||
|
||
ifeq ($(DEVEL),1) | ||
X_URL_SUFFIX = _RW | ||
else | ||
X_URL_SUFFIX = _RO | ||
endif | ||
|
||
# Compute the full list of dependencies | ||
MERGED_DEPENDENCIES := \ | ||
$(DEPENDENCIES) \ | ||
$(TEST_DEPENDENCIES) | ||
UNIQ_MERGED_DEPENDENCIES := $(call uniq, $(MERGED_DEPENDENCIES)) | ||
DEPENDENCIES = $(UNIQ_MERGED_DEPENDENCIES) | ||
FEATURES := $(call uniq, $(call subtraction,$(SUB_FEATURES),$(DEFAULT_FEATURES) $(ADD_FEATURES))) | ||
FEATURES := $(sort $(call subtraction,$(SUB_FEATURES),$(DEFAULT_FEATURES) $(ADD_FEATURES))) | ||
|
||
# Determine versions | ||
ifeq ($(findstring -devel,$(ARTIFACT_VERSION)),-devel) | ||
|
@@ -127,19 +117,23 @@ define _modconfig = | |
$(if $($(name)_TEST),, $(eval $(name)_TEST := $($(name)_PATH)/test)) | ||
$(if $($(name)_TESTING),, $(eval $(name)_TESTING := 0)) | ||
$(if $($(name)_BIN),, $(eval $(name)_BIN := $(TARGET_BUILDDIR)/$($(name)_NAME))) | ||
$(if $($(name)_CFLAGS),, $(eval $(name)_CFLAGS := "-I\"$($(name)_INC)\"" -D$(name)_BUILTIN$(if $(publisher), -D$(name)_PUBLISHER))) | ||
$(if $($(name)_CFLAGS),, $(eval $(name)_CFLAGS := "$(if $($(name)_INC_OPT),$($(name)_INC_OPT) ,-I )\"$($(name)_INC)\"" -D$(name)_BUILTIN$(if $(publisher), -D$(name)_PUBLISHER))) | ||
$(if $($(name)_LDLAGS),, $(eval $(name)_LDFLAGS :=)) | ||
$(if $($(name)_OBJ),, $(eval $(name)_OBJ := "$($(name)_BIN)/$($(name)_NAME).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)_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)) | ||
$(if $(HOST_$(name)_TEST),, $(eval HOST_$(name)_TEST := $(HOST_$(name)_PATH)/test)) | ||
$(if $(HOST_$(name)_TESTING),, $(eval HOST_$(name)_TESTING := 0)) | ||
$(if $(HOST_$(name)_BIN),, $(eval HOST_$(name)_BIN := $(HOST_BUILDDIR)/$($(name)_NAME))) | ||
$(if $(HOST_$(name)_CFLAGS),, $(eval HOST_$(name)_CFLAGS := "-I\"$($(name)_INC)\"" -D$(name)_BUILTIN$(if $(publisher), -D$(name)_PUBLISHER))) | ||
$(if $(HOST_$(name)_CFLAGS),, $(eval HOST_$(name)_CFLAGS := "$(if $($(name)_INC_OPT),$($(name)_INC_OPT) ,-I )\"$($(name)_INC)\"" -D$(name)_BUILTIN$(if $(publisher), -D$(name)_PUBLISHER))) | ||
$(if $(HOST_$(name)_LDLAGS),, $(eval HOST_$(name)_LDFLAGS :=)) | ||
$(if $(HOST_$(name)_OBJ),, $(eval HOST_$(name)_OBJ := "$(HOST_$(name)_BIN)/$($(name)_NAME).o")) | ||
$(if $(HOST_$(name)_OBJ_TEST),,$(eval HOST_$(name)_OBJ_TEST:= "$(HOST_$(name)_BIN)/$($(name)_NAME)-test.o")) | ||
|
@@ -168,13 +162,17 @@ define hdrconfig = | |
$(if $($(name)_PATH),, $(eval $(name)_PATH := $(MODULES)/$($(name)_NAME))) | ||
$(if $($(name)_INC),, $(eval $(name)_INC := $($(name)_PATH)/include)) | ||
$(if $($(name)_TESTING),, $(eval $(name)_TESTING := 0)) | ||
$(if $($(name)_CFLAGS),, $(eval $(name)_CFLAGS := "-I\"$($(name)_INC)\""$(if $(publisher), "-D$(name)_PUBLISHER"))) | ||
$(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)) | ||
$(if $(HOST_$(name)_TESTING),, $(eval HOST_$(name)_TESTING := 0)) | ||
$(if $(HOST_$(name)_CFLAGS),, $(eval HOST_$(name)_CFLAGS := "-I\"$(HOST_$(name)_INC)\""$(if $(publisher), "-D$(name)_PUBLISHER"))) | ||
$(if $(HOST_$(name)_CFLAGS),, $(eval HOST_$(name)_CFLAGS := "$(if $($(name)_INC_OPT),$($(name)_INC_OPT) ,-I )\"$(HOST_$(name)_INC)\""$(if $(publisher), "-D$(name)_PUBLISHER"))) | ||
$(if $(HOST_$(name)_MFLAGS),, $(eval HOST_$(name)_MFLAGS := "-D$(name)_BUILTIN -fvisibility=hidden")) | ||
endef | ||
|
||
|
@@ -220,6 +218,7 @@ OVERALL_DEPS := $(call uniq,$(DEPENDENCIES) $(ARTIFACT_ID)) | |
__tmp := $(foreach dep,$(OVERALL_DEPS),$(call vardef, $(dep))) | ||
|
||
CONFIG_VARS = \ | ||
$(PATH_VARS) \ | ||
$(COMMON_VARS) \ | ||
$(TOOL_VARS) \ | ||
$(foreach name, $(OVERALL_DEPS), \ | ||
|
@@ -242,6 +241,8 @@ CONFIG_VARS = \ | |
$(name)_OBJ \ | ||
$(name)_OBJ_TEST \ | ||
\ | ||
HOST_$(name)_NAME \ | ||
HOST_$(name)_DESC \ | ||
HOST_$(name)_PATH \ | ||
HOST_$(name)_INC \ | ||
HOST_$(name)_SRC \ | ||
|
@@ -267,11 +268,12 @@ $(CONFIG_VARS): prepare | |
echo "$(@)=$($(@))" >> "$(CONFIG)" | ||
|
||
config: $(CONFIG_VARS) | ||
echo "Architecture: $(ARCHITECTURE_FAMILY)/$(ARCHITECTURE) ($(ARCHITECTURE_CFLAGS))" | ||
echo "Features: $(FEATURES)" | ||
echo "Host architecture: $(HOST_ARCHITECTURE_FAMILY)/$(HOST_ARCHITECTURE) ($(HOST_ARCHITECTURE_CFLAGS))" | ||
echo "Architecture: $(ARCHITECTURE_FAMILY)/$(ARCHITECTURE) ($(ARCHITECTURE_CFLAGS))" | ||
echo "Features: $(FEATURES)" | ||
echo "Configured OK" | ||
|
||
help: | toolvars sysvars | ||
help: | pathvars toolvars sysvars | ||
echo "" | ||
echo "List of variables for each dependency:" | ||
echo " <ARTIFACT>_BIN location to put all binaries when building artifact" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# | ||
# Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
# (C) 2020 Vladimir Sadovnikov <[email protected]> | ||
# Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
# (C) 2024 Vladimir Sadovnikov <[email protected]> | ||
# | ||
# This file is part of lsp-plugin-shared | ||
# | ||
|
@@ -45,15 +45,25 @@ cquery = $(foreach d,$(call uniq, $3),$(if $($(d)_$(strip $1)), | |
|
||
# Find intersection between two sets | ||
# $(call intersection, list1, list2) | ||
intersection = $(foreach v,$1,$(if $(findstring $(v),$2),$(v))) | ||
intersection = $(sort $(foreach v,$1,$(if $(findstring $(v),$2),$(v)))) | ||
|
||
# Subtract the first set from second set | ||
# $(call subtraction, list1, list2) | ||
subtraction = $(foreach v,$2,$(if $(findstring $(v),$1),,$(v))) | ||
subtraction = $(sort $(foreach v,$2,$(if $(findstring $(v),$1),,$(v)))) | ||
|
||
# Check feature presence in list | ||
# $(call fcheck, features-to-check, all-feature-list, action-if-enabled, action-if-disabled) | ||
fcheck = $(if $(call intersection,$1,$2),$3,$4) | ||
|
||
# Fetch different versions from version string | ||
# $(call vmajor, <version-string>) | ||
vmajor = $(shell echo "$(strip $1)" | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)(-(.*))?/\1/') | ||
vminor = $(shell echo "$(strip $1)" | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)(-(.*))?/\2/') | ||
vmicro = $(shell echo "$(strip $1)" | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)(-(.*))?/\3/') | ||
vbranch = $(shell echo "$(strip $1)" | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)(-(.*))?/\5/') | ||
|
||
ifeq ("$(MSYSTEM)","") | ||
pathconv = $1 | ||
else | ||
pathconv = $(shell cygpath -w "$1") | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# | ||
# Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
# (C) 2020 Vladimir Sadovnikov <[email protected]> | ||
# Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
# (C) 2024 Vladimir Sadovnikov <[email protected]> | ||
# | ||
# This file is part of lsp-plugin-shared | ||
# | ||
|
@@ -45,9 +45,15 @@ UNIQ_ALL_DEPENDENCIES := $(filter-out $(ARTIFACT_ID),$(call uniq, $(ALL_DEP | |
MODULES ?= $(BASEDIR)/modules | ||
GIT ?= git | ||
|
||
ifeq ($(DEVEL),1) | ||
X_URL_SUFFIX = _RW | ||
else | ||
X_URL_SUFFIX = _RO | ||
endif | ||
|
||
ifeq ($(TREE),1) | ||
$(foreach dep,$(UNIQ_ALL_DEPENDENCIES), \ | ||
$(eval $(dep)_URL=$($(dep)_URL_RO)) \ | ||
$(eval $(dep)_URL=$($(dep)_URL$(X_URL_SUFFIX))) \ | ||
) | ||
|
||
ifeq ($(findstring -devel,$(ARTIFACT_VERSION)),-devel) | ||
|
@@ -80,10 +86,15 @@ $(ALL_SRC_MODULES) $(ALL_HDR_MODULES): | |
$(GIT) -C "$($(@)_PATH)" reset --hard | ||
$(GIT) -C "$($(@)_PATH)" fetch origin --force --prune --prune-tags | ||
$(GIT) -C "$($(@)_PATH)" fetch origin 'refs/tags/*:refs/tags/*' --force | ||
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout -B "$($(@)_BRANCH)" "origin/$($(@)_BRANCH)" || \ | ||
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout "refs/tags/$($(@)_BRANCH)" || \ | ||
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout -B "$($(@)_NAME)-$($(@)_BRANCH)" "origin/$($(@)_NAME)-$($(@)_BRANCH)" || \ | ||
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout "refs/tags/$($(@)_NAME)-$($(@)_BRANCH)" | ||
if $(GIT) -C "$($(@)_PATH)" rev-parse -q --verify "origin/$($(@)_BRANCH)" >/dev/null; then \ | ||
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout -B "$($(@)_BRANCH)" "origin/$($(@)_BRANCH)" >/dev/null; \ | ||
elif $(GIT) -C "$($(@)_PATH)" rev-parse -q --verify "refs/tags/$($(@)_BRANCH)" >/dev/null; then \ | ||
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout "refs/tags/$($(@)_BRANCH)"; \ | ||
elif $(GIT) -C "$($(@)_PATH)" rev-parse -q --verify "origin/$($(@)_NAME)-$($(@)_BRANCH)" >/dev/null; then \ | ||
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout -B "$($(@)_NAME)-$($(@)_BRANCH)" "origin/$($(@)_NAME)-$($(@)_BRANCH)"; \ | ||
else \ | ||
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout "refs/tags/$($(@)_NAME)-$($(@)_BRANCH)"; \ | ||
fi | ||
|
||
fetch: $(SRC_MODULES) $(HDR_MODULES) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# | ||
# Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
# (C) 2024 Vladimir Sadovnikov <[email protected]> | ||
# | ||
# This file is part of lsp-plugin-shared | ||
# | ||
# lsp-plugin-shared is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# any later version. | ||
# | ||
# lsp-plugin-shared is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with lsp-plugin-shared. If not, see <https://www.gnu.org/licenses/>. | ||
# | ||
|
||
# Installation prefix | ||
ifndef PREFIX | ||
ifeq ($(PLATFORM),Windows) | ||
PREFIX := $(BASEDIR)/INSTALL | ||
else ifeq ($(CROSS_COMPILE),1) | ||
PREFIX := $(BASEDIR)/INSTALL | ||
else | ||
PREFIX := /usr/local | ||
endif | ||
endif | ||
|
||
# Path to configuration | ||
ifndef ETCDIR | ||
ifeq ($(PLATFORM),Windows) | ||
ETCDIR := $(PREFIX)/etc | ||
else | ||
ETCDIR := /etc | ||
endif | ||
endif | ||
|
||
LIBDIR := $(PREFIX)/lib | ||
BINDIR := $(PREFIX)/bin | ||
INCDIR := $(PREFIX)/include | ||
BUILDDIR := $(BASEDIR)/.build | ||
TARGET_BUILDDIR := $(BUILDDIR)/target | ||
ifeq ($(CROSS_COMPILE),1) | ||
HOST_BUILDDIR := $(BUILDDIR)/host | ||
else | ||
HOST_BUILDDIR := $(TARGET_BUILDDIR) | ||
endif | ||
MODULES := $(BASEDIR)/modules | ||
CONFIG := $(BASEDIR)/.config.mk | ||
|
||
# Library prefix | ||
ifndef LIBDIR | ||
LIBDIR := $(PREFIX)/lib | ||
endif | ||
|
||
# Binaries prefix | ||
ifndef BINDIR | ||
BINDIR := $(PREFIX)/bin | ||
endif | ||
|
||
# Binaries prefix | ||
ifndef INCDIR | ||
INCDIR := $(PREFIX)/include | ||
endif | ||
|
||
# Shared resources | ||
ifndef SHAREDDIR | ||
ifeq ($(PLATFORM),Haiku) | ||
SHAREDDIR := $(PREFIX)/data | ||
else | ||
SHAREDDIR := $(PREFIX)/share | ||
endif | ||
endif | ||
|
||
# Temporary directory | ||
ifndef TEMPDIR | ||
ifeq ($(PLATFORM),Windows) | ||
TEMPDIR := $(TEMP) | ||
else | ||
TEMPDIR := /tmp | ||
endif | ||
endif | ||
|
||
# Set-up list of common variables | ||
PATH_VARS = \ | ||
BINDIR \ | ||
BUILDDIR \ | ||
ETCDIR \ | ||
INCDIR \ | ||
LIBDIR \ | ||
PREFIX \ | ||
ROOTDIR \ | ||
SHAREDDIR \ | ||
TEMPDIR | ||
|
||
.PHONY: pathvars | ||
|
||
pathvars: | ||
echo "List of available path variables:" | ||
echo " BINDIR location of the binaries" | ||
echo " BUILDDIR location of the build directory" | ||
echo " ETCDIR location of system configuration files" | ||
echo " INCDIR location of the header files" | ||
echo " LIBDIR location of the library" | ||
echo " PREFIX installation prefix for binary files" | ||
echo " SHAREDDIR location of the shared files" | ||
echo " TEMPDIR location of temporary directory" | ||
|
||
|
Oops, something went wrong.