From 1c837a1ef1615e80220857f31312d3f3135c2446 Mon Sep 17 00:00:00 2001 From: Andreas Fankhauser hiddenalpha.ch Date: Tue, 23 Apr 2024 23:09:38 +0200 Subject: Add doc to readme how to build. --- Makefile | 10 ++++------ README.md | 37 +++++++++++++++++++++++++++++++++++++ README.txt | 13 ------------- 3 files changed, 41 insertions(+), 19 deletions(-) create mode 100644 README.md delete mode 100644 README.txt 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 - -- cgit v1.1