summary refs log tree commit diff
path: root/bin/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'bin/Makefile')
-rw-r--r--bin/Makefile41
1 files changed, 29 insertions, 12 deletions
diff --git a/bin/Makefile b/bin/Makefile
index 16a5ba9e..528a70b2 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -1,13 +1,22 @@
-PREFIX = ~/.local
-MANDIR = $(PREFIX)/share/man
 GFX = cocoa
+LIBRESSL_PREFIX = /usr/local
+
+PREFIX = ~/.local
+MANIDR = $(PREFIX)/share/man
 
 CFLAGS += -Wall -Wextra -Wpedantic
 LDLIBS = -lm -lutil -lz
+
+CFLAGS_tls = $(CFLAGS) -I$(LIBRESSL_PREFIX)/include
+LDFLAGS_tls = $(LDFLAGS) -L$(LIBRESSL_PREFIX)/lib
+LDLIBS_tls = $(LDLIBS) -ltls
+
 LDLIBS_cocoa = $(LDLIBS) -framework Cocoa
 LDLIBS_fb = $(LDLIBS)
 LDLIBS_x11 = $(LDLIBS) -lX11
 
+-include config.mk
+
 BINS += aes
 BINS += dtch
 BINS += glitch
@@ -32,24 +41,28 @@ LINKS += pbpaste
 BINS_BSD += beef
 BINS_BSD += wat
 
+BINS_GFX += brot
+BINS_GFX += gfxx
+
 BINS_LINUX += bri
 BINS_LINUX += fbatt
 BINS_LINUX += fbclock
 BINS_LINUX += psfed
 
-BINS_GFX += brot
-BINS_GFX += gfxx
+BINS_TLS += relay
 
-BINS_ALL = $(BINS) $(BINS_BSD) $(BINS_LINUX) $(BINS_GFX)
+BINS_ALL = $(BINS) $(BINS_BSD) $(BINS_GFX) $(BINS_LINUX) $(BINS_TLS)
 MAN1_ALL = $(BINS_ALL:%=man1/%.1)
 
 any: .gitignore tags $(BINS) $(LINKS)
 
-bsd: any $(BINS_BSD)
+bsd: $(BINS_BSD)
+
+gfx: $(BINS_GFX)
 
-linux: any $(BINS_LINUX)
+linux: $(BINS_LINUX)
 
-gfx: any $(BINS_GFX)
+tls: $(BINS_TLS)
 
 .o:
 	$(CC) $(LDFLAGS) $< $(LDLIBS) -o $@
@@ -75,22 +88,26 @@ hi: hi.c
 	$(CC) $(CFLAGS) $(LDFLAGS) hi.c $(LDLIBS) -o $@
 	./hi -c
 
+relay: relay.c
+	$(CC) $(CFLAGS_tls) $(LDFLAGS_tls) relay.c $(LDLIBS_tls) -o $@
+
 atch: dtch
 	ln -f dtch atch
 
 open pbcopy pbpaste: pbd
 	ln -f pbd $@
 
-.gitignore: Makefile
-	echo $(BINS_ALL) $(LINKS) tags scheme.h scheme.png '*.o' '*.html' \
-		| tr ' ' '\n' | sort > .gitignore
-
 tags: *.h *.c
 	ctags -w *.h *.c
 
 scheme.png: scheme
 	./scheme -gt > scheme.png
 
+IGNORE = '*.o' '*.html' config.mk tags scheme.h scheme.png $(BINS_ALL) $(LINKS)
+
+.gitignore: Makefile
+	echo $(IGNORE) | tr ' ' '\n' | sort > .gitignore
+
 HTMLS = $(BINS_ALL:%=%.html)
 HTMLS += Makefile.html
 HTMLS += gfx-fb.html
/commit/ui-tree.c?id=ccba7eb9d0c43ffe99178ab6632dc3794f887309&follow=1'>global: make 'char *path' const where possibleChristian Hesse 2019-05-20ui-shared: restrict to 15 levelsJason A. Donenfeld 2019-02-23ui-diff,ui-tag: don't use htmlf with non-formatted stringsChris Mayo 2019-02-23ui-ssdiff: resolve HTML5 validation errorsChris Mayo 2019-01-03filters: migrate from luacrypto to luaosslJason A. Donenfeld 2019-01-02ui-shared: fix broken sizeof in title setting and rewriteJason A. Donenfeld 2018-12-09git: update to v2.20.0Christian Hesse 2018-11-25ui-blame: set repo for sbJason A. Donenfeld 2018-11-25auth-filter: pass url with query string attachedJason A. Donenfeld 2018-11-21git: use xz compressed archive for downloadChristian Hesse 2018-10-12git: update to v2.19.1Christian Hesse 2018-09-11ui-ssdiff: ban strcat()Christian Hesse 2018-09-11ui-ssdiff: ban strncpy()Christian Hesse 2018-09-11ui-shared: ban strcat()Christian Hesse 2018-09-11ui-patch: ban sprintf()Christian Hesse 2018-09-11ui-log: ban strncpy()Christian Hesse 2018-09-11ui-log: ban strcpy()Christian Hesse 2018-09-11parsing: ban sprintf()Christian Hesse 2018-09-11parsing: ban strncpy()Christian Hesse 2018-08-28filters: generate anchor links from markdownChristian Hesse 2018-08-03Bump version.Jason A. Donenfeld 2018-08-03clone: fix directory traversalJason A. Donenfeld 2018-08-03config: record repo.snapshot-prefix in the per-repo configKonstantin Ryabitsev