2024-04-04 12:04:27 -04:00
|
|
|
RELEASE_flags=-DNDEBUG -O2 -g0 -s
|
|
|
|
DEBUG_flags=-std=c89 -D_POSIX_C_SOURCE=199309L -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined
|
|
|
|
|
2024-04-17 14:40:47 -04:00
|
|
|
.PHONY: all debug dest run debug test install uninstall format clean archive
|
2024-04-04 12:04:27 -04:00
|
|
|
|
2024-04-08 18:47:58 -04:00
|
|
|
all: dest
|
2024-04-04 12:04:27 -04:00
|
|
|
|
|
|
|
dest:
|
|
|
|
@ mkdir -p bin
|
2024-04-08 19:04:31 -04:00
|
|
|
run: all bin/modal
|
2024-04-24 14:12:57 -04:00
|
|
|
@ bin/modal -q examples/hello.modal
|
2024-04-18 14:45:32 -04:00
|
|
|
debug: all bin/modal-debug
|
2024-04-17 14:40:47 -04:00
|
|
|
@ bin/modal-debug examples/hello.modal
|
2024-04-18 14:45:32 -04:00
|
|
|
test: all bin/modal-debug bin/modal
|
2024-04-10 15:30:17 -04:00
|
|
|
@ bin/modal -v
|
2024-04-18 14:45:32 -04:00
|
|
|
@ bin/modal-debug -q examples/tests.modal
|
2024-04-08 18:47:58 -04:00
|
|
|
install: bin/modal
|
2024-04-05 13:34:46 -04:00
|
|
|
cp bin/modal ~/bin/
|
2024-04-04 12:04:27 -04:00
|
|
|
uninstall:
|
2024-04-05 13:34:46 -04:00
|
|
|
rm -f ~/bin/modal
|
2024-04-04 12:04:27 -04:00
|
|
|
format:
|
|
|
|
@ clang-format -i src/modal.c
|
|
|
|
clean:
|
2024-04-05 13:34:46 -04:00
|
|
|
rm -fr bin
|
|
|
|
archive: all
|
|
|
|
cp src/modal.c ../oscean/etc/modal.c.txt
|
2024-04-04 12:04:27 -04:00
|
|
|
|
2024-04-08 18:47:58 -04:00
|
|
|
bin/modal-debug: src/modal.c
|
|
|
|
@ cc ${DEBUG_flags} src/modal.c -o bin/modal-debug
|
2024-04-04 12:04:27 -04:00
|
|
|
bin/modal: src/modal.c
|
2024-04-08 19:04:31 -04:00
|
|
|
@ cc ${RELEASE_flags} src/modal.c -o bin/modal
|
2024-04-04 12:04:27 -04:00
|
|
|
|