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.
17 # QCC x86 COMPILER SETTINGS
18 # Standard form of tool.mk file configured for PosixBasedOS001 vmware
31 LD_CPP = -lang-c++ #-lm
32 OBJCPY := ${PosixBasedOS001_HOST}/usr/bin/ntox86-objcopy
34 # Compile options and commands
35 TARGET_FLG = -Vgcc_ntox86
43 # Define Map file Option
51 # Set Optimization Flag (precident to force none, force full, force basic, or default remain as defined)
52 ifeq ($(OPTIMIZATION),OPTIMIZE)
55 ifeq ($(OPTIMIZATION),FULL_OPTIMIZE)
58 ifeq ($(OPTIMIZATION),NONE)
68 CC_FLAGS = $(TARGET_FLG) -w9 -Wc,-Wall -shared $(CC_OPT_FLG) $(CC_PROFILING_FLG) $(CC_DEBUG_FLG) $(CC_OPT_FLG)
70 CC_CMD = $(CC) $(CC_FLAGS) $(DEFS) $(INCLUDES) $(@F:.$(OBJ_EXT)=.c*) -o $(@)
71 CPP_CMD = $(CPP) $(CC_FLAGS) $(DEFS) $(INCLUDES) $(@F:.$(OBJ_EXT)=.cpp) -o $(@)
72 CPP_D_CMD = i486-pc-nto-PosixBasedOS001.5.0-gcc.exe $(DEFS) $(INCLUDES) -MM $< > $(@:.o=.d)
74 # Archive Options (Static Library)
77 AR_CMD = $(AR) $(AR_FLAGS) $(AR_OFLAG)$(@) $^
81 # Used in the form of $(LD_CMD) -L[Library Paths] -l[libraries] [objects] $(LD_OFLAG) executable_name.$(BIN_EXT)
82 LD_FLAGS = $(TARGET_FLG) $(CC_PROFILING_FLG) $(CC_DEBUG_FLG) $(LD_CPP)
84 LD_CMD = $(LD) -L$(LIB_PATH) $(LD_FLAGS) $(MAP_FILE_FLG)
86 # To create shared objects use the linker command but add -shared
87 SO_CMD = $(LD) $(LD_FLAGS) -shared $(MAP_FILE_FLG)
88 SLIB_CMD = $(SO_CMD) $^ $(LD_OFLAG) $(@) $(addprefix -L, $(LIB_PATHS)) \
89 -Bstatic $(addprefix -l,$(STATIC_LIBS)) -Bdynamic $(addprefix -l,$(DYNAMIC_LIBS))