2011-05-01 22:18:52 +02:00
|
|
|
######################################################################
|
|
|
|
# Auto-dependency
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
C_DEPFILES := $(RUNTIME_CS:%.cpp=%.d) $(RUSTLLVM_LIB_CS:%.cpp=%.d) \
|
|
|
|
$(RUSTLLVM_OBJS_CS:%.cpp=%.d)
|
|
|
|
|
2011-11-24 00:20:28 +01:00
|
|
|
rt/%.d: rt/%.cpp $(MKFILE_DEPS)
|
2011-05-01 22:18:52 +02:00
|
|
|
@$(call E, dep: $@)
|
|
|
|
$(Q)$(call CFG_DEPEND_C, $@ \
|
|
|
|
$(subst $(S)src/,,$(patsubst %.cpp, %.o, $<)), \
|
|
|
|
$(RUNTIME_INCS)) $< >$@.tmp
|
|
|
|
$(Q)$(CFG_PATH_MUNGE) $@.tmp
|
|
|
|
$(Q)rm -f $@.tmp.bak
|
|
|
|
$(Q)mv $@.tmp $@
|
|
|
|
|
2011-11-24 00:20:28 +01:00
|
|
|
rustllvm/%.d: rustllvm/%.cpp $(MKFILE_DEPS) $(LLVM_CONFIG_$(CFG_HOST_TRIPLE))
|
2011-05-01 22:18:52 +02:00
|
|
|
@$(call E, dep: $@)
|
|
|
|
$(Q)$(call CFG_DEPEND_C, $@ \
|
|
|
|
$(subst $(S)src/,,$(patsubst %.cpp, %.o, $<)), \
|
2011-11-03 00:21:17 +01:00
|
|
|
$(LLVM_CXXFLAGS_$(CFG_HOST_TRIPLE)) $(RUSTLLVM_INCS)) $< >$@.tmp
|
2011-05-01 22:18:52 +02:00
|
|
|
$(Q)$(CFG_PATH_MUNGE) $@.tmp
|
|
|
|
$(Q)rm -f $@.tmp.bak
|
|
|
|
$(Q)mv $@.tmp $@
|
|
|
|
|
|
|
|
ifneq ($(MAKECMDGOALS),clean)
|
2011-05-04 00:51:21 +02:00
|
|
|
-include $(C_DEPFILES)
|
2011-05-01 22:18:52 +02:00
|
|
|
endif
|
|
|
|
|
2011-05-04 00:51:21 +02:00
|
|
|
depend: $(C_DEPFILES)
|