summaryrefslogtreecommitdiff
path: root/hostname/Makefile
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2022-05-18 02:56:49 +0000
committerZach van Rijn <me@zv.io>2022-05-18 02:56:49 +0000
commit3743d9feaae50465f0b08ae8a30cad1de2110c9b (patch)
treede608960f5ad0a417a53d7fc3aff5a3c00773620 /hostname/Makefile
parentdbd74ddb26b5a0494ed2f075e886e3450a7ede7b (diff)
parente65c2374fe0b8fa952bab270213723454ec067b4 (diff)
downloadshimmy-3743d9feaae50465f0b08ae8a30cad1de2110c9b.tar.gz
shimmy-3743d9feaae50465f0b08ae8a30cad1de2110c9b.tar.bz2
shimmy-3743d9feaae50465f0b08ae8a30cad1de2110c9b.tar.xz
shimmy-3743d9feaae50465f0b08ae8a30cad1de2110c9b.zip
Merge branch 'add-hostname' into 'current'
Add hostname(1) implementation See merge request adelie/shimmy!1
Diffstat (limited to 'hostname/Makefile')
-rw-r--r--hostname/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/hostname/Makefile b/hostname/Makefile
new file mode 100644
index 0000000..bb4dc1b
--- /dev/null
+++ b/hostname/Makefile
@@ -0,0 +1,16 @@
+.POSIX:
+
+VERSTR=0.7
+
+CFLAGS=-D _POSIX_C_SOURCE=200809L -D _XOPEN_SOURCE=700 -D SHIMMY_VERSION=\"$(VERSTR)\"
+
+hostname: hostname.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+clean:
+ -rm hostname
+
+install: hostname
+ cp hostname $(DESTDIR)/usr/bin/hostname
+ cp hostname.1 $(DESTDIR)/usr/share/man/man1/hostname.1
+