summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rw-r--r--minic/Makefile11
-rw-r--r--src/Makefile4
3 files changed, 15 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index bb87706..ae15d15 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
-.PHONY: all check
-all:
-	@make -C $@
+.PHONY: all clean check
+all clean:
+	@make -C src $@
+	@make -C minic $@
 check: all
 	test/go.sh all
diff --git a/minic/Makefile b/minic/Makefile
index 39b2946..1999cf0 100644
--- a/minic/Makefile
+++ b/minic/Makefile
@@ -1,8 +1,13 @@
-CFLAGS=-g -Wall
+BIN = minic
 
-minic: yacc minic.y
+CFLAGS += -g -Wall
+
+$(BIN): yacc minic.y
 	./yacc minic.y
 	$(CC) $(CFLAGS) -o $@ y.tab.c
+
+all: $(BIN)
 clean:
 	rm -f yacc minic y.*
-.PHONY: clean
+
+.PHONY: all clean
diff --git a/src/Makefile b/src/Makefile
index e1c5c4a..8fdf29f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -15,10 +15,12 @@ config.h:
 	esac > $@
 
 
-.PHONY: clean check syndoc
+all: $(BIN)
 clean:
 	rm -f $(BIN) $(OBJ)
 check:
 	make -C .. check
 syndoc:
 	unison -auto doc ssh://qcar@h/data/d/ssa-doc
+
+.PHONY: all clean check syndoc