commit 14bd81aba1dc2d25dd1a44c74425b5916ac401ef
Author: Laslo Hunhold <[email protected]>
AuthorDate: Fri Jun 24 12:05:03 2022 +0200
Commit: Laslo Hunhold <[email protected]>
CommitDate: Fri Jun 24 12:05:03 2022 +0200
Only add updated object files to the static library
ar(1) is explicitly tailored towards merely "updating" an archive
with a selection of object files rather than needing the entire list,
making this process more efficient.
It is, however, necessary for the .so-generation.
Thanks Quentin for pointing this out to me! :)
Signed-off-by: Laslo Hunhold <[email protected]>
diff --git a/Makefile b/Makefile
index 6e6baa1..d53cf96 100644
--- a/Makefile
+++ b/Makefile
@@ -187,7 +187,7 @@ $(TEST):
$(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $<
libgrapheme.a: $(SRC:=.o)
- $(AR) rc $@ $(SRC:=.o)
+ $(AR) -rc $@ $?
$(RANLIB) $@
libgrapheme.so: $(SRC:=.o)