]> git.cryptolib.org Git - arm-crypto-lib.git/blobdiff - arm-makefile.inc
Adding Khazad
[arm-crypto-lib.git] / arm-makefile.inc
index 98ac3beac5feb36ab8d09bf44d37b7bc70cd50c8..396e108a93ada3bdb5220a2d8a2ad3efe66b8822 100644 (file)
@@ -1,8 +1,10 @@
-
+TOOLCHAIN      = arm-elf-
 MCU_TARGET     = cortex-m3  
 OPTIMIZE       = -O2
+DEBUG          = -g
+WARNING        = -pedantic -Wall -Wstrict-prototypes -Werror
 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/
@@ -21,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    \
@@ -44,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