shortcode/Makefile
2023-07-12 22:23:33 -03:00

18 lines
415 B
Makefile

CC=tcc
all: tests
shortcodes.c: shortcodes.rl
ragel -G2 -L shortcodes.rl -o shortcodes.c
%.o: %.c
$(CC) -fPIC -c -o $@ $^ -g
tests.so: shortcodes.o tests.o
$(CC) -shared -g -o $@ $^ -lbg -lcgreen
test-binary: shortcodes.c tests.c
$(CC) -g -o tests shortcodes.c tests.c -DMAIN=1 -lbg -lcgreen
clean:
rm -f shortcodes.c *.o *.so
test: tests.so
cgreen-runner $^
debug:
cgreen-debug tests.so
.PHONY: test debug