about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorRory Bradford <roryrjb@gmail.com>2021-03-06 14:46:31 +0000
committerRory Bradford <roryrjb@gmail.com>2021-03-06 14:46:31 +0000
commit249d2cf01750feaad1dd7bc29a0a998da7017052 (patch)
treed9b49740d922f7487c68fdca4cc85ff6cd9dbd15 /Makefile
parenta40bd8adb20715582813fb8399dd37e4efee9b37 (diff)
downloadrf-249d2cf01750feaad1dd7bc29a0a998da7017052.tar.gz
Make strings safer
Signed-off-by: Rory Bradford <roryrjb@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 58b045d..7287b64 100644
--- a/Makefile
+++ b/Makefile
@@ -2,21 +2,25 @@
 
 BIN = rf
 VERSION = 0.0.5
-OBJS = rf.o ignore.o config.o
+OBJS = rf.o ignore.o config.o include/common/strl.o
 PREFIX = /usr/local
 CC = cc
+INCLUDE += -Iinclude/common
 CFLAGS = -std=c99 -pedantic -O2 \
 	  -Wall -Wextra -Wsign-compare \
 	  -fstack-protector-strong -fpie \
 	  -D_FORTIFY_SOURCE=2 \
 	  -DVERSION='"$(VERSION)"' \
-	  -DNAME='"$(BIN)"'
+	  $(INCLUDE)
 
 all: $(BIN)
 
 $(BIN): $(OBJS)
 	$(CC) $(CFLAGS) -o $(BIN) $(OBJS)
 
+static: $(OBJS)
+	$(CC) $(CFLAGS) -static -o $(BIN) $(OBJS)
+
 rf.1: rf.1.scd
 	scdoc < $< > $@
 
@@ -37,4 +41,5 @@ install: $(BIN) rf.1 rfignore.5 rfconfig.5
 	install -m444 rfconfig.5 $(DESTDIR)$(PREFIX)/man/man5/
 
 clean:
-	rm -vf $(BIN) *.o *.1 *.5
+	@rm -vf $(BIN) *.1 *.5
+	@find . -name \*.o -exec rm -v {} +