3b0ae2836cc72309ffa6b8531084db5576a414e4
[bertos.git] / examples / triface / triface.mk
1 #
2 # $Id$
3 # Copyright 2006 Develer S.r.l. (http://www.develer.com/)
4 # All rights reserved.
5 #
6 # Makefile fragment for DevLib triface application.
7 #
8 # Author: Bernie Innocenti <bernie@codewiz.org>
9 #
10 #
11
12 # Set to 1 for debug builds
13 triface_DEBUG = 1
14
15 # Our target application
16 TRG += triface
17 CPU = atmega1281
18
19 triface_CROSS = avr-
20
21 ifeq ($(CPU), atmega1281)
22 triface_hfuse = 0x98
23 triface_lfuse = 0x3d
24 triface_efuse = 0x7f
25 triface_lock = 0xff
26 else
27 triface_hfuse = 0x88
28 triface_lfuse = 0xff
29 triface_efuse = 0xff
30 triface_lock = 0x2f
31 endif
32
33 triface_MCU = $(CPU)
34
35 triface_CSRC = \
36         examples/triface/triface.c \
37         examples/triface/protocol.c \
38         examples/triface/hw/hw_adc.c \
39         bertos/drv/timer.c \
40         bertos/drv/ser.c \
41         bertos/drv/buzzer.c \
42         bertos/cpu/avr/drv/ser_avr.c \
43         bertos/cpu/avr/drv/sipo.c \
44         bertos/mware/formatwr.c \
45         bertos/mware/hex.c \
46         bertos/struct/hashtable.c \
47         bertos/mware/readline.c \
48         bertos/mware/parser.c \
49         bertos/mware/event.c \
50         bertos/kern/kfile.c \
51         bertos/net/keytag.c \
52         #
53
54 triface_PCSRC += bertos/mware/formatwr.c
55
56
57 triface_CFLAGS = -O2 -D'ARCH=(ARCH_TRIFACE)' -fno-strict-aliasing -Iexamples/triface -Ibertos/cpu/avr
58 triface_LDFLAGS = -Wl
59
60
61 # Set to 1 for debug builds
62 boot_DEBUG = 0
63
64 # Our target application
65 TRG += boot
66
67 boot_MCU = $(CPU)
68 boot_CSRC = \
69         examples/triface/boot/main.c \
70         bertos/net/xmodem.c \
71         bertos/drv/ser.c \
72         bertos/cpu/avr/drv/ser_avr.c \
73         bertos/cpu/avr/drv/flash_avr.c \
74         bertos/drv/timer.c \
75         bertos/algo/crc.c \
76         bertos/mware/hex.c \
77         bertos/kern/kfile.c \
78         #
79 boot_CROSS = avr-
80 boot_CPPFLAGS = -D'ARCH=(ARCH_TRIFACE|ARCH_BOOT)' -Iexamples/triface/boot -Ibertos/cpu/avr
81 boot_CFLAGS = -Os -mcall-prologues
82 boot_LDSCRIPT = examples/triface/boot/boot.ld
83 boot_LDFLAGS = -Wl,--relax