modal/makefile

36 lines
1.1 KiB
Makefile
Raw Normal View History

2024-04-04 12:04:27 -04:00
RELEASE_flags=-DNDEBUG -O2 -g0 -s
2024-04-28 23:07:41 -04:00
DEBUG_flags=-std=c99 -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-04 12:04:27 -04:00
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-26 01:39:37 -04:00
@ bin/modal -q examples/hello.modal
2024-04-18 14:45:32 -04:00
debug: all bin/modal-debug
2024-05-09 19:17:12 -04:00
@ bin/modal-debug -a examples/file.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-24 14:20:34 -04:00
@ bin/modal-debug -q examples/fizzbuzz.modal
@ bin/modal-debug -q examples/sierpinski.modal
2024-04-18 14:45:32 -04:00
@ bin/modal-debug -q examples/tests.modal
2024-05-09 19:17:12 -04:00
@ bin/modal-debug -a examples/file.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