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). |