]> git.cryptolib.org Git - avr-crypto-lib.git/blob - avr-makefile.inc
optimized xtea asm implementation
[avr-crypto-lib.git] / avr-makefile.inc
1
2 MCU_TARGET     = atmega644
3 F_CPU          = 20000000
4 OPTIMIZE       = -Os # -Os
5 DEBUG          = -gdwarf-2
6 WARNING        = -pedantic -Wall -Wstrict-prototypes
7 PROGRAMMER     = avr911
8 PROG_PORT      = /dev/ttyUSB0
9 DEFS           = -D$(call uc, $(MCU_TARGET)) -DF_CPU=$(F_CPU)
10 FLASHCMD       = avrdude -p $(MCU_TARGET) -P $(PROG_PORT) -c $(PROGRAMMER) -U flash:w:# no space at the end
11 #FLASHCMD       = avrdude -p $(MCU_TARGET) -c usbasp -U flash:w:# no space at the end
12 RESETCMD       = avrdude -p $(MCU_TARGET) -P $(PROG_PORT) -c $(PROGRAMMER) 
13 DEP_DIR        = deps/
14 TEST_DIR       = test/
15 BIN_DIR        = bin/
16 TESTSRC_DIR    = test_src/
17 #uisp -dprog=bsd -dlpt=/dev/parport1 --upload if=$(PRG).hex
18 ERASECMD       =
19 TESTPORT       = /dev/ttyUSB1
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 AUTOASM_OPT    = -S
32 CC             = avr-gcc
33 CSTD           = c99
34
35 override CFLAGS_A       = -MMD -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $(1))) $(DEBUG) $(WARNING) -std=$(CSTD) $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)
36 override CFLAGS         = -MMD -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $@))   $(DEBUG) $(WARNING) -std=$(CSTD) $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)
37
38 override LDFLAGS       = -gdwarf-2 -Wl,-Map,
39 override ASFLAGS           = -mmcu=$(MCU_TARGET) -Wa,--gdwarf-2
40
41 SIZESTAT_FILE = sizestats.txt
42
43 OBJCOPY         = avr-objcopy
44 OBJDUMP         = avr-objdump
45 SIZE            = avr-size
46 READELF         = readelf
47 RUBY            = ruby
48 GET_TEST        = host/get_test.rb
49 MAKE            = make
50 MAKE2GRAPH      = ~/bin/make2graph.rb
51 TWOPI           = twopi