4d9fc96304fcb1efebfabef067983657637e1dc1
[bertos.git] / app / 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
18 triface_hfuse = 0x88
19 triface_lfuse = 0xff
20 triface_efuse = 0xff
21 triface_lock = 0x2f
22 triface_CSRC = \
23         app/triface/triface.c \
24         app/triface/protocol.c \
25         app/triface/hw/hw_adc.c \
26         bertos/drv/timer.c \
27         bertos/drv/ser.c \
28         bertos/drv/buzzer.c \
29         bertos/cpu/avr/drv/ser_avr.c \
30         bertos/cpu/avr/drv/sipo.c \
31         bertos/mware/formatwr.c \
32         bertos/mware/hex.c \
33         bertos/mware/hashtable.c \
34         bertos/mware/readline.c \
35         bertos/mware/parser.c \
36         bertos/mware/event.c \
37         bertos/kern/kfile.c \
38         bertos/net/keytag.c \
39         #
40
41 triface_PCSRC += bertos/mware/formatwr.c
42
43
44 triface_CFLAGS = -O2 -D'ARCH=(ARCH_TRIFACE)' -fno-strict-aliasing -Iapp/triface -Ibertos/cpu/avr
45 triface_LDFLAGS = -Wl
46
47 triface_MCU = atmega64
48 triface_CROSS = avr-
49
50 # Debug stuff
51 ifeq ($(triface_DEBUG),1)
52         triface_CFLAGS += -D_DEBUG
53         triface_PCSRC += bertos/drv/kdebug.c
54 endif
55
56 # Set to 1 for debug builds
57 boot_DEBUG = 0
58
59 # Our target application
60 TRG += boot
61
62 boot_MCU = atmega64
63 boot_CSRC = \
64         app/triface/boot/main.c \
65         bertos/net/xmodem.c \
66         bertos/drv/ser.c \
67         bertos/cpu/avr/drv/ser_avr.c \
68         bertos/cpu/avr/drv/flash_avr.c \
69         bertos/drv/timer.c \
70         bertos/algo/crc.c \
71         bertos/mware/hex.c \
72     bertos/kern/kfile.c \
73     #
74 boot_CROSS = avr-
75 boot_CPPFLAGS = -D'ARCH=(ARCH_TRIFACE|ARCH_BOOT)' -Iapp/triface/boot -Ibertos/cpu/avr
76 boot_CFLAGS = -Os -mcall-prologues
77 boot_LDSCRIPT = app/triface/boot/boot.ld
78 boot_LDFLAGS = -Wl,--relax
79
80 # Debug stuff
81 ifeq ($(boot_DEBUG),1)
82         boot_CFLAGS += -D_DEBUG
83         boot_PCSRC += bertos/drv/kdebug.c bertos/mware/formatwr.c
84 endif
85