aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2016-05-07 17:10:45 -0400
committerJesse Luehrs <doy@tozt.net>2016-05-07 17:25:05 -0400
commit5cfc4dd06e0fabedacff605667932ae7f0a2a278 (patch)
tree1a7d8de7e3e65dd0e32a8cb6d074401da0446a6a
parente3d4f9f01d9777e2c982486535a1a3d6ea586594 (diff)
downloadrunes-5cfc4dd06e0fabedacff605667932ae7f0a2a278.tar.gz
runes-5cfc4dd06e0fabedacff605667932ae7f0a2a278.zip
handle remaking changes in libvt100 automatically
previously it required `make clean && make`
-rw-r--r--Makefile8
1 files 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