X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=arm-makefile.inc;h=f4e0364c20c0c4248e73f0d4abd25cb36898123e;hb=7ce0cfaf621e263fc99e59e86b3e0446b0256834;hp=4987aec9f312e74f46db1cc613f5fe1b714e829c;hpb=c079867a33440d07e22f93b71365176e20697e52;p=arm-crypto-lib.git diff --git a/arm-makefile.inc b/arm-makefile.inc index 4987aec..f4e0364 100644 --- a/arm-makefile.inc +++ b/arm-makefile.inc @@ -1,12 +1,13 @@ - +TOOLCHAIN = arm-elf- MCU_TARGET = cortex-m3 OPTIMIZE = -O2 +DEBUG = -g +WARNING = -pedantic -Wall -Wstrict-prototypes DEFS = -D$(call uc, $(subst -,_,$(MCU_TARGET))) -FLASHCMD = arm-elf-gdb -x gdb-flash # +FLASHCMD = $(TOOLCHAIN)gdb -x gdb-flash # DEP_DIR = deps/ TEST_DIR = test/ BIN_DIR = bin/ -TESTBIN_DIR = test_bin/ TESTSRC_DIR = test_src/ ERASECMD = TESTPORT = /dev/ttyUSB1 @@ -22,20 +23,18 @@ LIST_DIR = listings/# STAT_DIR = stats/# AUTOASM_DIR = autoasm/# AUTOASM_OPT = -S -CC = arm-elf-gcc +CC = $(TOOLCHAIN)gcc CSTD = gnu99 override CFLAGS_A = -fomit-frame-pointer \ -mthumb -ffunction-sections -fdata-sections -MMD \ -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $(1))) \ - -I. -Itest_src -g -pedantic -std=$(CSTD) \ - -Wall $(OPTIMIZE) -Wstrict-prototypes \ + $(DEBUG) $(WARNING) -std=$(CSTD) $(OPTIMIZE) \ -mcpu=$(MCU_TARGET) -Wa,-mthumb $(DEFS) override CFLAGS = -fomit-frame-pointer \ -mthumb -ffunction-sections -fdata-sections -MMD \ -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $@)) \ - -I. -Itest_src -g -pedantic -std=$(CSTD) \ - -Wall $(OPTIMIZE) -Wstrict-prototypes \ + $(DEBUG) $(WARNING) -std=$(CSTD) $(OPTIMIZE) \ -mcpu=$(MCU_TARGET) -Wa,-mthumb $(DEFS) override LDFLAGS = -g -T lm3s9b90.ld -Wl,--gc-sections \ @@ -45,9 +44,9 @@ override ASFLAGS = -mthumb -mcpu=$(MCU_TARGET) -Wa,--g -Wa,-mthumb SIZESTAT_FILE = sizestats.txt -OBJCOPY = arm-elf-objcopy -OBJDUMP = arm-elf-objdump -SIZE = arm-elf-size +OBJCOPY = $(TOOLCHAIN)objcopy +OBJDUMP = $(TOOLCHAIN)objdump +SIZE = $(TOOLCHAIN)size READELF = readelf RUBY = ruby GET_TEST = host/get_test.rb