summaryrefslogtreecommitdiff
path: root/mk/c.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/c.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) || \