]> git.cryptolib.org Git - arm-crypto-lib.git/blob - arm-makefile.inc
adding entropium to library
[arm-crypto-lib.git] / arm-makefile.inc
1 TOOLCHAIN      = arm-elf-#
2 MCU_TARGET     = cortex-m3  
3 MCU_OPTS       = -mthumb 
4 OPTIMIZE       = -Os -fomit-frame-pointer  
5 DEBUG          = -gdwarf-2
6 WARNING        = -pedantic -Wall -Wstrict-prototypes -Werror
7 DEFS           = -D$(call uc, $(subst -,_,$(MCU_TARGET)))
8 FLASHCMD       = $(OPENOCD) -f openocd.cfg \
9                      -c "init" \
10                      -c "halt" \
11                      -c "flash write_image erase $(1) 0 bin" \
12                      -c "reset run" \
13                      -c "shutdown"
14 DEP_DIR        = deps/#
15 TEST_DIR       = test/#
16 BIN_DIR        = bin/#
17 TESTSRC_DIR    = test_src/#
18 ERASECMD       =
19 TESTPORT       = /dev/ttyUSB2
20 TESTPORTBAUDR  = 115200
21 TESTLOG_DIR    = testlog/#
22 TESTPREFIX     = nessie-#
23 SPEEDTOOL      = host/get_performance.rb
24 SPEEDLOG_DIR   = speed_log/#
25 SPEEDPREFIX    =
26 SPEEDCMD       = performance
27 SIZE_DIR       = size_log/#
28 LIST_DIR       = listings/#
29 STAT_DIR       = stats/#
30 AUTOASM_DIR    = autoasm/#
31 LIB_DIR        = lib/#
32 LIB_NAME       = libcrypto.a
33 AUTOASM_OPT    = -S
34 CSTD           = gnu99
35 LIBS           = c gcc
36
37 COMMON_FLAGS   = -ffunction-sections -fdata-sections          \
38                  $(DEBUG) $(WARNING) -std=$(CSTD) $(OPTIMIZE) \
39                  -mcpu=$(MCU_TARGET) $(MCU_OPTS) $(DEFS) -MMD
40
41 override CFLAGS_A       = $(COMMON_FLAGS) \
42                       -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $(1))) 
43 override CFLAGS         = $(COMMON_FLAGS) \
44                       -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $@))
45                       
46 override LDFLAGS       = -g -T lm3s9b90.ld -Wl,--gc-sections    \
47                          -Wl,--entry=reset_isr  \
48                          -Wl,-Map,# no space at the end
49                           
50 override ASFLAGS           =  -mcpu=$(MCU_TARGET) 
51
52 SIZESTAT_FILE = sizestats.txt
53
54 CC                  = $(TOOLCHAIN)gcc
55 OBJCOPY         = $(TOOLCHAIN)objcopy
56 OBJDUMP         = $(TOOLCHAIN)objdump
57 SIZE            = $(TOOLCHAIN)size
58 OPENOCD         = openocd
59 READELF         = readelf
60 AR              = $(TOOLCHAIN)ar
61 CHMOD           = chmod
62 CHOWN           = chown
63 CHGRP           = chgrp
64 RM              = rm
65 RUBY            = ruby
66 GET_TEST        = host/get_test.rb
67 MAKE            = make
68 MAKE2GRAPH      = ~/bin/make2graph.rb
69 TWOPI           = twopi