Date: Wed, 23 Nov 1994 20:28:44 -0800 (PST) From: Gordon Hogenson To: "Peter K. Campbell"

Cc: djgpp AT sun DOT soe DOT clarkson DOT edu, p DOT campbell AT trl DOT OZ DOT AU Subject: Re: Make depend on DOS? On Thu, 24 Nov 1994, Peter K. Campbell wrote: > This would merely be annoying, except for the fact that I can find > nothing to automatically generate dependencies, which means it looks > like I have to go through and add a useless: > name.o: name.c > line for every one of my source files. > For the name.o: name.c you can of course just use .o.c : gcc $(CFLAGS) -c $< -o $@ You can use the -M or -MM options to gcc, which generate dependency files: .PHONY: depend depend : gcc -MM *.c *.cc > makefile.dep The difference between -M and -MM is that -MM does not include the system header files (actually anything included with the <> syntax) in the list of dependencies. Gordon