shortcode/Makefile

18 lines
415 B
Makefile
Raw Normal View History

2023-07-13 01:23:33 +00:00
CC=tcc
2023-07-12 19:09:17 +00:00
all: tests
2023-07-10 21:19:34 +00:00
shortcodes.c: shortcodes.rl
2023-07-13 01:22:22 +00:00
ragel -G2 -L shortcodes.rl -o shortcodes.c
2023-07-13 01:08:16 +00:00
%.o: %.c
2023-07-13 01:22:22 +00:00
$(CC) -fPIC -c -o $@ $^ -g
2023-07-13 01:08:16 +00:00
tests.so: shortcodes.o tests.o
2023-07-13 01:22:22 +00:00
$(CC) -shared -g -o $@ $^ -lbg -lcgreen
test-binary: shortcodes.c tests.c
$(CC) -g -o tests shortcodes.c tests.c -DMAIN=1 -lbg -lcgreen
2023-07-12 19:09:17 +00:00
clean:
2023-07-13 01:08:16 +00:00
rm -f shortcodes.c *.o *.so
2023-07-13 01:22:22 +00:00
test: tests.so
cgreen-runner $^
debug:
cgreen-debug tests.so
.PHONY: test debug