From: bernie Date: Fri, 8 Aug 2008 10:45:10 +0000 (+0000) Subject: emul: make config simpler and closer to the embedded case X-Git-Tag: 2.0.0~357 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=4893c48a2b4ec84cf94ff75cefde767ca26bcf6e;p=bertos.git emul: make config simpler and closer to the embedded case git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1577 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cfg/cfg_arch.h b/bertos/cfg/cfg_arch.h index c6cd23f6..a4c852eb 100644 --- a/bertos/cfg/cfg_arch.h +++ b/bertos/cfg/cfg_arch.h @@ -52,6 +52,7 @@ #define ARCH_FOO BV(0) #define ARCH_BAR BV(1) #define ARCH_EMUL BV(2) +#define ARCH_QT BV(3) /*\}*/ #endif /* CFG_ARCH_CONFIG_H */ diff --git a/bertos/cfg/os.h b/bertos/cfg/os.h index 8a81971c..c29bd59e 100644 --- a/bertos/cfg/os.h +++ b/bertos/cfg/os.h @@ -41,8 +41,8 @@ #define DEVLIB_OS_H /** Macro to include OS-specific versions of the headers. */ -#define OS_HEADER(module) PP_STRINGIZE(PP_CAT3(module, _, OS_ID).h) -#define OS_CSOURCE(module) PP_STRINGIZE(PP_CAT3(module, _, OS_ID).c) +#define OS_HEADER(module) PP_STRINGIZE(emul/PP_CAT3(module, _, OS_ID).h) +#define OS_CSOURCE(module) PP_STRINGIZE(emul/PP_CAT3(module, _, OS_ID).c) /* * OS autodetection (Some systems trigger multiple OS definitions) @@ -135,7 +135,7 @@ * We want Qt and other frameworks to look like OSes because you would * tipically want their portable abstractions if you're using one of these. */ -#if defined(_QT) +#if defined(_QT) || (defined(ARCH_QT) && (ARCH & ARCH_QT)) #define OS_QT 1 #undef OS_ID #define OS_ID qt diff --git a/bertos/emul/emul.mk b/bertos/emul/emul.mk index 7e2346b6..8636da65 100644 --- a/bertos/emul/emul.mk +++ b/bertos/emul/emul.mk @@ -4,10 +4,11 @@ # # Author: Bernie Innocenti # -# Qt configuration for devlib emulator demo. Include it from +# Qt configuration for BeRTOS emulator. Include it from # your app Makefile fragment -EMUL_CFLAGS = $(shell pkg-config QtCore QtGui --cflags) -DQT_CLEAN_NAMESPACE -DQT3_SUPPORT +EMUL_CFLAGS = -D'ARCH=ARCH_EMUL|ARCH_QT' \ + $(shell pkg-config QtCore QtGui --cflags) -DQT_CLEAN_NAMESPACE 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)