libhl/chad.mk

20 lines
583 B
Makefile
Raw Normal View History

2023-08-21 09:19:40 -04:00
# Programs to check warnings for as defined by the chad standard
2023-08-21 10:18:26 -04:00
ARGS:=${TARGET} < source/main.c
GCC:=gcc
2023-08-21 10:13:24 -04:00
D.versions:=-D_XOPEN_SOURCE=700
2023-08-21 10:18:26 -04:00
GCC.warnings:=-Wall -Wextra -Wpedantic -Wvla -Wshadow -Wundef
2023-08-21 14:07:39 -04:00
GCC.debug:=-Og -ggdb -pg -fno-inline
2023-08-21 10:18:26 -04:00
CLANG:=clang
CLANG.warnings:=-Weverything
2023-08-21 09:19:40 -04:00
VALGRIND:=valgrind
2023-08-19 18:49:10 -04:00
VALGRIND.flags:=--track-origins=yes --leak-check=full --show-leak-kinds=all
2023-08-21 09:19:40 -04:00
chad_test:
${CLANG} ${D.versions} ${GCC.warnings} ${SRC} -o ${TARGET}
2023-08-21 14:07:39 -04:00
${GCC} ${D.versions} ${GCC.debug} ${GCC.warnings} ${SRC} -o ${TARGET}
2023-08-21 09:19:40 -04:00
${VALGRIND} ${VALGRIND.flags} $(shell pwd)/${TARGET} ${ARGS}