diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2019-04-11 01:28:40 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-05-08 21:40:34 +0200 |
commit | 04fbc0408da33ed6041bf92caaa82b25bcbf6601 (patch) | |
tree | 02f49dc2b88ada1d111e13a22723a6ff90f1a0de /Makefile.in | |
parent | 5bfc70df013a16c4193622f6a5386c8cbbe882ae (diff) |
Configure: support building as static library
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index f2e4ce06..a2aa0039 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,6 +16,7 @@ DAEMON_LIBS=@DAEMON_LIBS@ CLIENT_LIBS=@CLIENT_LIBS@ CC=@CC@ M4=@M4@ +AR=@AR@ BISON=@BISON@ FLEX=@FLEX@ RANLIB=@RANLIB@ @@ -25,6 +26,7 @@ INSTALL_DATA=@INSTALL_DATA@ client=$(addprefix $(exedir)/,@CLIENT@) daemon=$(exedir)/bird +static_lib=$(exedir)/libbird.a protocols=@protocols@ prefix=@prefix@ @@ -71,6 +73,7 @@ all: daemon cli daemon: $(daemon) cli: $(client) +static-lib: $(static_lib) $(daemon): LIBS += $(DAEMON_LIBS) @@ -85,7 +88,7 @@ cf-local = $(conf-y-targets): $(s)config.Y src-o-files = $(patsubst %.c,$(o)%.o,$(src)) tests-target-files = $(patsubst %.c,$(o)%,$(tests_src)) -all-daemon = $(daemon): $(obj) +all-daemon = $(static_lib): $(obj) all-client = $(client): $(obj) s = $(dir $(lastword $(MAKEFILE_LIST))) @@ -159,6 +162,11 @@ $(client) $(daemon): $(E)echo LD $(LDFLAGS) -o $@ $^ $(LIBS) $(Q)$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) +$(static_lib): + $(E)echo AR $(ARFLAGS) $@ $^ + $(Q)$(AR) $(ARFLAGS) $@ $^ + $(Q)$(RANLIB) $@ + $(objdir)/sysdep/paths.h: Makefile echo >$@ "/* Generated by Makefile, don't edit manually! */" echo >>$@ "#define PATH_CONFIG_FILE \"@CONFIG_FILE@\"" |