mirror of https://git.sr.ht/~rabbits/thuesday
30 lines
899 B
Makefile
30 lines
899 B
Makefile
|
|
EMU_src=src/modal.c src/thuesday.c src/viewport.c
|
|
|
|
RELEASE_flags=-DNDEBUG -O2 -g0 -s
|
|
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
|
|
|
|
.PHONY: all debug dest run test install uninstall format clean archive
|
|
|
|
all: dest
|
|
|
|
dest:
|
|
@ mkdir -p bin
|
|
run: all bin/thuesday
|
|
@ bin/thuesday examples/dvd.modal
|
|
debug: all bin/thuesday-debug
|
|
@ bin/thuesday-debug examples/dvd.modal
|
|
install: all
|
|
@ cp bin/thuesday ~/bin/
|
|
uninstall:
|
|
@ rm -f ~/bin/thuesday
|
|
format:
|
|
@ clang-format -i src/*
|
|
clean:
|
|
@ rm -fr bin
|
|
|
|
bin/thuesday: ${EMU_src}
|
|
@ cc ${RELEASE_flags} ${CFLAGS} ${EMU_src} -lX11 -lutil -o bin/thuesday
|
|
bin/thuesday-debug: ${EMU_src}
|
|
@ cc ${DEBUG_flags} ${CFLAGS} ${EMU_src} -lX11 -lutil -o bin/thuesday-debug
|