This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I'm trying to clean up some cross-compiles on my system that use makedepend to generate makefile dependencies. The problem with make depend is that it assumes the system include directories are in the usual place which of course they are not for cross-compiling.
I thought I could do a hack using gcc's -print-search-dirs but that wasn't quite what I wanted. Is there another way or some obscure command line parameter I've missed?
$(CDEPEND): $(LOCAL_ARCH_DIR)/%.d: %.c $(CC) $(CFLAGS) $< -MM -MG | sed -e 's,^[^:]*:,$@.o $@: ,g' -e 's,\.d\.o,.o,' > $@ -include $(CDEPEND)
The gnu make mailing list archives probably are full of examples of use of the -MM option. It's a bit tricky to use, but I think both Automake and SCons use it (not sure). If SCons doesn't, it'd be interesting to see what it does do; maybe it's got its own parser. - Dan
-- Dan Kegel http://www.kegel.com http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |