These changes make rdo build on my rpi, probably because this specific GCC version requires arguments in the order we now supply. We also disable ASAN in the debug build (for now), as it seems to cause a segfault on my rpi.
25 lines
510 B
Makefile
25 lines
510 B
Makefile
CFLAGS = -Wall -Wextra -Werror -Wl,-z,now -D_FORTIFY_SOURCE=2
|
|
CFLAGS_RELEASE = ${CFLAGS} -O2 -s
|
|
CFLAGS_DEBUG = ${CFLAGS} -O0 -g -fsanitize=leak,undefined
|
|
LIBS = -lbsd -lcrypt
|
|
CC = gcc
|
|
|
|
all: rdo.c
|
|
${CC} ${CFLAGS_RELEASE} rdo.c -o rdo ${LIBS}
|
|
|
|
debug: rdo.c
|
|
${CC} ${CFLAGS_DEBUG} rdo.c -o rdo ${LIBS}
|
|
|
|
install: rdo
|
|
cp rdo /usr/bin/rdo
|
|
chown root:root /usr/bin/rdo
|
|
chmod 755 /usr/bin/rdo
|
|
chmod u+s /usr/bin/rdo
|
|
cp rdo_sample.conf /etc/rdo.conf
|
|
|
|
uninstall:
|
|
rm /usr/bin/rdo
|
|
rm /etc/rdo.conf
|
|
|
|
clean:
|
|
rm rdo
|