log: Retouch documentation; Rearrenge level logic; Rename LOG_VERBOSITY to LOG_FORMAT...
[bertos.git] / app / triface / triface.mk
index b7c19cc41968a156bff22fe71fa5f5f104645e6d..fe5fdcfea9489e7720d13e1ea9929d4e2f4ebd3d 100644 (file)
@@ -5,11 +5,10 @@
 #
 # Makefile fragment for DevLib triface application.
 #
-# Author: Bernardo Innocenti <bernie@develer.com>
+# Author: Bernie Innocenti <bernie@codewiz.org>
 #
 #
 
-
 # Set to 1 for debug builds
 triface_DEBUG = 1
 
@@ -23,31 +22,51 @@ triface_lock = 0x2f
 triface_CSRC = \
        app/triface/triface.c \
        app/triface/protocol.c \
-       drv/timer.c \
-       drv/ser.c \
-       cpu/avr/drv/ser_avr.c \
-       cpu/avr/drv/sipo.c \
-       mware/formatwr.c \
-       mware/hex.c \
-       mware/hashtable.c \
-       mware/readline.c \
-       mware/parser.c \
-       mware/event.c \
-       net/keytag.c \
-       hw/hw_adc.c \
-       drv/buzzer.c \
-
-triface_PCSRC += mware/formatwr.c
-
-
-triface_CFLAGS = -O2 -D'ARCH=0' -Iapp/triface/hw -Iapp/triface -Icpu/avr
+       app/triface/hw/hw_adc.c \
+       bertos/drv/timer.c \
+       bertos/drv/ser.c \
+       bertos/drv/buzzer.c \
+       bertos/cpu/avr/drv/ser_avr.c \
+       bertos/cpu/avr/drv/sipo.c \
+       bertos/mware/formatwr.c \
+       bertos/mware/hex.c \
+       bertos/mware/hashtable.c \
+       bertos/mware/readline.c \
+       bertos/mware/parser.c \
+       bertos/mware/event.c \
+       bertos/kern/kfile.c \
+       bertos/net/keytag.c \
+       #
+
+triface_PCSRC += bertos/mware/formatwr.c
+
+
+triface_CFLAGS = -O2 -D'ARCH=(ARCH_TRIFACE)' -fno-strict-aliasing -Iapp/triface -Ibertos/cpu/avr
 triface_LDFLAGS = -Wl
 
 triface_MCU = atmega64
+triface_CROSS = avr-
 
-# Debug stuff
-ifeq ($(triface_DEBUG),1)
-       triface_CFLAGS += -D_DEBUG
-       triface_PCSRC += drv/kdebug.c
-endif
+# Set to 1 for debug builds
+boot_DEBUG = 0
+
+# Our target application
+TRG += boot
 
+boot_MCU = atmega64
+boot_CSRC = \
+       app/triface/boot/main.c \
+       bertos/net/xmodem.c \
+       bertos/drv/ser.c \
+       bertos/cpu/avr/drv/ser_avr.c \
+       bertos/cpu/avr/drv/flash_avr.c \
+       bertos/drv/timer.c \
+       bertos/algo/crc.c \
+       bertos/mware/hex.c \
+       bertos/kern/kfile.c \
+       #
+boot_CROSS = avr-
+boot_CPPFLAGS = -D'ARCH=(ARCH_TRIFACE|ARCH_BOOT)' -Iapp/triface/boot -Ibertos/cpu/avr
+boot_CFLAGS = -Os -mcall-prologues
+boot_LDSCRIPT = app/triface/boot/boot.ld
+boot_LDFLAGS = -Wl,--relax