]> git.cryptolib.org Git - avr-crypto-lib.git/blob - avr-makefile.inc
new makefile and modified build process
[avr-crypto-lib.git] / avr-makefile.inc
1
2 MCU_TARGET     = atmega644
3 OPTIMIZE       = -Os
4 PROGRAMMER     = avr911
5 DEFS           = -D$(call uc, $(MCU_TARGET))
6 FLASHCMD       = avrdude -p $(MCU_TARGET) -P /dev/ttyUSB0 -c $(PROGRAMMER) -U flash:w:# no space at the end
7 #FLASHCMD       = avrdude -p $(MCU_TARGET) -c usbasp -U flash:w:# no space at the end
8 DEP_DIR        = deps/
9 TEST_DIR       = test/
10 BIN_DIR        = bin/
11 TESTBIN_DIR    = test_bin/
12 TESTSRC_DIR    = test_src/
13 #uisp -dprog=bsd -dlpt=/dev/parport1 --upload if=$(PRG).hex
14 ERASECMD       =
15 TESTPORT       = /dev/ttyUSB1
16 TESTPORTBAUDR  = 38400
17 TESTLOG_DIR    = testlog/
18 TESTPREFIX     = nessie-
19 SPEEDLOG_DIR   = speed_log/
20 SPEEDPREFIX    =
21 LIST_DIR       = listings/
22 STAT_DIR       = stats/
23 AUTOASM_DIR    = autoasm/
24 AUTOASM_OPT    = -S
25 CC             = avr-gcc
26 CSTD           = c99
27
28 override CFLAGS_A       = -MMD -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $(1))) -I. -Itest_src -gdwarf-2 -pedantic -std=$(CSTD) -Wall -Wstrict-prototypes  $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)
29 override CFLAGS         = -MMD -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $@)) -I. -Itest_src -gdwarf-2 -pedantic -std=$(CSTD) -Wall -Wstrict-prototypes  $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)
30
31 override LDFLAGS       = -gdwarf-2 -Wl,-Map,
32 override ASFLAGS           = -mmcu=$(MCU_TARGET) -Wa,--gdwarf-2
33
34 SIZESTAT_FILE = sizestats.txt
35
36 OBJCOPY         = avr-objcopy
37 OBJDUMP         = avr-objdump
38 SIZE            = avr-size
39 READELF         = readelf
40 RUBY            = ruby
41 GET_TEST        = host/get_test.rb
42 GET_PERFORMANCE = host/get_performance.rb
43 MAKE            = make
44 MAKE2GRAPH      = ~/bin/make2graph.rb
45 TWOPI           = twopi