Explicitly use object-files in library-generation - libgrapheme - unicode string library
 (HTM) git clone git://git.suckless.org/libgrapheme
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 7d8e17d4ff3c126ebd1ec743225f4acd1b6198cf
 (DIR) parent a5542c3d89353ee818b434606cc44c67d7aaa0ae
 (HTM) Author: Laslo Hunhold <dev@frign.de>
       Date:   Fri, 24 Jun 2022 00:45:56 +0200
       
       Explicitly use object-files in library-generation
       
       The macro $? only evaluates to the list of prerequisites that are
       newer than the current target. While this incidentally works when
       simply compiling, this leads to the library-files only including
       the changed .o-file (and nothing else!) when a single source file
       has been changed.
       
       This is easily fixed by explicitly listing the object-files.
       
       Signed-off-by: Laslo Hunhold <dev@frign.de>
       
       Diffstat:
         M Makefile                            |       4 ++--
       
       1 file changed, 2 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/Makefile b/Makefile
       @@ -187,11 +187,11 @@ $(TEST):
                $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $<
        
        libgrapheme.a: $(SRC:=.o)
       -        $(AR) rc $@ $?
       +        $(AR) rc $@ $(SRC:=.o)
                $(RANLIB) $@
        
        libgrapheme.so: $(SRC:=.o)
       -        $(CC) -o $@ -shared $?
       +        $(CC) -o $@ -shared $(SRC:=.o)
        
        benchmark: $(BENCHMARK)
                for m in $(BENCHMARK); do ./$$m; done