From 5443db550208e8a97fbfae0aa238e609de978e71 Mon Sep 17 00:00:00 2001 From: sw1tchbl4d3 Date: Wed, 14 Jul 2021 06:13:34 +0200 Subject: [PATCH] Various Makefile additions We now have a normal and a debug build, both of which have full RELRO, appropriate handling of warnings and the default build has D_FORTIFY_SOURCE set to 2. --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4cb309f..c1d0585 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ -rdo: rdo.c - gcc rdo.c -lcrypt -lbsd -o rdo -Wall +all: rdo.c + gcc -D_FORTIFY_SOURCE=2 -O2 -s -Wl,-z,now -lcrypt -lbsd -Wall -Wextra -Werror rdo.c -o rdo + +debug: rdo.c + gcc -O0 -g -Wl,-z,now -lcrypt -lbsd -Wall -Wextra -Werror rdo.c -o rdo install: rdo cp rdo /usr/bin/rdo