summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2012-06-19 00:59:10 -0400
committerOri Bernstein <ori@eigenstate.org>2012-06-19 00:59:10 -0400
commit08120de37bebdbabf2b5944739f06c9cb1c3591f (patch)
treeec468c18702715d9cfe435d9d8b4d47e90a80755 /mk
parentfbea64e4ab5d3532e859a87269b3105d8841ac17 (diff)
downloadmc-08120de37bebdbabf2b5944739f06c9cb1c3591f.tar.gz
Don't needlessly rebuild libraries.
Diffstat (limited to 'mk')
-rw-r--r--mk/c.mk7
1 files changed, 4 insertions, 3 deletions
diff --git a/mk/c.mk b/mk/c.mk
index 27f082c..8c090ac 100644
--- a/mk/c.mk
+++ b/mk/c.mk
@@ -16,13 +16,14 @@ CFLAGS += -MMD -MP -MF ${_DEPSDIR}/$(subst /,-,$*).d
all: subdirs $(BIN) $(LIB) $(EXTRA)
install: subdirs-install install-bin install-lib install-hdr install-pc
-$(LIB): $(OBJ) libs
+$(LIB): $(OBJ) $(DEPS)
$(AR) -rcs $@ $(OBJ)
-$(BIN): $(OBJ) $(EXTRADEP) libs
+$(BIN): $(OBJ) $(EXTRADEP) $(DEPS)
$(CC) -o $@ $(OBJ) $(_LIBSRCHPATHS) $(_LIBPATHS)
-libs: $(DEPS)
+.PHONY: $(DEPS)
+$(DEPS):
@for i in $(dir $(DEPS)); do (\
cd $$i && \
$(MAKE) || \