mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 05:55:46 +08:00
boards: Move toolchain related variables to Toolchain.defs
1.It make sense to let Toolchain.defs give the default value 2.The board can still change if the default isn't suitable 3.Avoid the same definition spread more than 200 Make.defs Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: Ic2649f1c7689bcf59c105ca8db61cad45b6e0e64
This commit is contained in:
committed by
Abdelatif Guettouche
parent
97be116a39
commit
b329e2377d
@@ -108,7 +108,7 @@ endif
|
||||
|
||||
CROSSDEV =
|
||||
CC = $(ZDSBINDIR)$(DELIM)ez80cc.exe
|
||||
CPP = gcc -E
|
||||
CPP = gcc -E -P -x c
|
||||
LD = $(ZDSBINDIR)$(DELIM)ez80link.exe
|
||||
AS = $(ZDSBINDIR)$(DELIM)ez80asm.exe
|
||||
AR = $(ZDSBINDIR)$(DELIM)ez80lib.exe
|
||||
|
||||
@@ -47,3 +47,79 @@
|
||||
# CONFIG_Z180_TOOLCHAIN_SDCCL=y : SDCC for Linux, macOS or Cygwin
|
||||
# CONFIG_Z180_TOOLCHAIN_SDCCW=y : SDCC for Win32
|
||||
#
|
||||
|
||||
# These are the directories where the SDCC toolchain is installed. NOTE
|
||||
# that short 8.3 path names are used in order to avoid spaces. On my machine
|
||||
# I have:
|
||||
#
|
||||
# C:\PROGRA~1\ = C:\Profram Files\
|
||||
# C:\PROGRA~2\ = C:\Program Files (x86)\
|
||||
#
|
||||
# Your PC may be configured differently.
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
SDCC_INSTALLDIR = C:\PROGRA~2\SDCC
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)\bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)\lib\z180
|
||||
else
|
||||
SDCC_INSTALLDIR = /usr/local
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)/bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)/share/sdcc/lib/z180
|
||||
endif
|
||||
|
||||
ARCHCPUFLAGS = -mz180
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = --debug
|
||||
endif
|
||||
|
||||
SDCCLIB = z180.lib
|
||||
|
||||
# Custom ASSEMBLE definition. The most common toolchain, GCC, uses the
|
||||
# compiler to assemble files because this has the advantage of running the C
|
||||
# Pre-Processor against. This is not possible with other SDCC; we need to
|
||||
# define AS and over-ride the common definition in order to use the assembler
|
||||
# directly.
|
||||
|
||||
define ASSEMBLE
|
||||
@echo "AS: $1"
|
||||
$(Q) $(AS) $(AFLAGS) $($(strip $1)_AFLAGS) $2 $1
|
||||
endef
|
||||
|
||||
# Custom CLEAN definition
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
define CLEAN
|
||||
$(Q) if exist *.o (del /f /q *.o)
|
||||
$(Q) if exist *.asm (del /f /q *.asm)
|
||||
$(Q) if exist *.rel (del /f /q *.rel)
|
||||
$(Q) if exist *.lst (del /f /q *.lst)
|
||||
$(Q) if exist *.rst (del /f /q *.rst)
|
||||
$(Q) if exist *.sym (del /f /q *.sym)
|
||||
$(Q) if exist *.adb (del /f /q *.adb)
|
||||
$(Q) if exist *.lnk (del /f /q *.lnk)
|
||||
$(Q) if exist *.map (del /f /q *.map)
|
||||
$(Q) if exist *.mem (del /f /q *.mem)
|
||||
$(Q) if exist *.hex (del /f /q *.hex)
|
||||
$(Q) if exist *.cmd (del /f /q *.cmd)
|
||||
endef
|
||||
else
|
||||
define CLEAN
|
||||
$(Q) rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex *.cmd
|
||||
endef
|
||||
endif
|
||||
|
||||
# Tool names/paths
|
||||
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
AR = sdar -r
|
||||
|
||||
# File extensions
|
||||
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .rel
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .hex
|
||||
|
||||
@@ -136,7 +136,7 @@ endif
|
||||
|
||||
CROSSDEV =
|
||||
CC = ez8cc.exe
|
||||
CPP = gcc -E
|
||||
CPP = gcc -E -P -x c
|
||||
LD = ez8link.exe
|
||||
AS = ez8asm.exe
|
||||
AR = ez8lib.exe
|
||||
|
||||
@@ -47,3 +47,79 @@
|
||||
# CONFIG_Z80_TOOLCHAIN_SDCCL=y : SDCC for Linux, macOS or Cygwin
|
||||
# CONFIG_Z80_TOOLCHAIN_SDCCW=y : SDCC for Win32
|
||||
#
|
||||
|
||||
# These are the directories where the SDCC toolchain is installed. NOTE
|
||||
# that short 8.3 path names are used in order to avoid spaces. On my machine
|
||||
# I have:
|
||||
#
|
||||
# C:\PROGRA~1\ = C:\Profram Files\
|
||||
# C:\PROGRA~2\ = C:\Program Files (x86)\
|
||||
#
|
||||
# Your PC may be configured differently.
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
SDCC_INSTALLDIR = C:\PROGRA~2\SDCC
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)\bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)\lib\z80
|
||||
else
|
||||
SDCC_INSTALLDIR = /usr/local
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)/bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)/share/sdcc/lib/z80
|
||||
endif
|
||||
|
||||
ARCHCPUFLAGS = -mz80
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = --debug
|
||||
endif
|
||||
|
||||
SDCCLIB = z80.lib
|
||||
|
||||
# Custom ASSEMBLE definition. The most common toolchain, GCC, uses the
|
||||
# compiler to assemble files because this has the advantage of running the C
|
||||
# Pre-Processor against. This is not possible with other SDCC; we need to
|
||||
# define AS and over-ride the common definition in order to use the assembler
|
||||
# directly.
|
||||
|
||||
define ASSEMBLE
|
||||
@echo "AS: $1"
|
||||
$(Q) $(AS) $(AFLAGS) $($(strip $1)_AFLAGS) $2 $1
|
||||
endef
|
||||
|
||||
# Custom CLEAN definition
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
define CLEAN
|
||||
$(Q) if exist *.o (del /f /q *.o)
|
||||
$(Q) if exist *.asm (del /f /q *.asm)
|
||||
$(Q) if exist *.rel (del /f /q *.rel)
|
||||
$(Q) if exist *.lst (del /f /q *.lst)
|
||||
$(Q) if exist *.rst (del /f /q *.rst)
|
||||
$(Q) if exist *.sym (del /f /q *.sym)
|
||||
$(Q) if exist *.adb (del /f /q *.adb)
|
||||
$(Q) if exist *.lnk (del /f /q *.lnk)
|
||||
$(Q) if exist *.map (del /f /q *.map)
|
||||
$(Q) if exist *.mem (del /f /q *.mem)
|
||||
$(Q) if exist *.hex (del /f /q *.hex)
|
||||
$(Q) if exist *.cmd (del /f /q *.cmd)
|
||||
endef
|
||||
else
|
||||
define CLEAN
|
||||
$(Q) rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex *.cmd
|
||||
endef
|
||||
endif
|
||||
|
||||
# Tool names/paths
|
||||
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
AR = sdar -r
|
||||
|
||||
# File extensions
|
||||
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .rel
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .hex
|
||||
|
||||
Reference in New Issue
Block a user