]> git.xolatile.top Git - public-libhl.git/commitdiff
Added build system
authorEmil <emilwilliams@tuta.io>
Wed, 16 Aug 2023 05:06:37 +0000 (23:06 -0600)
committerEmil <emilwilliams@tuta.io>
Wed, 16 Aug 2023 05:06:37 +0000 (23:06 -0600)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..f986218
--- /dev/null
+++ b/Makefile
@@ -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 $@