delorie.com/archives/browse.cgi | search |
At 19:27 12.01.2002 +0200, you wrote: >Why do you ned this? The details matter in this case, so please >describe those details. The problem is the following normally when using the -MMD option to gcc it will create a dependecy for a source file in a file called <sourcename>.d and the tragets name will be called <sourcename>.o. But in my makefile i want to create the objects in a directory ./obj/ like so: OBJPATH = ./obj/ $(OBJPATH)%.o : %.c $(CC) $(CFLAGS) -c $< -o $@ So now when i include the *.d dependecies the targets names are not the same and so make won't check for the change of the include files it just uses the above rule. So every time gcc is invoked i want to change the content of DEPENDENCIES_OUTPUT where you can directly specify the targets name as the second value (i'd use $@ for it). It could be so easy if i could specify the targets name directly to gcc, i'm currently using version 2.952, i think thats a feature which should be added to later versions (maybe it has already been done?). I really want to do it this way because i think the whole directory structure is much clearer. Greetings, Martin
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |