Skip to content

Commit de52f0a

Browse files
committed
Release 0.5.5
* Updated build system.
2 parents 6f3e247 + a4e65c2 commit de52f0a

File tree

11 files changed

+446
-321
lines changed

11 files changed

+446
-321
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
* RECENT CHANGES
33
*******************************************************************************
44

5+
=== 0.5.5 ===
6+
* Updated build system.
7+
58
=== 0.5.4 ===
69
* Split all interface code into lsp-r3d-iface.
710

Makefile

Lines changed: 54 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
# along with lsp-r3d-base-lib. If not, see <https://www.gnu.org/licenses/>.
2020
#
2121

22+
# Command-line flag to silence nested $(MAKE).
23+
ifneq ($(VERBOSE),1)
24+
.SILENT:
25+
endif
26+
2227
# Location
2328
BASEDIR := $(CURDIR)
2429
MODULES := $(BASEDIR)/modules
@@ -44,76 +49,76 @@ DISTSRC = $(DISTSRC_PATH)/$(ARTIFACT_NAME)
4449
.PHONY: all compile install uninstall depend clean
4550

4651
compile all install uninstall depend:
47-
@$(CHK_CONFIG)
48-
@$(MAKE) -s -C "$(BASEDIR)/src" $(@) CONFIG="$(CONFIG)" DESTDIR="$(DESTDIR)"
52+
$(CHK_CONFIG)
53+
$(MAKE) -C "$(BASEDIR)/src" $(@) VERBOSE="$(VERBOSE)" CONFIG="$(CONFIG)" DESTDIR="$(DESTDIR)"
4954

5055
clean:
51-
@echo "Cleaning build directory $(BUILDDIR)"
52-
@-rm -rf $(BUILDDIR)
53-
@echo "Clean OK"
56+
echo "Cleaning build directory $(BUILDDIR)"
57+
-rm -rf $(BUILDDIR)
58+
echo "Clean OK"
5459

5560
# Module-related tasks
5661
.PHONY: fetch tree prune
5762
fetch:
58-
@$(CHK_CONFIG)
59-
@echo "Fetching desired source code dependencies"
60-
@$(MAKE) -s -f "make/modules.mk" $(@) BASEDIR="$(BASEDIR)" CONFIG="$(CONFIG)"
61-
@echo "Fetch OK"
63+
$(CHK_CONFIG)
64+
echo "Fetching desired source code dependencies"
65+
$(MAKE) -f "$(BASEDIR)/make/modules.mk" $(@) VERBOSE="$(VERBOSE)" BASEDIR="$(BASEDIR)" CONFIG="$(CONFIG)"
66+
echo "Fetch OK"
6267

6368
tree:
64-
@echo "Fetching all possible source code dependencies"
65-
@$(MAKE) -s -f "make/modules.mk" $(@) BASEDIR="$(BASEDIR)" TREE="1"
66-
@echo "Fetch OK"
69+
echo "Fetching all possible source code dependencies"
70+
$(MAKE) -f "$(BASEDIR)/make/modules.mk" $(@) VERBOSE="$(VERBOSE)" BASEDIR="$(BASEDIR)" TREE="1"
71+
echo "Fetch OK"
6772

6873
prune: clean
69-
@echo "Pruning the whole project tree"
70-
@$(MAKE) -s -f "make/modules.mk" prune BASEDIR="$(BASEDIR)" CONFIG="$(CONFIG)"
71-
@$(MAKE) -s -f "make/modules.mk" prune BASEDIR="$(BASEDIR)" TREE="1"
72-
@-rm -rf "$(CONFIG)"
73-
@echo "Prune OK"
74+
echo "Pruning the whole project tree"
75+
$(MAKE) -f "$(BASEDIR)/make/modules.mk" prune VERBOSE="$(VERBOSE)" BASEDIR="$(BASEDIR)" CONFIG="$(CONFIG)"
76+
$(MAKE) -f "$(BASEDIR)/make/modules.mk" prune VERBOSE="$(VERBOSE)" BASEDIR="$(BASEDIR)" TREE="1"
77+
-rm -rf "$(CONFIG)"
78+
echo "Prune OK"
7479

7580
# Configuration-related targets
7681
.PHONY: config help chkconfig
7782

7883
testconfig:
79-
@$(MAKE) -s -f "$(BASEDIR)/make/configure.mk" $(@) CONFIG="$(CONFIG)" TEST="1" $(MAKEFLAGS)
84+
$(MAKE) -f "$(BASEDIR)/make/configure.mk" $(@) VERBOSE="$(VERBOSE)" CONFIG="$(CONFIG)" TEST="1" -$(MAKEFLAGS)
8085

