diff options
author | Clark Williams <williams@redhat.com> | 2020-09-10 15:06:55 -0500 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2020-09-10 15:06:55 -0500 |
commit | 1a00487ea7176edba48134d4f98fcb7c94a1ae53 (patch) | |
tree | 4ab206dbffc2e0e5567be7850de03645cfdaadde | |
parent | d1eb0e101104844f785980be11b3b4d73a5b695d (diff) | |
download | stalld-1a00487ea7176edba48134d4f98fcb7c94a1ae53.tar.gz |
Makefile: add 'static' target to link stalld statically
This will link the stalld program statically which will reduce
dependency issues on container platforms for things like libpthread
and librt. Note that the glibc-static package is required
on Fedora/RHEL.
Signed-off-by: Clark Williams <williams@redhat.com>
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -20,6 +20,9 @@ LICDIR := $(DATADIR)/licenses all: src/stalld.o $(CC) -o stalld $(LDFLAGS) src/stalld.o $(LIBS) +static: src/stalld.o + $(CC) -o stalld-static $(LDFLAGS) --static src/stalld.o $(LIBS) + .PHONY: install install: $(INSTALL) -m 755 -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(DOCDIR) @@ -33,6 +36,7 @@ install: .PHONY: clean tarball redhat push clean: @test ! -f stalld || rm stalld + @test ! -f stalld-static || rm stalld-static @test ! -f src/stalld.o || rm src/stalld.o @test ! -f $(TARBALL) || rm -f $(TARBALL) @make -C redhat clean |