Merge branch 'akpm' (patches from Andrew)
[cascardo/linux.git] / scripts / Makefile.lib
index 76494e1..0a07f90 100644 (file)
@@ -155,9 +155,10 @@ else
 # $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files
 #   and locates generated .h files
 # FIXME: Replace both with specific CFLAGS* statements in the makefiles
-__c_flags      = $(call addtree,-I$(obj)) $(call flags,_c_flags)
-__a_flags      =                          $(call flags,_a_flags)
-__cpp_flags     =                          $(call flags,_cpp_flags)
+__c_flags      = $(if $(obj),-I$(srctree)/$(src) -I$(obj)) \
+                 $(call flags,_c_flags)
+__a_flags      = $(call flags,_a_flags)
+__cpp_flags     = $(call flags,_cpp_flags)
 endif
 
 c_flags        = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE)     \