libhl/chad.mk
2023-08-28 12:56:34 -06:00

18 lines
545 B
Makefile

ARGS:=${TARGET} < source/main.c
GCC:=gcc
D.versions:=-D_XOPEN_SOURCE=700
GCC.warnings:=-Wall -Wextra -Wpedantic -Wvla -Wshadow -Wundef
GCC.debug:=-O0 -ggdb -pg -fno-inline
CLANG:=clang
CLANG.warnings:=-Weverything
VALGRIND:=valgrind
VALGRIND.flags:=--track-origins=yes --leak-check=full --show-leak-kinds=all
chad_test:
${CLANG} ${CPPFLAGS} ${D.versions} ${CLANG.warnings} ${SRC} -o ${TARGET}
${GCC} ${CPPFLAGS} ${D.versions} ${GCC.debug} ${GCC.warnings} ${SRC} -o ${TARGET}
${VALGRIND} ${VALGRIND.flags} $(shell pwd)/${TARGET} ${ARGS}