2023-08-19 07:18:34 -04:00
|
|
|
include chad.mk
|
|
|
|
DEBUG:=1
|
2023-08-19 18:49:10 -04:00
|
|
|
CFLAGS:=-std=c99 -O2 $(if ${DEBUG}, ${CHAD_DEBUG},'')
|
2023-08-16 01:06:37 -04:00
|
|
|
CPPFLAGS:=-D_FORTIFY_SOURCE=2
|
|
|
|
|
2023-08-19 07:18:34 -04:00
|
|
|
SRC.dir:=source/
|
2023-08-16 01:06:37 -04:00
|
|
|
SRC:=$(shell find ${SRC.dir} -iname '*.c')
|
2023-08-19 07:18:34 -04:00
|
|
|
HDR:=$(shell find ${SRC.dir} -iname '*.h')
|
2023-08-16 01:06:37 -04:00
|
|
|
OBJ:=$(subst .c,.o,${SRC})
|
|
|
|
|
2023-08-19 07:18:34 -04:00
|
|
|
OUT:=hl
|
|
|
|
OUTARGS:=${OUT} < source/main.c
|
|
|
|
|
|
|
|
main: ${OBJ} ${HDR}
|
|
|
|
${LINK.c} ${OBJ} -o hl
|
|
|
|
|
2023-08-16 01:06:37 -04:00
|
|
|
%.o: %.c
|
|
|
|
${COMPILE.c} $< -o $@
|
|
|
|
|
2023-08-19 07:18:34 -04:00
|
|
|
install:
|
|
|
|
cp hl /usr/bin/hl
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm ${OBJ}
|
|
|
|
-rm ${OUT}
|
2023-08-16 11:30:29 -04:00
|
|
|
|
2023-08-19 07:18:34 -04:00
|
|
|
test: chad_test
|