diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-02-27 13:09:06 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-02-27 13:09:06 +0100 |
commit | 5f7c401d3a5553f628d83df3832e19de22e64ca9 (patch) | |
tree | 12f5d2c6eec055f89daef1a8ceca64977812e390 /makefiles/nmake/depend.mk | |
parent | b25d92d869e37e9b8467889c0f7311c70815cfd8 (diff) | |
download | wolfbones-5f7c401d3a5553f628d83df3832e19de22e64ca9.tar.gz wolfbones-5f7c401d3a5553f628d83df3832e19de22e64ca9.tar.bz2 |
synchronized nmake with gmake, kept W32 adaptions which are already working
Diffstat (limited to 'makefiles/nmake/depend.mk')
-rw-r--r-- | makefiles/nmake/depend.mk | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/makefiles/nmake/depend.mk b/makefiles/nmake/depend.mk index bd49fe1..bcdb5b2 100644 --- a/makefiles/nmake/depend.mk +++ b/makefiles/nmake/depend.mk @@ -4,27 +4,64 @@ # requires: # - compilers CC and CCPP # - INCLUDEDIRS -# - OBJS, CPP_OBJS and BIN_OBJS +# - OBJS, CPP_OBJS and BIN_OBJS, CPP_BIN_OBJS +# - TEST_BINS, TEST_BIN_OBJS, TEST_CPP_BINS, TEST_CPP_BIN_OBJS # # provides: # - included dependency files # # author: Andreas Baumann, abaumann at yahoo dot com -MAKEDEPEND = $(CC) -MM $(INCLUDE_DIRS) -CCPP_MAKEDEPEND = $(CCPP) -MM $(INCLUDE_DIRS) +ifeq "$(COMPILER)" "gcc" %.d : %.c @echo Generating dependencies for $< - @$(MAKEDEPEND) $(CFLAGS) $< | \ + @$(CC) -DMAKE_DEPENDENCIES -MM -MT $@ $(CFLAGS) $< | \ sed "s,\($*\.o\)[ :]*\(.*\),$@ : $$\(wildcard \2\)\&\&\&\1 : \2,g" | tr -s '&' "\n" > $@ %.d : %.cpp @echo Generating dependencies for $< - @$(CCPP_MAKEDEPEND) $(CCPPFLAGS) $< | \ + @$(CCPP) -DMAKE_DEPENDENCIES -MM -MT $@ $(CCPPFLAGS) $< | \ sed "s,\($*\.o\)[ :]*\(.*\),$@ : $$\(wildcard \2\)\&\&\&\1 : \2,g" | tr -s '&' "\n" > $@ +endif + +ifeq "$(COMPILER)" "tcc" + +%.d : %.c + @echo Generating dependencies for $< + @makedepend -DMAKE_DEPENDENCIES $(INCLUDE_DIRS) -I/usr/lib/tcc/include -f - $< > $@ + +endif + +ifeq "$(COMPILER)" "icc" + +%.d : %.c + @echo Generating dependencies for $< + @$(CC) -DMAKE_DEPENDENCIES -MM -MT $@ $(CFLAGS) $< | \ + sed "s,\($*\.o\)[ :]*\(.*\),$@ : $$\(wildcard \2\)\&\&\&\1 : \2,g" | tr -s '&' "\n" > $@ + +%.d : %.cpp + @echo Generating dependencies for $< + @$(CCPP) -DMAKE_DEPENDENCIES -MM -MT $@ $(CCPPFLAGS) $< | \ + sed "s,\($*\.o\)[ :]*\(.*\),$@ : $$\(wildcard \2\)\&\&\&\1 : \2,g" | tr -s '&' "\n" > $@ + +endif + +ifeq "$(COMPILER)" "spro" + +%.d : %.c + @echo Generating dependencies for $< + @$(CC) -DMAKE_DEPENDENCIES -xM1 $(INCLUDE_DIRS) $< > $@ + +%.d : %.cpp + @echo Generating dependencies for $< + @$(CCPP) -DMAKE_DEPENDENCIES -xM1 $(INCLUDE_DIRS) $< > $@ +endif + -include $(OBJS:.o=.d) -include $(CPP_OBJS:.o=.d) -include $(BIN_OBJS:.o=.d) -include $(CPP_BIN_OBJS:.o=.d) +-include $(TEST_BIN_OBJS:.o=.d) +-include $(TEST_CPP_BIN_OBJS:.o=.d) |