make/common/NativeCompilation.gmk
changeset 25854 98ce0879ab4c
parent 23433 afe67de12b7d
child 25882 bd4315f0084b
equal deleted inserted replaced
25853:63fbc565bba5 25854:98ce0879ab4c
    24 #
    24 #
    25 
    25 
    26 # When you read this source. Remember that $(sort ...) has the side effect
    26 # When you read this source. Remember that $(sort ...) has the side effect
    27 # of removing duplicates. It is actually this side effect that is
    27 # of removing duplicates. It is actually this side effect that is
    28 # desired whenever sort is used below!
    28 # desired whenever sort is used below!
       
    29 
       
    30 ifndef _NATIVE_COMPILATION_GMK
       
    31 _NATIVE_COMPILATION_GMK := 1
    29 
    32 
    30 ifeq (,$(_MAKEBASE_GMK))
    33 ifeq (,$(_MAKEBASE_GMK))
    31   $(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
    34   $(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
    32 endif
    35 endif
    33 
    36 
   282   ifneq ($$($1_INCLUDES),)
   285   ifneq ($$($1_INCLUDES),)
   283     $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
   286     $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
   284     $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
   287     $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
   285   endif
   288   endif
   286   ifneq ($$($1_EXCLUDES),)
   289   ifneq ($$($1_EXCLUDES),)
   287     $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
   290     $1_SRC_EXCLUDES := $$(addsuffix /%,$$($1_EXCLUDES))
       
   291     $1_SRC_EXCLUDES += $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
   288     $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
   292     $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
   289   endif
   293   endif
   290 
   294 
   291   # Calculate the expected output from compiling the sources (sort to remove duplicates. Also provides
   295   # Calculate the expected output from compiling the sources (sort to remove duplicates. Also provides
   292   # a reproducable order on the input files to the linker).
   296   # a reproducable order on the input files to the linker).
   547 	  $(TOUCH) $$@
   551 	  $(TOUCH) $$@
   548         endif
   552         endif
   549 
   553 
   550   endif
   554   endif
   551 endef
   555 endef
       
   556 
       
   557 endif # _NATIVE_COMPILATION_GMK