Skip to content

Commit

Permalink
Updated build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sadko4u committed Sep 14, 2024
1 parent 8936a3f commit 394603b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

=== 1.0.38 ===
* Locale settings from the <stdlib/locale.h> are now applied in thread-local context.
* Updated build scripts.

=== 1.0.37 ===
* Updated definition of atomic operations.
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/make -f
#
# 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-common-lib
#
Expand Down
12 changes: 11 additions & 1 deletion make/configure.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ MERGED_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)
Expand Down Expand Up @@ -123,6 +123,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))
Expand Down Expand Up @@ -160,6 +164,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))
Expand Down Expand Up @@ -233,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 \
Expand Down
10 changes: 7 additions & 3 deletions make/paths.mk
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-common-lib
#
Expand Down Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions make/system.mk
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-plugins
#
Expand Down Expand Up @@ -180,6 +180,7 @@ COMMON_VARS = \
ARCHITECTURE \
ARCHITECTURE_FAMILY \
ARCHITECTURE_CFLAGS \
CROSS_COMPILE \
DEBUG \
EXECUTABLE_EXT \
EXPORT_SYMBOLS \
Expand All @@ -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"
Expand Down

0 comments on commit 394603b

Please sign in to comment.