]> git.cryptolib.org Git - arm-crypto-lib.git/blob - arm-makefile.inc
Adding Khazad
[arm-crypto-lib.git] / arm-makefile.inc
1 TOOLCHAIN      = arm-elf-
2 MCU_TARGET     = cortex-m3  
3 OPTIMIZE       = -O2
4 DEBUG          = -g
5 WARNING        = -pedantic -Wall -Wstrict-prototypes -Werror
6 DEFS           = -D$(call uc, $(subst -,_,$(MCU_TARGET)))
7 FLASHCMD       = $(TOOLCHAIN)gdb -x gdb-flash  #
8 DEP_DIR        = deps/
9 TEST_DIR       = test/
10 BIN_DIR        = bin/
11 TESTSRC_DIR    = test_src/
12 ERASECMD       =
13 TESTPORT       = /dev/ttyUSB1
14 TESTPORTBAUDR  = 115200
15 TESTLOG_DIR    = testlog/#
16 TESTPREFIX     = nessie-
17 SPEEDTOOL      = host/get_performance.rb
18 SPEEDLOG_DIR   = speed_log/
19 SPEEDPREFIX    =
20 SPEEDCMD       = performance
21 SIZE_DIR       = size_log/#
22 LIST_DIR       = listings/#
23 STAT_DIR       = stats/#
24 AUTOASM_DIR    = autoasm/#
25 AUTOASM_OPT    = -S
26 CC             = $(TOOLCHAIN)gcc
27 CSTD           = gnu99
28
29 override CFLAGS_A       = -fomit-frame-pointer  \
30                       -mthumb -ffunction-sections -fdata-sections -MMD \
31                       -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $(1)))  \
32                       $(DEBUG) $(WARNING) -std=$(CSTD) $(OPTIMIZE)     \
33                       -mcpu=$(MCU_TARGET) -Wa,-mthumb $(DEFS) 
34 override CFLAGS         = -fomit-frame-pointer   \
35                       -mthumb -ffunction-sections -fdata-sections -MMD \
36                       -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $@))    \
37                       $(DEBUG) $(WARNING) -std=$(CSTD) $(OPTIMIZE)     \
38                       -mcpu=$(MCU_TARGET) -Wa,-mthumb $(DEFS)  
39
40 override LDFLAGS       = -g -T lm3s9b90.ld -Wl,--gc-sections    \
41                          -Wl,--entry=reset_isr -lc -lgcc        \
42                           -Wl,-Map,# no space at the end
43 override ASFLAGS           = -mthumb -mcpu=$(MCU_TARGET) -Wa,--g -Wa,-mthumb
44
45 SIZESTAT_FILE = sizestats.txt
46
47 OBJCOPY         = $(TOOLCHAIN)objcopy
48 OBJDUMP         = $(TOOLCHAIN)objdump
49 SIZE            = $(TOOLCHAIN)size
50 READELF         = readelf
51 RUBY            = ruby
52 GET_TEST        = host/get_test.rb
53 MAKE            = make
54 MAKE2GRAPH      = ~/bin/make2graph.rb
55 TWOPI           = twopi