941e28a6b76e911a37f9463d894e635e7229e39c
[bertos.git] / app / demo / demo.mk
1 #
2 # $Id: demo.mk 18234 2007-10-08 13:39:48Z rasky $
3 # Copyright 2003, 2004, 2005, 2006 Develer S.r.l. (http://www.develer.com/)
4 # All rights reserved.
5 #
6 # Makefile fragment for DevLib demo application.
7 #
8 # Author: Bernie Innocenti <bernie@codewiz.org>
9 #
10
11 include bertos/fonts/fonts.mk
12 include bertos/emul/emul.mk
13
14 # Set to 1 for debug builds
15 demo_DEBUG = 1
16
17 # Our target application
18 TRG += demo
19
20 # FIXME: we want to use g++ for C source too
21 CC = g++
22
23 demo_CXXSRC = \
24         bertos/emul/emul.cpp \
25         bertos/emul/emulwin.cpp \
26         bertos/emul/emulkbd.cpp \
27         bertos/drv/lcd_gfx_qt.cpp
28
29 demo_CSRC = \
30         app/demo/demo.c \
31         bertos/os/hptime.c \
32         bertos/gfx/bitmap.c \
33         bertos/gfx/line.c \
34         bertos/gfx/win.c \
35         bertos/gfx/text.c \
36         bertos/gfx/text_format.c \
37         bertos/gui/menu.c \
38         bertos/fonts/helvB10.c \
39         bertos/fonts/luBS14.c \
40         bertos/fonts/ncenB18.c \
41         bertos/icons/logo.c \
42         bertos/drv/kbd.c \
43         bertos/drv/timer.c \
44         bertos/drv/timer_test.c \
45         bertos/drv/buzzer.c \
46         bertos/drv/ser.c \
47         bertos/emul/ser_posix.c \
48         bertos/mware/formatwr.c \
49         bertos/mware/hex.c \
50         bertos/mware/event.c \
51         bertos/mware/observer.c \
52         bertos/mware/resource.c \
53         bertos/mware/sprintf.c \
54         bertos/kern/proc.c \
55         bertos/kern/proc_test.c \
56         bertos/kern/preempt.c \
57         bertos/kern/sem.c \
58         bertos/kern/signal.c \
59         bertos/kern/monitor.c \
60         bertos/verstag.c
61
62 demo_CPPASRC = \
63         bertos/emul/switch.S
64
65 # FIXME: maybe this junk should go in emul/emul.mk?
66 $(OBJDIR)/demo/bertos/emul/emulwin.o: bertos/emul/emulwin_moc.cpp 
67 $(OBJDIR)/demo/bertos/drv/lcd_gfx_qt.o: bertos/drv/lcd_gfx_qt_moc.cpp
68 $(OBJDIR)/demo/bertos/drv/timer.o: bertos/emul/timer_qt_moc.cpp
69 $(OBJDIR)/demo/bertos/emul/emulkbd.o: bertos/emul/emulkbd_moc.cpp
70
71 #FIXME: isn't there a way to avoid repeating the pattern rule?
72 bertos/emul/timer_qt_moc.cpp: bertos/emul/timer_qt.c
73         $(QT_MOC) -o $@ $<
74
75
76 demo_CFLAGS = -Iapp/demo $(EMUL_CFLAGS)
77 demo_CXXFLAGS = -Iapp/demo $(EMUL_CFLAGS)
78 demo_LDFLAGS = $(EMUL_LDFLAGS)
79
80 # Debug stuff
81 ifeq ($(demo_DEBUG),0)
82         demo_CFLAGS += -Os
83         demo_CXXFLAGS += -Os
84 endif