diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2019-02-13 23:35:31 +0100 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2019-02-13 23:41:52 +0100 |
commit | 5536436532612209a6cdd919516d14769fc51afa (patch) | |
tree | 2ca37ec2f3feea1c73facecea179cc6c1debd169 /Makefile | |
parent | bc598375da7b9a20a35e958afb61dcd690d3d7b7 (diff) |
Automatically init submodules in makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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) |