summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Fankhauser hiddenalpha.ch2024-04-23 23:09:38 +0200
committerAndreas Fankhauser hiddenalpha.ch2024-04-23 23:09:38 +0200
commit1c837a1ef1615e80220857f31312d3f3135c2446 (patch)
tree78fa30fe201f3babb03acb72b587e6ff6eea502c
parent97850a976c5412d368b3584b885bcdb3ea8bb50c (diff)
downloadgetaddrinfo-cli-0.0.2.zip
getaddrinfo-cli-0.0.2.tar.gz
Add doc to readme how to build.v0.0.2
-rw-r--r--Makefile10
-rw-r--r--README.md37
-rw-r--r--README.txt13
3 files changed, 41 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index 0695efa..9771a70 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
-CC=gcc
-LD=gcc
+CC=cc
+LD=cc
MKDIR_P=mkdir -p
RIMRAF=rm -rf
COPYTO=cp -t
@@ -12,9 +12,7 @@ INSTALL_ROOT=/usr/local
CFLAGS=-Wall -Werror -pedantic -std=c89 -fPIC -Os -fmax-errors=1 -DPROJECT_VERSION=$(PROJECT_VERSION) -D_POSIX_C_SOURCE=200112L
-LDFLAGS=-Wl,-s,--as-needed,--gc-sections,-pie
-
-LIBS=-dy -lc
+LDFLAGS=-Wl,-s,--as-needed,--gc-sections,-pie,-dy,-lc
PROJECT_VERSION=$(shell (git describe --tags 2>/dev/null|sed 's,^v,,'|egrep .) || date -u +0.0.0-%Y%m%d.%H%M%S)
@@ -34,7 +32,7 @@ build/bin/getaddrinfo$(BINEXT):
build/bin/getaddrinfo$(BINEXT): build/obj/main/c/getaddrinfocli.o
echo " LN $@"
$(MKDIR_P) "$(shell dirname "$@")"
- $(LD) -o "$@" $(LDFLAGS) $^ $(LIBS)
+ $(LD) -o "$@" $^ $(LDFLAGS)
build/obj/main/c/getaddrinfocli.o:
build/obj/main/c/getaddrinfocli.o: src/main/c/getaddrinfocli.c
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..b89f304
--- /dev/null
+++ b/README.md
@@ -0,0 +1,37 @@
+
+getaddrinfo-cli
+===============
+
+Simple commandline frontend for [getaddrinfo](https://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html).
+
+[Home](https://git.hiddenalpha.ch/getaddrinfo-cli.git/tree/README.txt).
+
+[Downloads](https://github.com/hiddenalpha/getaddrinfo-cli/releases).
+
+
+
+## Build/Install From Source
+
+Make sure you have at least:
+- C compiler
+- libc
+- make
+
+Then take a look if you need to tune anything in the Makefile.
+
+Then to build do:
+```sh
+make clean
+make
+```
+
+And to install:
+```sh
+make install
+```
+
+Or install even simpler:
+```sh
+tar -C /usr/local -xzf path/to/dist/your-build.tgz -- bin
+```
+
diff --git a/README.txt b/README.txt
deleted file mode 100644
index 3c8f94a..0000000
--- a/README.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-
-getaddrinfo-cli
-===============
-
-Simple commandline frontend for getaddrinfo.
-https://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html
-
-Home:
-https://git.hiddenalpha.ch/getaddrinfo-cli.git/tree/README.txt
-
-Download pre-compiled:
-https://github.com/hiddenalpha/getaddrinfo-cli/releases
-