2 # @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
18 # Standard Configuration Makefile version 2.0
23 # Setup configuration exports to make sure other "subprojects" have the correct configuration settings.
24 # Export shared variables
30 export MAKE_DEPS := $(PRJ_ROOT)cfg/depends.mk
31 export MAKE_CFG := $(TOOLS_CFG)config.mk
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)
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
46 export MAKE_TOOLS := $(TOOLS_CFG)PosixBasedOS001_x86.mk
48 ifeq ($(TARGET),armle)
49 export MAKE_TOOLS := $(TOOLS_CFG)PosixBasedOS001_arm.mk
51 export MAKE_TOOLS := $(TOOLS_CFG)PosixBasedOS001_armv7.mk
58 # Set specific flags as path suffixes to make sure the right build options are picked up
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)
77 # Set Staging Location - set to a default location to prevent accidents
79 export STAGE_LOCATION = C:/temp/stage/
82 # Now include the defintions that have been exported
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.
94 # Standard Targets (and defaults)
99 # Building necessary directories
100 build_dirs: $(BUILD_DIRS)
105 # Stage "public" directories
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)/
114 @echo Making $(COMPONENT_NAME)
115 @echo Bld Roots $(BLD_ROOTS)