diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-01-22 09:00:07 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-01-22 09:00:07 +0000 |
commit | c0a4a8884e773bcd9ce5a0481fd992c4a1187c35 (patch) | |
tree | db028b4b43d2895100c61636aa505d26ff9f02fc | |
parent | ada392b80647115420cf6d340278d244d1a0286e (diff) |
Added dependencies for the source files.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@105 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | lib/make/make.config.rules.in | 13 | ||||
-rw-r--r-- | lib/make/make.subdir | 5 | ||||
-rw-r--r-- | lib/make/make.thornlib | 8 |
3 files changed, 26 insertions, 0 deletions
diff --git a/lib/make/make.config.rules.in b/lib/make/make.config.rules.in index 31cc9a47..b8437a74 100644 --- a/lib/make/make.config.rules.in +++ b/lib/make/make.config.rules.in @@ -15,11 +15,24 @@ %.o: $(SRCDIR)/%.c $(CC) $(CFLAGS) -c -o $@ $< $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DCCODE +%.d: $(SRCDIR)/%.c + $(CPP) -M $(CFLAGS) $< $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DCCODE > $@ + %.o: $(SRCDIR)/%.cc $(CXX) $(CXXFLAGS) -c -o $@ $< $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DCCODE +%.d: $(SRCDIR)/%.cc + $(CPP) -M $(CFLAGS) $< $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DCCODE > $@ + %.o: $(SRCDIR)/%.F77 $(F77) $(F77FLAGS) -c -o $@ $< $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DFCODE +%.d: $(SRCDIR)/%.F77 + $(CPP) -M $(F77FLAGS) $< $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DFCODE > $@ + %.o: $(SRCDIR)/%.F $(F90) $(F90FLAGS) -c -o $@ $< $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DFCODE + +%.d: $(SRCDIR)/%.F77 + $(CPP) -M $(F77FLAGS) $< $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DFCODE > $@ + diff --git a/lib/make/make.subdir b/lib/make/make.subdir index 91b6e124..563199a2 100644 --- a/lib/make/make.subdir +++ b/lib/make/make.subdir @@ -38,3 +38,8 @@ include $(CONFIG)/make.config.rules # warnings if it is missing. -include $(SRCDIR)/make.code.deps +# Dependency stuff + +ifneq ($(strip $(SRCS)),) +-include $(patsubst %,%.d,$(basename $(SRCS))) +endif diff --git a/lib/make/make.thornlib b/lib/make/make.thornlib index be540269..d0ae1667 100644 --- a/lib/make/make.thornlib +++ b/lib/make/make.thornlib @@ -31,6 +31,8 @@ include $(SRCDIR)/make.code.defn # Some extra stuff to allow make to recurse into subdirectories CCTK_SRCS += $(SRCS) +LOCAL_SRCS := $(SRCS) + # Include all the make.code.defn files for the subdirectories # These have to be wrapped to allow us to concatanate all the # SRCS definitions, complete with subdirectory names. @@ -71,3 +73,9 @@ $(addsuffix .check, $(SUBDIRS)) : $(addsuffix /make.identity, $(SUBDIRS)): if [ ! -d $(dir $@) ] ; then mkdir $(dir $@) ; fi echo CCTK_THIS_SUBDIR := $(dir $@) > $@ + +# Dependency stuff + +ifneq ($(strip $(LOCAL_SRCS)),) +-include $(patsubst %,%.d,$(basename $(LOCAL_SRCS))) +endif |