]> git.tuebingen.mpg.de Git - dss.git/commitdiff
Provide a static binary.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 12 May 2024 01:44:58 +0000 (03:44 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 22 May 2024 16:48:36 +0000 (18:48 +0200)
Makefile
index.html.m4

index df56e4889d71cc60785751b310048693c245aa56..db232890a63e4ccf9129d898926aa50745e3abf3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ c_generated := $(B)/$(PACKAGE).lsg $(B)/version
 objs := $(addsuffix .o, $(c_generated) $(addprefix $(B)/, $(c_source)))
 deps := $(objs:.o=.d)
 all := $(PACKAGE) $(PACKAGE).1.gz
-www := $(B)/index.html $(B)/$(PACKAGE).1.html
+www := $(B)/index.html $(B)/$(PACKAGE).1.html $(B)/$(PACKAGE)
 
 all: $(all)
 www: $(www)
@@ -45,6 +45,7 @@ DSS_CFLAGS += -Wshadow
 
 CC_CMD = $(CC) -c -o $@ $(DSS_CPPFLAGS) $(CPPFLAGS) $(DSS_CFLAGS) $(CFLAGS) \
                -MMD -MF $(B)/$(*F).d -MT $@ $<
+LD_CMD = $(CC) -o $@ $(objs) $(LDFLAGS) -llopsub
 
 .ONESHELL:
 .SHELLFLAGS := -ec
@@ -58,7 +59,11 @@ $(B)/version.c:
        ./version-gen.sh $(PACKAGE) version.c > /dev/null
 $(PACKAGE): $(objs)
        $(call SAY, LD $@)
-       $(CC) -o $@ $(objs) $(LDFLAGS) -llopsub
+       $(LD_CMD)
+$(B)/$(PACKAGE): $(objs)
+       $(call SAY, LD $@)
+       $(LD_CMD) -static
+       strip $@
 $(B)/%.o: $(B)/%.c
        $(call SAY, CC $<)
        $(CC_CMD)
index 52a424ca65e2bdc49d627d76717e75629e434c27..849e2039a5cd86fc3592ccb64111d23658ae2eed 100644 (file)
@@ -36,8 +36,13 @@ dnl SPDX-License-Identifier: GPL-2.0
 
        <h2> <a name="installation">Installation</a> </h2>
 
-       <p> To install the dependencies, run <code>apt-get install gcc rsync
-       liblopsub-dev m4</code>. </p>
+       <p> The easiest way to install PACKAGE() is to download and run
+       this pre-compiled <a href="PACKAGE()">static binary</a> for x86. It
+       should work fine on all Linux distributions but it won't work on arm
+       systems. </p>
+
+       <p> To install from source, you first need to install the dependencies:
+       <code>apt-get install gcc rsync liblopsub-dev m4</code>. </p>
 
        <p> To download the source code, run <code>git clone
        CLONE_URL()</code>, or grab a current tarball from the <a