mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
makefile: generate depfiles for the correct object files
The depfiles were completely ineffective. Now this is fixed. The -MT argument sets the path for the dependenency root. By default it is set only to a filename, and thus does not include the full path of the file.
This commit is contained in:
parent
9a58198303
commit
e033909819
2 changed files with 2 additions and 2 deletions
|
|
@ -44,7 +44,7 @@ run: $(run_tests)
|
|||
|
||||
%.o: %.c
|
||||
$(CC) -c $(CFLAGS) $(IFLAGS) -o $*.o $*.c
|
||||
$(CC) -MM $(CFLAGS) $(IFLAGS) $*.c > $*.d
|
||||
$(CC) -MM $(CFLAGS) $(IFLAGS) -MT $*.o $*.c > $*.d
|
||||
|
||||
test_%: %.o $(objs)
|
||||
$(CC) $(CFLAGS) -rdynamic -o $@ $*.o $(objs) $(LINCLUDE) $(LDLIBS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue