
I have a stupid question: why the depend uses CPPFLAGS instead instead CFLAGS?
can this patch be acceptable? Or there is something that I don't understand?
diff --git a/rules.mk b/rules.mk index 6f999dd..998dd4e 100644 --- a/rules.mk +++ b/rules.mk @@ -29,7 +29,7 @@ $(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(SRCS) @rm -f $@ @for f in $(SRCS); do \ g=`basename $$f | sed -e 's/(.*).\w/\1.o/'`; \ - $(CC) -M $(HOSTCFLAGS) $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \ + $(CC) -M $(HOSTCFLAGS) $(CPPFLAGS) $(CFLAGS) -MQ $(obj)$$g $$f >> $@ ; \ done
thank again and best regards,
luigi
On Mon, Jul 27, 2009 at 9:33 PM, Mike Frysingervapier@gentoo.org wrote:
On Monday 27 July 2009 15:12:11 Luigi Mantellini wrote:
On Mon, Jul 27, 2009 at 8:58 PM, Mike Frysingervapier@gentoo.org wrote:
CFLAGS bugs? I tried to comment the -I...blablalb... and the build (crrectly) fails. Can you remove the .depend from your source dir?
i said it doesnt matter. but if you're going to continue down this line of reasoning anyways, i just did `git clean -x -d` and got the same result.
Very strange...which compiler are you using? I'm using a gcc4.3.3 (buitl using openwrt trunk)
the gcc doesnt matter (but i am using 4.3.3 too). i already pointed out the issue -- the common .depend code does not use $(CFLAGS), and the lzma code isnt using proper paths.
just change the *1* include and drop the -I path hack and be done with it.
--- a/lib_generic/lzma/LzmaDec.c +++ b/lib_generic/lzma/LzmaDec.c @@ -9 +9 @@ -#include <string.h> +#include <linux/string.h> --- a/lib_generic/lzma/Makefile +++ b/lib_generic/lzma/Makefile @@ -33 +33 @@ SOBJS = -CFLAGS += -D_LZMA_PROB32 -I$(TOPDIR)/include/linux +CFLAGS += -D_LZMA_PROB32
this is my .depend (after a git clean -x -d -f and after a make mrproper):
LzmaTools.o: LzmaTools.c /mnt/devel/onu/u-boot-onu/include/config.h \
i said LzmaDec.c, not LzmaTools.c
just run: $ touch lib_generic/lzma/LzmaDec.c $ make depend SUBDIRS=lib_generic/lzma for dir in lib_generic/lzma ; do make -C $dir _depend ; done make[1]: Entering directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma' LzmaDec.c:9:20: error: string.h: No such file or directory make[1]: Leaving directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma' make[1]: Entering directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/usr/local/src/u-boot/blackfin/lib_generic/lzma' -mike