Added recursive make rules

This commit is contained in:
Bruce Hill 2022-05-02 17:24:20 -04:00
parent e071ac7b12
commit eb0f18dc79

View File

@ -25,7 +25,7 @@ ALL_FLAGS=$(CFLAGS) $(OSFLAGS) -DBP_NAME="\"$(NAME)\"" $(EXTRA) $(CWARN) $(G) $(
CFILES=pattern.c utils.c match.c files.c printmatch.c json.c utf8.c
OBJFILES=$(CFILES:.c=.o)
all: $(NAME) bp.1
all: $(NAME) bp.1 lua
%.o: %.c %.h utf8.h
$(CC) -c $(ALL_FLAGS) -o $@ $<
@ -42,6 +42,9 @@ tags: $(CFILES) bp.c
clean:
rm -f $(NAME) $(OBJFILES)
lua:
cd Lua && make
test: $(NAME)
./$(NAME) Comment -r '[@0]' >/dev/null
./$(NAME) -g ./grammars/bp.bp -p Grammar ./grammars/bp.bp >/dev/null
@ -81,4 +84,4 @@ uninstall:
[ "$$confirm" != n ] && rm -rf ~/.config/$(NAME); \
fi
.PHONY: all clean install uninstall leaktest splint test tutorial
.PHONY: all clean install uninstall leaktest splint test tutorial lua