tlsgate

TLS reverse proxy
git clone git://git.akobets.xyz/tlsgate
Log | Files | Refs | README | LICENSE

commit 985365b3b47033c359b2535d5e481250dbca3d5b
parent b0f1bdc7d984a4c2525a3011917436d5927bee64
Author: Artem Kobets <artem@akobets.xyz>
Date:   Sun, 30 Aug 2020 20:56:58 +0300

Merge branch 'master' of git.akobets.xyz:repos/tlsgate into master

Diffstat:
MMakefile | 26++++++++++++++++----------
Dconfig.mk | 16----------------
2 files changed, 16 insertions(+), 26 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,22 +1,28 @@ -.POSIX: +VERSION = 0.0.1 -include config.mk +PREFIX = /usr/local +MANPREFIX = $(PREFIX)/share/man + +LIBS = -ltls + +ALL_CPPFLAGS = -D_POSIX_C_SOURCE=200809L $(CPPFLAGS) +ALL_CFLAGS = -std=c99 -pedantic -Wall $(CFLAGS) +ALL_LDFLAGS = $(LIBS) $(LDFLAGS) + +CC = cc SRC = main.c serve.c sock.c util.c OBJ = $(SRC:.c=.o) +HDR = serve.h sock.h util.h + all: tlsgate .c.o: - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ -$(OBJ): config.mk -util.o: util.h -sock.o: sock.h util.h -main.o: arg.h serve.h sock.h util.h -serve.o: serve.h util.h - + $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) -c $< -o $@ +$(OBJ): $(HDR) tlsgate: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) + $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $(OBJ) clean: rm -f tlsgate $(OBJ) diff --git a/config.mk b/config.mk @@ -1,16 +0,0 @@ -VERSION = 0.0.1 - -# paths -PREFIX = /usr/local -MANPREFIX = $(PREFIX)/share/man - -# includes and libs -LIBS = -ltls - -# flags -CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_POSIX_C_SOURCE=200809L -CFLAGS = -std=c99 -pedantic -Wall -Os -LDFLAGS = $(LIBS) -s - -# compiler and linker -CC = cc