]> git.tuebingen.mpg.de Git - lopsub.git/commitdiff
Add target to create a static library.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 Oct 2023 16:55:24 +0000 (17:55 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 25 Feb 2024 16:04:30 +0000 (17:04 +0100)
It's sometimes handy to create a static version of the library,
although this is generally frowned upon. No standard target depends
on the new liblopsub.a target, so the static library is not build by
default. One has to explicitly run "make liblopsub.a" to build it.

Makefile

index ac9656eda6d2737a52d36de816d8f16850365d10..89cbc2eeb3abe456e21ee44e69377eb50d4377f5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -116,6 +116,9 @@ lopsubgen: $(lsg_objs)
        $(CC) -Wall -g -o $@ $(lsg_objs)
 $(REALNAME): $(liblopsub_objs)
        $(CC) --shared -Wl,-soname,liblopsub.so.$(MAJOR_VERSION) -o $@ $^
+liblopsub.a: $(liblopsub_objs)
+       $(AR) -rcs $@ $^
+
 lopsubex: $(lopsubex_objs) $(REALNAME)
        $(CC) -Wall -g -o $@ $(lopsubex_objs)