0001
0002
0003
0004
0005
0006
0007
0008
0009 UAPI_CFLAGS := -std=c90 -Wall -Werror=implicit-function-declaration
0010
0011
0012
0013 UAPI_CFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
0014
0015
0016 UAPI_CFLAGS += $(USERCFLAGS)
0017
0018 override c_flags = $(UAPI_CFLAGS) -Wp,-MMD,$(depfile) -I $(obj) -I $(srctree)/usr/dummy-include
0019
0020
0021
0022
0023
0024
0025
0026 no-header-test += asm/ucontext.h
0027 no-header-test += drm/vmwgfx_drm.h
0028 no-header-test += linux/am437x-vpfe.h
0029 no-header-test += linux/coda.h
0030 no-header-test += linux/cyclades.h
0031 no-header-test += linux/errqueue.h
0032 no-header-test += linux/hdlc/ioctl.h
0033 no-header-test += linux/ivtv.h
0034 no-header-test += linux/matroxfb.h
0035 no-header-test += linux/omap3isp.h
0036 no-header-test += linux/omapfb.h
0037 no-header-test += linux/patchkey.h
0038 no-header-test += linux/phonet.h
0039 no-header-test += linux/sctp.h
0040 no-header-test += linux/sysctl.h
0041 no-header-test += linux/usb/audio.h
0042 no-header-test += linux/v4l2-mediabus.h
0043 no-header-test += linux/v4l2-subdev.h
0044 no-header-test += linux/videodev2.h
0045 no-header-test += linux/vm_sockets.h
0046 no-header-test += sound/asequencer.h
0047 no-header-test += sound/asoc.h
0048 no-header-test += sound/asound.h
0049 no-header-test += sound/compress_offload.h
0050 no-header-test += sound/emu10k1.h
0051 no-header-test += sound/sfnt_info.h
0052 no-header-test += xen/evtchn.h
0053 no-header-test += xen/gntdev.h
0054 no-header-test += xen/privcmd.h
0055
0056
0057
0058 ifeq ($(SRCARCH),arc)
0059 no-header-test += linux/bpf_perf_event.h
0060 endif
0061
0062 ifeq ($(SRCARCH),ia64)
0063 no-header-test += asm/setup.h
0064 no-header-test += asm/sigcontext.h
0065 no-header-test += linux/if_bonding.h
0066 endif
0067
0068 ifeq ($(SRCARCH),powerpc)
0069 no-header-test += linux/bpf_perf_event.h
0070 endif
0071
0072 ifeq ($(SRCARCH),sparc)
0073 no-header-test += asm/uctx.h
0074 no-header-test += asm/fbio.h
0075 endif
0076
0077
0078 no-header-test += asm-generic/%
0079
0080 always-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/dev/null))
0081
0082
0083 quiet_cmd_hdrtest = HDRTEST $<
0084 cmd_hdrtest = \
0085 $(CC) $(c_flags) -fsyntax-only -x c /dev/null \
0086 $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \
0087 $(PERL) $(srctree)/$(src)/headers_check.pl $(obj) $(SRCARCH) $<; \
0088 touch $@
0089
0090 $(obj)/%.hdrtest: $(obj)/%.h FORCE
0091 $(call if_changed_dep,hdrtest)
0092
0093
0094
0095 clean-files += $(filter-out Makefile headers_check.pl, $(notdir $(wildcard $(obj)/*)))