2011-02-26 02:46:06 +08:00
|
|
|
############################################################################
|
2020-01-23 04:11:27 +08:00
|
|
|
# boards/hc/m9s12/ne64badge/scripts/Make.defs
|
2011-02-26 02:46:06 +08:00
|
|
|
#
|
2021-03-05 17:18:57 +08:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership. The
|
|
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
2011-02-26 02:46:06 +08:00
|
|
|
#
|
2021-03-05 17:18:57 +08:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2011-02-26 02:46:06 +08:00
|
|
|
#
|
2021-03-05 17:18:57 +08:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
2011-02-26 02:46:06 +08:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2020-05-19 22:25:18 +08:00
|
|
|
include $(TOPDIR)/.config
|
|
|
|
include $(TOPDIR)/tools/Config.mk
|
2011-02-26 02:46:06 +08:00
|
|
|
|
|
|
|
# Setup for the selected toolchain
|
|
|
|
# NuttX buildroot under Linux or Cygwin
|
|
|
|
|
2012-10-06 07:01:51 +08:00
|
|
|
CROSSDEV = m9s12x-nuttx-elf-
|
2011-02-26 02:46:06 +08:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_HCS12_NONBANKED),y)
|
|
|
|
ARCHCPUFLAGS = -m9s12x -mshort -mnolong-calls
|
2017-07-12 01:15:47 +08:00
|
|
|
LDSCRIPT = ne64badge-nonbanked.ld
|
2011-02-26 02:46:06 +08:00
|
|
|
else
|
|
|
|
ARCHCPUFLAGS = -m9s12x -mshort -mlong-calls
|
2017-07-12 01:15:47 +08:00
|
|
|
LDSCRIPT = ne64badge-banked.ld
|
2011-02-26 02:46:06 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_HCS12_MSOFTREGS),0)
|
|
|
|
ARCHCPUFLAGS += -msoft-reg-count=$(CONFIG_HCS12_MSOFTREGS)
|
|
|
|
endif
|
|
|
|
|
2022-02-15 05:29:40 +08:00
|
|
|
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
|
|
|
|
|
2012-11-16 02:33:18 +08:00
|
|
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
2024-07-31 10:35:54 +08:00
|
|
|
ARCHOPTIMIZATION = $(CONFIG_DEBUG_SYMBOLS_LEVEL)
|
2013-12-21 03:23:42 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
2022-04-27 03:32:13 +08:00
|
|
|
ARCHOPTIMIZATION += -Os -fno-strict-aliasing -fomit-frame-pointer
|
2011-02-26 02:46:06 +08:00
|
|
|
endif
|
|
|
|
|
2022-02-13 06:14:22 +08:00
|
|
|
ARCHCFLAGS = -fno-common
|
|
|
|
ARCHCXXFLAGS = -fno-common -fno-exceptions -fcheck-new
|
2015-09-02 00:02:36 +08:00
|
|
|
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
|
|
|
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
2011-02-26 02:46:06 +08:00
|
|
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
|
|
|
|
2024-08-05 21:52:14 +08:00
|
|
|
CFLAGS := $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
2011-02-26 02:46:06 +08:00
|
|
|
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
2024-08-05 21:52:14 +08:00
|
|
|
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
2011-02-26 02:46:06 +08:00
|
|
|
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
2020-09-24 18:46:51 +08:00
|
|
|
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
|
|
|
AFLAGS := $(CFLAGS) -D__ASSEMBLY__
|