From: <ch...@su...> - 2013-09-03 11:06:44
|
Hi! > But I think that my approach is easier to understand: we explicitly > define object files targets, make them depend on compat_16.h and also > mark them as intermediate targets (so make will remove them after linking). > > And if we make binaries to depend on compat_16.h gcc treats this header > file not as a header: > > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall > -I/home/stas/ltp/testcases/kernel/include > -I/home/stas/ltp/testcases/kernel/syscalls/setgroups > -I/home/stas/ltp/testcases/kernel/syscalls/setgroups/../utils > -I../../../../include -I../../../../include -L../../../../lib > setgroups01.c > /home/stas/ltp/testcases/kernel/syscalls/setgroups/../utils/compat_16.h > -lltp -o setgroups01 > > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall > -I/home/stas/ltp/testcases/kernel/include > -I/home/stas/ltp/testcases/kernel/syscalls/setgroups > -I/home/stas/ltp/testcases/kernel/syscalls/setgroups/../utils > -I../../../../include -I../../../../include > -DTST_USE_COMPAT16_SYSCALL=1 -c -o setgroups01_16.o setgroups01.c > gcc -L../../../../lib setgroups01_16.o > /home/stas/ltp/testcases/kernel/syscalls/setgroups/../utils/compat_16.h > -lltp -o setgroups01_16 > > It doesn't look nice :) Ah, it gets to the list of prerequisities and gets apended to the linking. I Should have noticed this. I guess that your approach is better. -- Cyril Hrubis ch...@su... |