Added build system

This commit is contained in:
Emil 2023-08-15 23:06:37 -06:00
parent 0113a24f28
commit 5d02395817
No known key found for this signature in database
GPG Key ID: 5432DB986FDBCF8A

12
Makefile Normal file
View File

@ -0,0 +1,12 @@
CFLAGS:=-std=c99 -O2 -Wall -Wextra -Wpedantic -Wvla -Wshadow -Wundef
CPPFLAGS:=-D_FORTIFY_SOURCE=2
SRC.dir:=src/
SRC:=$(shell find ${SRC.dir} -iname '*.c')
OBJ:=$(subst .c,.o,${SRC})
%.o: %.c
${COMPILE.c} $< -o $@
hl: ${OBJ}
${LINK.c} ${OBJ} -o $@