From 5cfc4dd06e0fabedacff605667932ae7f0a2a278 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 7 May 2016 17:10:45 -0400 Subject: handle remaking changes in libvt100 automatically previously it required `make clean && make` --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0ec8698..edcbfa3 100644 --- a/Makefile +++ b/Makefile @@ -49,8 +49,10 @@ $(DOUT): $(DOBJ) libvt100/libvt100.a $(COUT): $(COBJ) $(CC) -o $@ $^ $(ALLLDFLAGS) -libvt100/libvt100.a: - cd libvt100 && make static +libvt100/libvt100.a: make-libvt100 + +make-libvt100: + @if ! $(MAKE) -q -C libvt100 static; then $(MAKE) -C libvt100 static; MAKELEVEL=$(echo "${MAKELEVEL}-1" | bc) exec $(MAKE); fi $(BUILD)%.o: $(SRC)%.c @mkdir -p $(BUILD) @@ -75,4 +77,4 @@ help: -include $(OBJ:$(BUILD)%.o=$(BUILD).%.d) -.PHONY: all run run-daemon clean help +.PHONY: all run run-daemon clean help make-libvt100 -- cgit v1.2.3