8186
config:
82-
@$(MAKE) -s -f "$(BASEDIR)/make/configure.mk" $(@) CONFIG="$(CONFIG)" $(MAKEFLAGS)
87+
$(MAKE) -f "$(BASEDIR)/make/configure.mk" $(@) VERBOSE="$(VERBOSE)" CONFIG="$(CONFIG)" -$(MAKEFLAGS)
8388

8489
# Release-related targets
8590
.PHONY: distsrc
8691
distsrc:
87-
@echo "Building source code archive"
88-
@mkdir -p "$(DISTSRC)/modules"
89-
@$(MAKE) -s -f "make/modules.mk" tree BASEDIR="$(BASEDIR)" MODULES="$(DISTSRC)/modules" TREE="1"
90-
@cp -R $(BASEDIR)/include $(BASEDIR)/make $(BASEDIR)/src "$(DISTSRC)/"
91-
@cp $(BASEDIR)/CHANGELOG $(BASEDIR)/COPYING* $(BASEDIR)/Makefile $(BASEDIR)/*.mk "$(DISTSRC)/"
92-
@find "$(DISTSRC)" -iname '.git' | xargs -exec rm -rf {}
93-
@find "$(DISTSRC)" -iname '.gitignore' | xargs -exec rm -rf {}
94-
@tar -C $(DISTSRC_PATH) -czf "$(BUILDDIR)/$(ARTIFACT_NAME)-$(ARTIFACT_VERSION)-src.tar.gz" "$(ARTIFACT_NAME)"
95-
@echo "Created archive: $(BUILDDIR)/$(ARTIFACT_NAME)-$(ARTIFACT_VERSION)-src.tar.gz"
96-
@ln -sf "$(ARTIFACT_NAME)-$(ARTIFACT_VERSION)-src.tar.gz" "$(BUILDDIR)/$(ARTIFACT_NAME)-src.tar.gz"
97-
@echo "Created symlink: $(BUILDDIR)/$(ARTIFACT_NAME)-src.tar.gz"
98-
@rm -rf $(DISTSRC_PATH)
99-
@echo "Build OK"
92+
echo "Building source code archive"
93+
mkdir -p "$(DISTSRC)/modules"
94+
$(MAKE) -f "$(BASEDIR)/make/modules.mk" tree VERBOSE="$(VERBOSE)" BASEDIR="$(BASEDIR)" MODULES="$(DISTSRC)/modules" TREE="1"
95+
cp -R $(BASEDIR)/include $(BASEDIR)/make $(BASEDIR)/src "$(DISTSRC)/"
96+
cp $(BASEDIR)/CHANGELOG $(BASEDIR)/COPYING* $(BASEDIR)/Makefile $(BASEDIR)/*.mk "$(DISTSRC)/"
97+
find "$(DISTSRC)" -iname '.git' | xargs -exec rm -rf {}
98+
find "$(DISTSRC)" -iname '.gitignore' | xargs -exec rm -rf {}
99+
tar -C $(DISTSRC_PATH) -czf "$(BUILDDIR)/$(ARTIFACT_NAME)-$(ARTIFACT_VERSION)-src.tar.gz" "$(ARTIFACT_NAME)"
100+
echo "Created archive: $(BUILDDIR)/$(ARTIFACT_NAME)-$(ARTIFACT_VERSION)-src.tar.gz"
101+
ln -sf "$(ARTIFACT_NAME)-$(ARTIFACT_VERSION)-src.tar.gz" "$(BUILDDIR)/$(ARTIFACT_NAME)-src.tar.gz"
102+
echo "Created symlink: $(BUILDDIR)/$(ARTIFACT_NAME)-src.tar.gz"
103+
rm -rf $(DISTSRC_PATH)
104+
echo "Build OK"
100105

101106
# Help
102107
help:
103-
@echo "Available targets:"
104-
@echo " all Build all binaries"
105-
@echo " clean Clean all build files and configuration file"
106-
@echo " config Configure build"
107-
@echo " depend Update build dependencies for current project"
108-
@echo " distsrc Make tarball with source code for packagers"
109-
@echo " fetch Fetch all desired source code dependencies from git"
110-
@echo " help Print this help message"
111-
@echo " info Output build configuration"
112-
@echo " install Install all binaries into the system"
113-
@echo " prune Cleanup build and all fetched dependencies from git"
114-
@echo " tree Fetch all possible source code dependencies from git"
115-
@echo " to make source code portable between machines"
116-
@echo " uninstall Uninstall binaries"
117-
@echo ""
118-
@$(MAKE) -s -f "$(BASEDIR)/make/configure.mk" $(@)
119-
@echo ""
108+
echo "Available targets:"
109+
echo " all Build all binaries"
110+
echo " clean Clean all build files and configuration file"
111+
echo " config Configure build"
112+
echo " depend Update build dependencies for current project"
113+
echo " distsrc Make tarball with source code for packagers"
114+
echo " fetch Fetch all desired source code dependencies from git"
115+
echo " help Print this help message"
116+
echo " info Output build configuration"
117+
echo " install Install all binaries into the system"
118+
echo " prune Cleanup build and all fetched dependencies from git"
119+
echo " tree Fetch all possible source code dependencies from git"
120+
echo " to make source code portable between machines"
121+
echo " uninstall Uninstall binaries"
122+
echo ""
123+
$(MAKE) -f "$(BASEDIR)/make/configure.mk" $(@) VERBOSE="$(VERBOSE)"
124+
echo ""

dependencies.mk

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,22 @@
1919
#
2020

2121
# Variables that describe dependencies
22-
LSP_COMMON_LIB_VERSION := 1.0.10
22+
LSP_COMMON_LIB_VERSION := 1.0.14
2323
LSP_COMMON_LIB_NAME := lsp-common-lib
2424
LSP_COMMON_LIB_TYPE := hdr
25-
LSP_COMMON_LIB_URL := https://github.com/sadko4u/$(LSP_COMMON_LIB_NAME).git
25+
LSP_COMMON_LIB_URL := git@github.com:lsp-plugins/$(LSP_COMMON_LIB_NAME).git
2626

27-
LSP_TEST_FW_VERSION := 1.0.6
27+
LSP_TEST_FW_VERSION := 1.0.8
2828
LSP_TEST_FW_NAME := lsp-test-fw
2929
LSP_TEST_FW_TYPE := src
30-
LSP_TEST_FW_URL := https://github.com/sadko4u/$(LSP_TEST_FW_NAME).git
30+
LSP_TEST_FW_URL := git@github.com:lsp-plugins/$(LSP_TEST_FW_NAME).git
3131

32-
LSP_R3D_IFACE_VERSION := 0.5.1
32+
LSP_R3D_IFACE_VERSION := 0.5.2
3333
LSP_R3D_IFACE_NAME := lsp-r3d-iface
34-
LSP_R3D_IFACE_TYPE := hdr
35-
LSP_R3D_IFACE_URL := https://github.com/sadko4u/$(LSP_R3D_IFACE_NAME).git
34+
LSP_R3D_IFACE_TYPE := src
35+
LSP_R3D_IFACE_URL := git@github.com:lsp-plugins/$(LSP_R3D_IFACE_NAME).git
3636

37-
STDLIB_VERSION := system
38-
STDLIB_TYPE := opt
39-
STDLIB_LDFLAGS := -lpthread -ldl
37+
LIBPTHREAD_VERSION := system
38+
LIBPTHREAD_NAME := libpthread
39+
LIBPTHREAD_TYPE := opt
40+
LIBPTHREAD_LDFLAGS := -lpthread

include/lsp-plug.in/r3d/base/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#define LSP_R3D_BASE_LIB_MAJOR 0
2626
#define LSP_R3D_BASE_LIB_MINOR 5
27-
#define LSP_R3D_BASE_LIB_MICRO 4
27+
#define LSP_R3D_BASE_LIB_MICRO 5
2828

2929
#ifdef LSP_R3D_BASE_LIB_BUILTIN
3030
#define LSP_R3D_BASE_LIB_EXPORT

make/configure.mk

Lines changed: 54 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
# You should have received a copy of the GNU Lesser General Public License
1818
# along with lsp-r3d-base-lib. If not, see <https://www.gnu.org/licenses/>.
1919
#
20+
ifneq ($(VERBOSE),1)
21+
.SILENT:
22+
endif
2023

2124
# Definitions
2225
PREFIX := /usr/local
@@ -25,20 +28,24 @@ BINDIR := $(PREFIX)/bin
2528
INCDIR := $(PREFIX)/include
2629
BASEDIR := $(CURDIR)
2730
BUILDDIR := $(BASEDIR)/.build
28-
CONFIG := $(BASEDIR)/.config.mk
2931
MODULES := $(BASEDIR)/modules
32+
CONFIG := $(BASEDIR)/.config.mk
3033
TEST := 0
3134
DEBUG := 0
3235
PROFILE := 0
3336
TRACE := 0
3437

38+
include $(BASEDIR)/make/functions.mk
3539
include $(BASEDIR)/make/system.mk
36-
include $(BASEDIR)/project.mk
3740
include $(BASEDIR)/make/tools.mk
3841
include $(BASEDIR)/dependencies.mk
42+
include $(BASEDIR)/project.mk
3943

40-
DEPENDENCIES += $(TEST_DEPENDENCIES)
44+
# Compute the full list of dependencies
45+
UNIQ_DEPENDENCIES := $(call uniq, $(DEPENDENCIES) $(TEST_DEPENDENCIES))
46+
DEPENDENCIES = $(UNIQ_DEPENDENCIES)
4147

48+
# Determine versions
4249
ifeq ($(findstring -devel,$(ARTIFACT_VERSION)),-devel)
4350
$(foreach dep, $(DEPENDENCIES), \
4451
$(eval $(dep)_BRANCH=devel) \
@@ -47,10 +54,8 @@ ifeq ($(findstring -devel,$(ARTIFACT_VERSION)),-devel)
4754
tmp_version :=$(shell echo "$(ARTIFACT_VERSION)" | sed s/-devel//g)
4855
ARTIFACT_VERSION=$(tmp_version)
4956
else
50-
$(foreach dep, $(DEPENDENCIES), \
51-
$(eval \
52-
$(dep)_BRANCH="$($(dep)_VERSION)" \
53-
) \
57+
$(foreach dep,$(DEPENDENCIES),\
58+
$(eval $(dep)_BRANCH="$($(dep)_VERSION)") \
5459
)
5560
endif
5661

@@ -91,6 +96,7 @@ define srcconfig =
9196
$(if $($(name)_CFLAGS),, $(eval $(name)_CFLAGS := "-I\"$($(name)_INC)\"" $(if $(builtin),"-D$(name)_BUILTIN")))
9297
$(if $($(name)_LDLAGS),, $(eval $(name)_LDFLAGS :=))
9398
$(if $($(name)_OBJ),, $(eval $(name)_OBJ := "$($(name)_BIN)/$($(name)_NAME).o"))
99+
$(if $($(name)_OBJ_TEST),,$(eval $(name)_OBJ_TEST:= "$($(name)_BIN)/$($(name)_NAME)-test.o"))
94100
$(if $($(name)_MFLAGS),, $(eval $(name)_MFLAGS := $(if $(builtin),"-D$(name)_BUILTIN -fvisibility=hidden")))
95101
endef
96102

@@ -116,23 +122,23 @@ define vardef =
116122
endef
117123

118124
# Define predefined variables
119-
ifndef $(ARTIFACT_VARS)_NAME
120-
$(ARTIFACT_VARS)_NAME := $(ARTIFACT_NAME)
125+
ifndef $(ARTIFACT_ID)_NAME
126+
$(ARTIFACT_ID)_NAME := $(ARTIFACT_NAME)
121127
endif
122-
ifndef $(ARTIFACT_VARS)_DESC
123-
$(ARTIFACT_VARS)_DESC := $(ARTIFACT_DESC)
128+
ifndef $(ARTIFACT_ID)_DESC
129+
$(ARTIFACT_ID)_DESC := $(ARTIFACT_DESC)
124130
endif
125-
ifndef $(ARTIFACT_VARS)_VERSION
126-
$(ARTIFACT_VARS)_VERSION := $(ARTIFACT_VERSION)
131+
ifndef $(ARTIFACT_ID)_VERSION
132+
$(ARTIFACT_ID)_VERSION := $(ARTIFACT_VERSION)
127133
endif
128-
ifndef $(ARTIFACT_VARS)_PATH
129-
$(ARTIFACT_VARS)_PATH := $(BASEDIR)
134+
ifndef $(ARTIFACT_ID)_PATH
135+
$(ARTIFACT_ID)_PATH := $(BASEDIR)
130136
endif
131137

132-
$(ARTIFACT_VARS)_TESTING = $(TEST)
133-
$(ARTIFACT_VARS)_TYPE := src
138+
$(ARTIFACT_ID)_TESTING = $(TEST)
139+
$(ARTIFACT_ID)_TYPE := src
134140

135-
OVERALL_DEPS := $(DEPENDENCIES) $(ARTIFACT_VARS)
141+
OVERALL_DEPS := $(DEPENDENCIES) $(ARTIFACT_ID)
136142
__tmp := $(foreach dep,$(OVERALL_DEPS),$(call vardef, $(dep)))
137143

138144
CONFIG_VARS = \
@@ -155,46 +161,47 @@ CONFIG_VARS = \
155161
$(name)_MFLAGS \
156162
$(name)_LDFLAGS \
157163
$(name)_OBJ \
164+
$(name)_OBJ_TEST \
158165
)
159166

160167
.DEFAULT_GOAL := config
161168
.PHONY: config prepare help
162169
.PHONY: $(CONFIG_VARS)
163170

164171
prepare:
165-
@echo "Configuring build..."
166-
@echo "# Project settings" > "$(CONFIG)"
172+
echo "Configuring build..."
173+
echo "# Project settings" > "$(CONFIG)"
167174

168175
$(CONFIG_VARS): prepare
169-
@echo "$(@)=$($(@))" >> "$(CONFIG)"
176+
echo "$(@)=$($(@))" >> "$(CONFIG)"
170177

171178
config: $(CONFIG_VARS)
172-
@echo "Configured OK"
179+
echo "Configured OK"
173180

174181
help: | toolvars sysvars
175-
@echo ""
176-
@echo "List of variables for each dependency:"
177-
@echo " <ARTIFACT>_BIN location to put all binaries when building artifact"
178-
@echo " <ARTIFACT>_BRANCH git branch used to checkout source code"
179-
@echo " <ARTIFACT>_CFLAGS C/C++ flags to access headers of the artifact"
180-
@echo " <ARTIFACT>_DESC Full description of the artifact"
181-
@echo " <ARTIFACT>_INC path to include files of the artifact"
182-
@echo " <ARTIFACT>_LDFLAGS linker flags to link with artifact"
183-
@echo " <ARTIFACT>_MFLAGS artifact-specific compilation flags"
184-
@echo " <ARTIFACT>_NAME the artifact name used in pathnames"
185-
@echo " <ARTIFACT>_OBJ path to output object file for artifact"
186-
@echo " <ARTIFACT>_PATH location of the source code of the artifact"
187-
@echo " <ARTIFACT>_SRC path to source code files of the artifact"
188-
@echo " <ARTIFACT>_TEST location of test files of the artifact"
189-
@echo " <ARTIFACT>_TYPE artifact usage type"
190-
@echo " - src - use sources and headers from git"
191-
@echo " - hdr - use headers only from git"
192-
@echo " - pkg - use pkgconfig for configuration"
193-
@echo " - lib - use system headers and -l<libname> flags"
194-
@echo " - opt - use optional configuration"
195-
@echo " <ARTIFACT>_URL location of the artifact git repoisitory"
196-
@echo " <ARTIFACT>_VERSION version of the artifact used for building"
197-
@echo ""
198-
@echo "Artifacts used for build:"
199-
@echo " $(DEPENDENCIES)"
182+
echo ""
183+
echo "List of variables for each dependency:"
184+
echo " <ARTIFACT>_BIN location to put all binaries when building artifact"
185+
echo " <ARTIFACT>_BRANCH git branch used to checkout source code"
186+
echo " <ARTIFACT>_CFLAGS C/C++ flags to access headers of the artifact"
187+
echo " <ARTIFACT>_DESC Full description of the artifact"
188+
echo " <ARTIFACT>_INC path to include files of the artifact"
189+
echo " <ARTIFACT>_LDFLAGS linker flags to link with artifact"
190+
echo " <ARTIFACT>_MFLAGS artifact-specific compilation flags"
191+
echo " <ARTIFACT>_NAME the artifact name used in pathnames"
192+
echo " <ARTIFACT>_OBJ path to output object file for artifact"
193+
echo " <ARTIFACT>_PATH location of the source code of the artifact"
194+
echo " <ARTIFACT>_SRC path to source code files of the artifact"
195+
echo " <ARTIFACT>_TEST location of test files of the artifact"
196+
echo " <ARTIFACT>_TYPE artifact usage type"
197+
echo " - src - use sources and headers from git"
198+
echo " - hdr - use headers only from git"
199+
echo " - pkg - use pkgconfig for configuration"
200+
echo " - lib - use system headers and -l<libname> flags"
201+
echo " - opt - use optional configuration"
202+
echo " <ARTIFACT>_URL location of the artifact git repoisitory"
203+
echo " <ARTIFACT>_VERSION version of the artifact used for building"
204+
echo ""
205+
echo "Artifacts used for build:"
206+
echo " $(DEPENDENCIES)"
200207

0 commit comments

Comments
 (0)