modal/makefile

29 lines
753 B
Makefile
Raw Normal View History

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-05 13:34:46 -04:00
.PHONY: all debug dest run test install uninstall format clean archive
2024-04-04 12:04:27 -04:00
all: dest bin/modal
dest:
@ mkdir -p bin
run: all
2024-04-04 18:33:22 -04:00
@ bin/modal examples/test.modal
2024-04-04 12:04:27 -04:00
test: all
@ bin/modal -v
2024-04-04 18:33:22 -04:00
@ bin/modal examples/test.modal
2024-04-04 12:04:27 -04:00
install: all
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
bin/modal: src/modal.c
@ cc ${DEBUG_flags} ${CFLAGS} src/modal.c -o bin/modal