Build system: General improvements

This commit is contained in:
(Tim) Efthimis Kritikos 2024-01-29 13:03:43 +00:00
parent d14c27382b
commit 9b679d8f82

View File

@ -1,11 +1,27 @@
QUIET=1
all:first all:first
first:gui.o main.o simdata.o assembly.o OBJECT_FILES=gui.o main.o simdata.o assembly.o
gcc -ggdb $^ -fsanitize=address -lncurses -ltinfo -o $@
ifeq "${QUIET}" "1"
QUIET_CC = @echo ' CC '$@;
QUIET_LINK = @echo ' LINK '$@;
QUIET_CLEAN = @echo ' CLEAN .';
Q = @
else
Q =
endif
first: ${OBJECT_FILES}
${QUIET_LINK}
${Q}gcc -ggdb $^ -fsanitize=address -lncurses -ltinfo -o $@
%.o:%.c %.o:%.c
gcc -ggdb -c $< -Wall -Wextra -Werror -fsanitize=address ${QUIET_CC}
${Q} gcc -ggdb -c $< -Wall -Wextra -Werror -fsanitize=address
.PHONY: clean .PHONY: clean
clean: clean:
rm -f gui.o main.o simdata.o assembly.o ${QUIET_CLEAN}
${Q} rm -f ${OBJECT_FILES} first