summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1d3addf..c8bca05 100644
--- a/Makefile
+++ b/Makefile
@@ -22,14 +22,20 @@ $(TARGET): $(OBJ_FILES) termio/libtermio.a
@echo LD $@
@$(CXX) $(CXXFLAGS) -o $@ $^ termio/libtermio.a $(LDFLAGS)
-$(OBJDIR)/%.o: %.cpp
+$(OBJDIR)/%.o: %.cpp termio/libtermio.a
@mkdir -p $(dir $@)
@echo CXX $<
@$(CXX) $(CXXFLAGS) -c -o $@ $<
-$(OBJDIR)/%.d: %.cpp
+$(OBJDIR)/%.d: %.cpp termio/libtermio.a
@mkdir -p $(dir $@)
@echo DEP $<
@$(CXX) -MT $(OBJDIR)/$*.o -MM $(CXXFLAGS) $< >$@
+termio/.git:
+ git submodule update --init
+
+termio/libtermio.a: termio/.git $(wildcard termio/*.c termio/*.h)
+ make -C termio
+
-include $(DEP_FILES)