forked from soccera/rdo
Refactor Makefile
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.
This commit is contained in:
parent
1bc833693b
commit
97bb40e37b
1 changed files with 8 additions and 2 deletions
10
Makefile
10
Makefile
|
@ -1,8 +1,14 @@
|
||||||
|
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
|
all: rdo.c
|
||||||
gcc -D_FORTIFY_SOURCE=2 -O2 -s -Wl,-z,now -lcrypt -lbsd -Wall -Wextra -Werror rdo.c -o rdo
|
${CC} ${CFLAGS_RELEASE} rdo.c -o rdo ${LIBS}
|
||||||
|
|
||||||
debug: rdo.c
|
debug: rdo.c
|
||||||
gcc -O0 -g -Wl,-z,now -fsanitize=leak,address,undefined -lcrypt -lbsd -Wall -Wextra -Werror rdo.c -o rdo
|
${CC} ${CFLAGS_DEBUG} rdo.c -o rdo ${LIBS}
|
||||||
|
|
||||||
install: rdo
|
install: rdo
|
||||||
cp rdo /usr/bin/rdo
|
cp rdo /usr/bin/rdo
|
||||||
|
|
Loading…
Add table
Reference in a new issue