libhl/Makefile

28 lines
437 B
Makefile
Raw Normal View History

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
SRC.dir:=source/
2023-08-16 01:06:37 -04:00
SRC:=$(shell find ${SRC.dir} -iname '*.c')
HDR:=$(shell find ${SRC.dir} -iname '*.h')
2023-08-16 01:06:37 -04:00
OBJ:=$(subst .c,.o,${SRC})
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 $@
install:
cp hl /usr/bin/hl
clean:
-rm ${OBJ}
-rm ${OUT}
2023-08-16 11:30:29 -04:00
test: chad_test