Added fonts, switch.S; fixed moc
[bertos.git] / app / demo / demo.mk
1 #
2 # $Id$
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: Bernardo Innocenti <bernie@develer.com>
9 #
10 # $Log$
11 # Revision 1.8  2006/09/20 14:27:22  marco
12 # Added fonts, switch.S; fixed moc
13 #
14 # Revision 1.7  2006/09/19 17:48:45  bernie
15 # Remove artwork.c
16 #
17 # Revision 1.6  2006/06/02 12:27:36  bernie
18 # Tweak apparence; enable assertions.
19 #
20 # Revision 1.5  2006/05/27 22:42:02  bernie
21 # Add verstag.
22 #
23 # Revision 1.4  2006/05/27 17:16:38  bernie
24 # Make demos a bit more interesting.
25 #
26 # Revision 1.3  2006/05/15 07:21:24  bernie
27 # Use pkg-config.
28 #
29 # Revision 1.2  2006/03/27 04:49:50  bernie
30 # Add bouncing logo demo.
31 #
32 # Revision 1.1  2006/03/22 09:52:13  bernie
33 # Add demo application.
34 #
35
36 include fonts/fonts.mk
37
38 # Set to 1 for debug builds
39 demo_DEBUG = 1
40
41 # Our target application
42 TRG += demo
43
44 # FIXME: we want to use g++ for C source too
45 CC = g++
46
47 demo_CXXSRC = \
48         emul/emul.cpp \
49         emul/emulwin.cpp \
50         emul/emulkbd.cpp \
51         drv/lcd_gfx_qt.cpp
52
53 demo_CSRC = \
54         app/demo/demo.c \
55         os/hptime.c \
56         gfx/bitmap.c \
57         gfx/line.c \
58         gfx/win.c \
59         gfx/text.c \
60         gfx/text_format.c \
61         gui/menu.c \
62         fonts/helvB10.c \
63         fonts/luBS14.c \
64         fonts/ncenB18.c \
65         icons/logo.c \
66         drv/kbd.c \
67         drv/timer.c \
68         drv/buzzer.c \
69         drv/ser.c \
70         drv/ser_posix.c \
71         mware/formatwr.c \
72         mware/hex.c \
73         mware/event.c \
74         mware/observer.c \
75         mware/resource.c \
76         mware/sprintf.c \
77         kern/proc.c \
78         kern/sem.c \
79         kern/signal.c \
80         kern/monitor.c \
81         kern/proc_test.c \
82         verstag.c
83
84 demo_CPPASRC = \
85         kern/switch.S
86
87 $(OBJDIR)/demo/emul/emulwin.o: emul/emulwin_moc.cpp 
88 $(OBJDIR)/demo/drv/lcd_gfx_qt.o: drv/lcd_gfx_qt_moc.cpp
89 $(OBJDIR)/demo/drv/timer.o: drv/timer_qt_moc.cpp
90 $(OBJDIR)/demo/emul/emulkbd.o: emul/emulkbd_moc.cpp
91
92 #FIXME: isn't there a way to avoid repeating the pattern rule?
93 drv/timer_qt_moc.cpp: drv/timer_qt.c
94         $(MOC) -o $@ $<
95
96 EMUL_CFLAGS = $(shell pkg-config QtGui --cflags) -DQT_CLEAN_NAMESPACE -DQT3_SUPPORT
97 EMUL_LDFLAGS = $(shell pkg-config QtGui --libs)
98 demo_CFLAGS = -D_QT=4 -D'ARCH=ARCH_EMUL' -Iapp/demo -Ihw $(EMUL_CFLAGS)
99 demo_CXXFLAGS = -D_QT=4 -D'ARCH=ARCH_EMUL' -Iapp/demo -Ihw $(EMUL_CFLAGS)
100 demo_LDFLAGS = $(EMUL_LDFLAGS)
101
102 # Debug stuff
103 ifeq ($(demo_DEBUG),1)
104         demo_CFLAGS += -D_DEBUG
105         demo_CXXFLAGS += -D_DEBUG
106 #       demo_PCSRC += drv/kdebug.c
107 else
108         demo_CFLAGS += -Os
109         demo_CXXFLAGS += -Os
110 endif
111