makefile: add clean-target, make build-targets more generic

This commit is contained in:
xesc 2024-10-12 21:04:46 +02:00
parent 67a044a3c9
commit 20f4ae0581

View file

@ -1,11 +1,14 @@
.PHONY: debug release run
release: src/wte.c
gcc -o build/wte -O2 -Wall -Wextra -pedantic -Werror src/wte.c
release: src/*.c
gcc -o build/wte -O2 -Wall -Wextra -pedantic -Werror src/*.c
run: release
./build/wte
debug: src/wte.c
gcc -o build/wte -ggdb3 -DDEBUG -Wall -Wextra -pedantic -Werror src/wte.c
debug: src/*.c
gcc -o build/wte -ggdb3 -DDEBUG -Wall -Wextra -pedantic -Werror src/*.c
clean:
rm -f build/*