ttcpd

Trivial tcp daemon
git clone git://git.finwo.net/app/ttcpd
Log | Files | Refs | LICENSE

commit 87bc7787b79245806f6fb6cab59175de9e4a0ace
parent 3cda11fdbd3e2e3ac256deb9e117af9982294444
Author: finwo <finwo@pm.me>
Date:   Wed,  8 Jan 2020 11:43:28 +0100

Made the makefile somewhat more generic

Diffstat:
M.gitignore | 3+--
MMakefile | 19+++++++++++++++++--
Rsrc/main.c -> src/ttcpd.c | 0
3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,5 +1,4 @@ *.o *.d *.swp -/lib -/tcpd +/ttcpd diff --git a/Makefile b/Makefile @@ -1,4 +1,19 @@ CC:=$(shell which gcc tcc | head -1) +PREFIX?=/usr/local -tcpd: - $(CC) -O3 -s src/main.c -o tcpd +BIN= \ + ttcpd \ + + +SRC=$(patsubst %,src/%.c,$(BIN)) + +$(BIN): $(SRC) + $(CC) -O3 -s src/$@.c -o $@ + +.PHONY: clean +clean: + rm -rf $(BIN) + +.PHONY: install +install: $(BIN) + install $(BIN) $(PREFIX)/bin diff --git a/src/main.c b/src/ttcpd.c