libhl/chad.mk

19 lines
533 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
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:
${GCC} ${D.versions} ${GCC.warnings} ${SRC} -o ${TARGET}
${CLANG} ${D.versions} ${GCC.warnings} ${SRC} -o ${TARGET}
2023-08-21 09:19:40 -04:00
${VALGRIND} ${VALGRIND.flags} $(shell pwd)/${TARGET} ${ARGS}