Add error reporting/checking

This commit is contained in:
2023-07-13 21:24:37 -03:00
parent 4dcd067ca7
commit 34a16bd6bd
4 changed files with 12 additions and 9 deletions

View File

@ -2,10 +2,8 @@ CC=gcc
all: test
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
tests.so: shortcodes.c tests.c
$(CC) -fPIC -shared -g -o $@ $^ -lbg -lcgreen
clean:
rm -f shortcodes.c *.o *.so tests
test: tests.so