common_library: gettid is multiple declaration in cl_error
[staging/basesystem.git] / video_in_hal / nsframework / framework_unified / client / NativeServices / cfg / config.mk
1 #
2 # @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16
17 #
18 # Standard Configuration Makefile version 2.0
19 #
20
21 .SUFFIXES:
22
23 # Setup configuration exports to make sure other "subprojects" have the correct configuration settings.
24 # Export shared variables
25 export DEFS
26 export LIBS
27 export LIB_PATHS
28
29 # Export setup
30 export MAKE_DEPS := $(PRJ_ROOT)cfg/depends.mk
31 export MAKE_CFG := $(TOOLS_CFG)config.mk
32
33 # Set the location of build files.  By default all build files become local to the initating location of the build so
34 #  one doesn't impact a referenced project
35 # Alteratively a directed path can also be supported.
36 ifndef PRJ_OUTPUT_ROOT
37 PRJ_OUTPUT_ROOT = $(PRJ_ROOT)
38 endif
39
40 # Select Compiler Tool by name and select the tool configuration file
41 # default behavior is to generate for arm
42 ifeq ($(TARGET),analysis)
43 export MAKE_TOOLS := $(TOOLS_CFG)analysis.mk
44 else
45 ifeq ($(TARGET),x86)
46 export MAKE_TOOLS := $(TOOLS_CFG)PosixBasedOS001_x86.mk
47 else
48 ifeq ($(TARGET),armle)
49 export MAKE_TOOLS := $(TOOLS_CFG)PosixBasedOS001_arm.mk
50 else
51 export MAKE_TOOLS := $(TOOLS_CFG)PosixBasedOS001_armv7.mk
52 TARGET = armle-v7
53 endif
54 endif
55 endif
56
57
58 # Set specific flags as path suffixes to make sure the right build options are picked up
59 ifdef DEBUG
60 BUILD_CFG+=/debug
61 endif
62 ifdef PROFILING
63 BUILD_CFG+=/profile
64 endif
65 ifndef BUILD_CFG
66 BUILD_CFG=/release
67 endif
68
69 # Set File Paths
70 export BIN_PATH := $(PRJ_OUTPUT_ROOT)bin/$(TARGET)$(BUILD_CFG)/
71 export BLD_PATH := $(PRJ_OUTPUT_ROOT)bld/$(TARGET)$(BUILD_CFG)/$(COMPONENT_NAME)/
72 export LIB_PATH := $(PRJ_OUTPUT_ROOT)lib/$(TARGET)$(BUILD_CFG)/
73 export SLIB_PATH := $(PRJ_OUTPUT_ROOT)dll/$(TARGET)$(BUILD_CFG)/
74 export BUILD_DIRS = $(BIN_PATH) $(LIB_PATH) $(SLIB_PATH) $(BLD_PATH)
75 export BUILD_ROOTS := $(addprefix $(PRJ_OUTPUT_ROOT), bin bld lib dll)
76
77 # Set Staging Location - set to a default location to prevent accidents
78 ifndef STAGE_LOCATION
79 export STAGE_LOCATION = C:/temp/stage/
80 endif
81
82 # Now include the defintions that have been exported
83 include $(MAKE_TOOLS)
84
85 # Add additional configuration includes reflective of project and decisions expressed in include makefiles.
86 #  So local includes, base infrastructure, and target platform.
87 #  This is also the variable to add local overriding header file locations for configuration in makefiles
88 #  prior to spawning to subprojects.  Which means if you want to utilize different header files than those
89 #  the project you are going to build this will force an early search path to override with.
90 ifndef CFG_INCS
91         export CFG_INCS +=
92 endif
93
94 # Standard Targets (and defaults)
95 all:
96
97 subdirs:
98
99 # Building necessary directories
100 build_dirs: $(BUILD_DIRS)
101
102 $(BUILD_DIRS):
103         -mkdir -p $(@)
104
105 # Stage "public" directories
106 stage:
107         -rm -r $(STAGE_LOCATION)/$(COMPONENT_NAME)
108         mkdir -p $(STAGE_LOCATION)/$(COMPONENT_NAME)
109         cp -r ../bin ../dll ../lib ../inc ../cfg ../doc $(STAGE_LOCATION)/$(COMPONENT_NAME)/
110
111
112 # Debug Headers
113 banner:
114         @echo Making $(COMPONENT_NAME)
115         @echo Bld Roots $(BLD_ROOTS)