2023-07-13 01:26:21 +00:00
|
|
|
CC=gcc
|
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
|
2023-07-12 19:09:17 +00:00
|
|
|
clean:
|
2023-07-13 01:26:21 +00:00
|
|
|
rm -f shortcodes.c *.o *.so tests
|
2023-07-13 01:22:22 +00:00
|
|
|
test: tests.so
|
|
|
|
cgreen-runner $^
|
|
|
|
debug:
|
|
|
|
cgreen-debug tests.so
|
|
|
|
.PHONY: test debug
|