From: Lawrence S. <ljs...@us...> - 2013-08-12 22:32:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 441060707f0d382a49bc568748bb7ba16a7e86b8 (commit) from da33c868b249bedd99fffb425fade3a25579e42d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 441060707f0d382a49bc568748bb7ba16a7e86b8 Author: Lawrence Sebald <ljs...@us...> Date: Mon Aug 12 18:31:03 2013 -0400 Add automatic Makefile dependency generation if you define the KOS_DEPDIR variable in your Makefile. ----------------------------------------------------------------------- Summary of changes: Makefile.rules | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/Makefile.rules b/Makefile.rules index 000740f..c66b170 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -7,6 +7,8 @@ # Global KallistiOS Makefile include # Build rules +ifndef KOS_DEPDIR + %.o: %.c kos-cc $(CFLAGS) -c $< -o $@ @@ -16,6 +18,21 @@ %.o: %.cpp kos-c++ $(CFLAGS) $(CXXFLAGS) -c $< -o $@ +else + +%.o: %.c + kos-cc $(CFLAGS) -c $< -o $@ -MD -MF $(KOS_DEPDIR)/$(patsubst %.c,%.md,$(subst /,__,$(subst ..,,$<))) + +%.o: %.cc + kos-c++ $(CFLAGS) $(CXXFLAGS) -c $< -o $@ -MD -MF $(KOS_DEPDIR)/$(patsubst %.c,%.md,$(subst /,__,$(subst ..,,$<))) + +%.o: %.cpp + kos-c++ $(CFLAGS) $(CXXFLAGS) -c $< -o $@ -MD -MF $(KOS_DEPDIR)/$(patsubst %.c,%.md,$(subst /,__,$(subst ..,,$<))) + +-include $(wildcard $(KOS_DEPDIR)/*.md) + +endif + %.o: %.s kos-as $< -o $@ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |