Compare commits

..

3 Commits

Author SHA1 Message Date
8007299886 silent $(AR) 2023-12-30 12:31:59 +01:00
bb8509fc00 shared lib: use all objects. 2023-12-30 11:47:34 +01:00
d654b4acde add list_sort 2023-12-29 17:22:28 +01:00
3 changed files with 2 additions and 6 deletions

View File

@@ -10,9 +10,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later <https://spdx.org/licenses/GPL-3.0-or-later.html>
#
# important to know where exactly is project root dir
ROOTDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
SHELL := /bin/bash
CC := gcc
LD := ld
@@ -201,11 +198,11 @@ cleanlibdir:
$(DLIB): LDFLAGS += -shared
$(DLIB): $(OBJ) | $(LIBDIR)
@echo "building shared library ($@)."
$(CC) $(CFLAGS) $(LDFLAGS) $? -o $@
@$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
$(SLIB): $(OBJ) | $(LIBDIR)
@echo "building static library ($@)."
$(AR) $(ARFLAGS) $@ $? > /dev/null
@$(AR) $(ARFLAGS) $@ $? > /dev/null
##################################### tests
.PHONY: testbins cleanbin cleanbindir
@@ -293,6 +290,5 @@ showflags:
@echo LDFLAGS: $(LDFLAGS)
wtf:
@printf "ROOTDIR=+%s+\n\n" "$(ROOTDIR)"
@printf "OBJDIR=%s\n\n" "$(OBJDIR)"
@printf "OBJ=%s\n\n" "$(OBJ)"