Make demo Qt emulator compile again.
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Sat, 29 Sep 2007 15:54:14 +0000 (15:54 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Sat, 29 Sep 2007 15:54:14 +0000 (15:54 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@813 38d2e660-2303-0410-9eaa-f027e97ec537

app/demo/demo.mk
config.mk
emul/emul.mk [new file with mode: 0755]

index 82a4a8f2e000ed9220e21699710f1950fea966f2..4436a05306baedc7e13bee8706b3a8a92049ac5d 100755 (executable)
@@ -8,6 +8,9 @@
 # Author: Bernardo Innocenti <bernie@develer.com>
 #
 # $Log$
+# Revision 1.9  2007/09/29 15:54:14  bernie
+# Make demo Qt emulator compile again.
+#
 # Revision 1.8  2006/09/20 14:27:22  marco
 # Added fonts, switch.S; fixed moc
 #
@@ -34,6 +37,7 @@
 #
 
 include fonts/fonts.mk
+include emul/emul.mk
 
 # Set to 1 for debug builds
 demo_DEBUG = 1
@@ -84,6 +88,7 @@ demo_CSRC = \
 demo_CPPASRC = \
        kern/switch.S
 
+# FIXME: maybe this junk should go in emul/emul.mk?
 $(OBJDIR)/demo/emul/emulwin.o: emul/emulwin_moc.cpp 
 $(OBJDIR)/demo/drv/lcd_gfx_qt.o: drv/lcd_gfx_qt_moc.cpp
 $(OBJDIR)/demo/drv/timer.o: drv/timer_qt_moc.cpp
@@ -91,10 +96,9 @@ $(OBJDIR)/demo/emul/emulkbd.o: emul/emulkbd_moc.cpp
 
 #FIXME: isn't there a way to avoid repeating the pattern rule?
 drv/timer_qt_moc.cpp: drv/timer_qt.c
-       $(MOC) -o $@ $<
+       $(QT_MOC) -o $@ $<
+
 
-EMUL_CFLAGS = $(shell pkg-config QtGui --cflags) -DQT_CLEAN_NAMESPACE -DQT3_SUPPORT
-EMUL_LDFLAGS = $(shell pkg-config QtGui --libs)
 demo_CFLAGS = -D_QT=4 -D'ARCH=ARCH_EMUL' -Iapp/demo -Ihw $(EMUL_CFLAGS)
 demo_CXXFLAGS = -D_QT=4 -D'ARCH=ARCH_EMUL' -Iapp/demo -Ihw $(EMUL_CFLAGS)
 demo_LDFLAGS = $(EMUL_LDFLAGS)
index 5d6933ac8c8428903d2a602362a7c51d4ded4a29..e78f4e13de16117a557256db35de76b2033222c2 100755 (executable)
--- a/config.mk
+++ b/config.mk
@@ -10,6 +10,9 @@
 # Author: Bernardo Innocenti <bernie@develer.com>
 #
 # $Log$
+# Revision 1.11  2007/09/29 15:54:14  bernie
+# Make demo Qt emulator compile again.
+#
 # Revision 1.10  2007/09/18 10:17:00  batt
 # Merge from triface.
 #
@@ -71,18 +74,18 @@ DEBUGCFLAGS = -ggdb
 #
 # define some variables based on the AVR base path in $(AVR)
 #
-CROSS   = avr-
+CROSS   = #avr-
 CC      = $(CROSS)gcc
 CXX     = $(CROSS)g++
 AS      = $(CC) -x assembler-with-cpp
 LD      = $(CC)
 OBJCOPY = $(CROSS)objcopy
+STRIP   = $(CROSS)strip
 INSTALL = cp -a
 RM      = rm -f
 RM_R    = rm -rf
 RN      = mv
 MKDIR_P = mkdir -p
-MOC     = moc
 
 # For conversion from ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
 COFFCONVERT=$(OBJCOPY) \
@@ -120,7 +123,7 @@ LIST_FLAGS = -Wa,-anhlmsd=$(@:.o=.lst)
 WARNFLAGS = \
        -W -Wformat -Wall -Wundef -Wpointer-arith -Wcast-qual \
        -Wcast-align -Wwrite-strings -Wsign-compare \
-       -Wmissing-prototypes -Wmissing-noreturn \
+       -Wmissing-noreturn \
        -Wextra -Wstrict-aliasing=2 \
 #      -Wunsafe-loop-optimizations
 
diff --git a/emul/emul.mk b/emul/emul.mk
new file mode 100755 (executable)
index 0000000..b7ddf35
--- /dev/null
@@ -0,0 +1,13 @@
+#
+# Copyright 2007 Bernardo Innocenti (http://www.codewiz.org/)
+# All rights reserved.
+#
+# Author: Bernardo Innocenti <bernie@develer.com>
+#
+# Qt configuration for devlib emulator demo.  Include it from
+# your app Makefile fragment
+
+EMUL_CFLAGS = $(shell pkg-config QtCore QtGui --cflags) -DQT_CLEAN_NAMESPACE -DQT3_SUPPORT
+EMUL_LDFLAGS = $(shell pkg-config QtCore QtGui --libs)
+QT_MOC = $(shell pkg-config QtCore --variable=moc_location)
+#QT_UIC = $(shell pkg-config QtCore --variable=uic_location)