summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-11-15 14:29:41 (UTC)
committer mickeyl <mickeyl>2004-11-15 14:29:41 (UTC)
commit5e6ce0ba567dd9c8ae33353fcf1d0554b34241e8 (patch) (side-by-side diff)
treee3903fd3f146c16d3521db20a6f3ca2db8b95121
parentc9543dc4edd3ea586c04e8114e133296ad9529d9 (diff)
downloadopie-5e6ce0ba567dd9c8ae33353fcf1d0554b34241e8.zip
opie-5e6ce0ba567dd9c8ae33353fcf1d0554b34241e8.tar.gz
opie-5e6ce0ba567dd9c8ae33353fcf1d0554b34241e8.tar.bz2
this improves Opie build system playing more nice with OE. instructions later...
alert me if this breaks the non-oe work (which i doubt)
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--Makefile4
-rw-r--r--Vars.make16
-rw-r--r--config.in10
-rw-r--r--mkspecs/qws/linux-oe-g++/qmake.conf86
-rw-r--r--mkspecs/qws/linux-oe-g++/qplatformdefs.h103
5 files changed, 214 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index e1ae448..5ed6eea 100644
--- a/Makefile
+++ b/Makefile
@@ -17,116 +17,120 @@ configs += $(TOPDIR)/core/applets/config.in $(TOPDIR)/core/apps/config.in $(TOPD
# $(TOPDIR)/.config depends on .depends.cfgs, as it depends on $(configs)
# in order to have a full set of config.in files.
# .depends depends on $(TOPDIR)/.config
# everything else depends on .depends, to ensure the dependencies are
# intact.
#
# NOTE: The order in which things happen in this makefile is
# -critical-. Do not rearrange this!
all : $(TOPDIR)/.config
#
# The IPK creation is a very slow process. If you want to only create some
# IPKs, e.g. the ones in library, then do
# make ipks IPK_START=library
# and then only the *.control files in this directory will be processed
ipks: $(OPIEDIR)/scripts/subst $(OPIEDIR)/scripts/filesubst FORCE $(TOPDIR)/.config
@find $(OPIEDIR)/$(IPK_START) -type f -name \*.control | ( for ctrl in `cat`; do \
prerm=`echo $${ctrl/.control/.prerm}`; \
preinst=`echo $${ctrl/.control/.preinst}`; \
postrm=`echo $${ctrl/.control/.postrm}`; \
postinst=`echo $${ctrl/.control/.postinst}`; \
echo "Building ipk of $$ctrl"; \
cd $(OPIEDIR); $(OPIEDIR)/scripts/mkipkg --subst=$(OPIEDIR)/scripts/subst --filesubst=$(OPIEDIR)/scripts/filesubst --control=$$ctrl --prerm=$$prerm --preinst=$$preinst --postrm=$$postrm --postinst=$$postinst --strip=$(STRIP) $(OPIEDIR); \
done )
ipks-mt: $(OPIEDIR)/scripts/subst $(OPIEDIR)/scripts/filesubst FORCE $(TOPDIR)/.config
@> $(OPIEDIR)/AllThreadedPackages
@find $(OPIEDIR)/ -type f -name \*.control | grep -v -- "-mt" | while read ctrl ; do \
grep "Package[ ]*:" $${ctrl} | sed "s+Package[ ]*:[ ]*++"; \
done | sort | uniq >> $(OPIEDIR)/AllThreadedPackages
@find $(OPIEDIR)/ -type f -name \*.control | while read ctrl ; do \
echo "Converting $$ctrl to -mt package"; \
nctrl=`$(OPIEDIR)/scripts/tothreaded $$ctrl $(OPIEDIR)/AllThreadedPackages`; \
echo "Building ipk of $$ctrl"; \
[ -n $$nctrl ] && cd $(OPIEDIR) && $(OPIEDIR)/scripts/mkipkg --subst=$(OPIEDIR)/scripts/subst --filesubst=$(OPIEDIR)/scripts/filesubst --control=$$nctrl --prerm=$${nctrl/\.control$$/.prerm/} --preinst=$${nctrl/\.control$$/.preinst/} --postrm=$${nctrl/\.control$$/.postrm/} --postinst=$${nctrl/\.control$$/.postinst/} --strip=$(STRIP) $(OPIEDIR); \
done
@rm -f $(OPIEDIR)/AllThreadedPackages
FORCE:
$(TOPDIR)/.config : $(TOPDIR)/.depends.cfgs
all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends.cfgs
clean-configs :
@echo "Wiping generated config.in files..."
@-rm -f $(configs)
ifneq ($(wildcard $(TOPDIR)/.depends.cfgs),)
include $(TOPDIR)/.depends.cfgs
endif
all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(configs)
$(TOPDIR)/.config: $(TOPDIR)/.depends.cfgs $(configs)
$(call descend,scripts/kconfig,conf)
@if [ ! -e $@ ]; then \
cp $(TOPDIR)/def-configs/opie $@; \
fi
@$(MAKE) -C scripts/kconfig conf
./scripts/kconfig/conf -s ./config.in
export
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
export include-config := 1
-include $(TOPDIR)/.config
-include $(TOPDIR)/.depends
endif
-include $(TOPDIR)/.config.cmd
SUBDIRS = $(subdir-y)
all clean install ipk: $(SUBDIRS)
lupdate lrelease:
@for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
opie-lupdate opie-lrelease messages:
@for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done;
# from kde
qtmessages:
cd $(QTDIR)/src ; \
sed -e "s,#define,," xml/qxml.cpp > qxml_clean.cpp ;\
find . -name "*.cpp" | grep -v moc_ > list ;\
for file in qfiledialog qcolordialog qprintdialog \
qurloperator qftp qhttp qlocal qerrormessage; do \
grep -v $$file list > list.new && mv list.new list ;\
done ;\
xgettext -C -ktr -kQT_TRANSLATE_NOOP -n `cat list` -o $(OPIEDIR)/qt-messages.pot
+ifndef CONFIG_TARGET_OE
$(subdir-y) : $(if $(CONFIG_LIBQPE),$(QTDIR)/stamp-headers $(OPIEDIR)/stamp-headers) \
$(if $(CONFIG_LIBQPE-X11),$(QTDIR)/stamp-headers-x11 $(OPIEDIR)/stamp-headers-x11 ) \
$(TOPDIR)/library/custom.h
+else
+$(subdir-y) : $(if $(CONFIG_LIBQPE),$(OPIEDIR)/stamp-headers) $(TOPDIR)/library/custom.h
+endif
clean : $(TOPDIR)/.config
make -C bin clean
make -C lib clean
make -C plugins clean
apidox :
doc/generate_apidox
mrproper : clean-configs
find . -name ".moc"|xargs rm -rf
find . -name ".obj"|xargs rm -rf
find lib -name "lib*.*"|xargs rm -f
find plugins -name "lib*.*"|xargs rm -f
find . -name "*.pro"|xargs touch
include $(TOPDIR)/Rules.make
diff --git a/Vars.make b/Vars.make
index 5e2cd7b..238918f 100644
--- a/Vars.make
+++ b/Vars.make
@@ -1,113 +1,121 @@
-ifndef QTDIR
-$(error QTDIR not set)
-endif
-
prefix=/opt/QtPalmtop
ifeq ($(OPIEDIR),)
export OPIEDIR:=$(TOPDIR)
endif
ifeq ($(IPK_DIR),)
export IPK_DIR:=$(OPIEDIR)
endif
ifneq ($(wildcard $(TOPDIR)/.config),)
include $(TOPDIR)/.config
endif
+ifndef CONFIG_TARGET_OE
+ ifndef QTDIR
+ $(error QTDIR not set)
+ endif
+else
+ OEDIR:=$(CONFIG_OE_BUILD_DIR)
+ QTDIR:=$(OEDIR)/tmp/staging/arm-linux/qt2
+ $(shell mkdir -p $(QTDIR)/src/moc)
+ $(shell echo -e "all: \n\t" >>$(QTDIR)/src/moc/Makefile)
+ PLATFORM=sharp-linux
+endif
+
ifdef CONFIG_TARGET_X86
PLATFORM=x86-linux
endif
ifdef CONFIG_TARGET_SHARP
PLATFORM=sharp-linux
endif
ifdef CONFIG_TARGET_IPAQ
PLATFORM=ipaq-linux
endif
ifdef CONFIG_TARGET_RAMSES
PLATFORM=ramses-linux
endif
ifdef CONFIG_TARGET_SIMPAD
PLATFORM=simpad-linux
endif
ifdef CONFIG_TARGET_YOPY
PLATFORM=yopy-linux
endif
ifdef CONFIG_TARGET_MACOSX
PLATFORM=macx-darwin
endif
export QMAKE:=$(OPIEDIR)/qmake/qmake
export QMAKESPECSDIR=$(OPIEDIR)/mkspecs
ifeq ($(QPE_VERSION),)
VERSION_MAJ:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$(OPIEDIR)/library/version.h))
VERSION_MIN:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$(OPIEDIR)/library/version.h))
VERSION_PAT:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$(OPIEDIR)/library/version.h))
QPE_VERSION:=$(VERSION_MAJ).$(VERSION_MIN).$(VERSION_PAT)
ifeq ($(QPE_VERSION),..)
QPE_VERSION=1.1.2
endif
endif
export QPE_VERSION
SUB_VERSION=$(shell echo $$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$(OPIEDIR)/library/version.h))
ifeq ($(VERSION_CVS),)
VERSION_CVS:=$(shell date +%s)
endif
ifneq ($(filter %snapshot",$(shell cat $(OPIEDIR)/library/version.h|grep QPE_VERSION)),)
SUB_VERSION:=$(VERSION_CVS)
endif
export SUB_VERSION
ifneq ($(strip $(SUB_VERSION)),)
EXTRAVERSION=-$(SUB_VERSION)
endif
ifeq ($(QTE_REVISION),)
QTE_REVISION=6
endif
export QTE_REVISION
export DEB_VERSION=2.0
ifeq ($(QTE_BASEVERSION),)
ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),)
QTE_BASEVERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION'|grep -v STR|sed -e 's/\#define QT_VERSION\t*//; s/.*\([0-9]\)\([0-9]\)\([0-9]\).*/\1.\2.\3/;')
else
QTE_BASEVERSION=2.3.7
endif
endif
export QTE_BASEVERSION
ifeq ($(QTE_VERSION),)
ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),)
QTE_VERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION_STR'|sed -e 's/\#define QT_VERSION_STR\t*//;' -e 's/.*"\([^"]*\)".*/\1/;')
else
QTE_VERSION=2.3.7
endif
endif
export QTE_VERSION
export PATH:=$(OPIEDIR)/scripts:$(PATH)
export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE))
ifdef CONFIG_OPTIMIZATIONS
export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS))
export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE))
endif
ifeq ($(STRIP),)
ifneq ($(CONFIG_TARGET_X86),)
STRIP=strip
endif
ifneq ($(CONFIG_TARGET_IPAQ),)
STRIP=arm-linux-strip
endif
ifneq ($(CONFIG_TARGET_SHARP),)
STRIP=arm-linux-strip
endif
ifneq ($(CONFIG_TARGET_RAMSES),)
STRIP=arm-linux-strip
diff --git a/config.in b/config.in
index 37cbb67..372ecfb 100644
--- a/config.in
+++ b/config.in
@@ -1,178 +1,186 @@
mainmenu "Opie Configuration"
menu "Build Parameters"
choice
prompt "Target Machine"
default TARGET_X86
help
Please select the architecture of the machine you will be
building the OpenZaurus buildroot for.
config TARGET_X86
boolean "Intel X86"
config TARGET_MACOSX
boolean "Mac OS X (DARWIN)"
config TARGET_SHARP
boolean "Sharp Zaurus w/ SA1100 (5000 and 5500)"
config TARGET_C700
boolean "Sharp Zaurus w/ PXA25x (5600, C7x0, C8x0)"
+ config TARGET_OE
+ boolean "OpenEmbedded w/ OE build dir set below"
+
config TARGET_IPAQ
boolean "iPAQ"
config TARGET_RAMSES
boolean "Ramses"
config TARGET_SIMPAD
boolean "SIMpad"
config TARGET_YOPY
boolean "Yopy 3500/3700"
-
endchoice
+config OE_BUILD_DIR
+ depends TARGET_OE
+ string "OE build directory"
+ default ">>>set OpenEmbedded build directory here<<<"
+
config OPTIMIZE
boolean "Use optimizations"
default "y" if ! TARGET_X86
config THREADED
boolean "Enable threaded build"
default "n"
config STATIC
boolean "Build static libraries"
default "n"
config DEBUG
boolean "Enable debug builds"
default n
config RELEASE
bool
default y
depends !DEBUG
config QUICK_LAUNCH
boolean "Enable Quick Launch"
default n if TARGET_X86
default y if ! TARGET_X86
config QUICKLAUNCH_PATH
string "Path to quicklauncher"
default "./quicklauncher" if TARGET_X86
default "/opt/QtPalmtop/bin/quicklauncher" if ! TARGET_X86
config SPECFILE
string
default "qws/linux-generic-g++" if TARGET_X86 && (! X11)
default "linux-g++" if TARGET_X86 && X11
default "qws/linux-sharp-g++" if TARGET_SHARP && (! X11)
default "linux-g++" if TARGET_SHARP && X11
default "qws/linux-ipaq-g++" if TARGET_IPAQ && (! X11)
default "linux-g++" if TARGET_IPAQ && X11
default "qws/linux-ramses-g++" if TARGET_RAMSES && (! X11)
default "linux-g++" if TARGET_RAMSES && X11
default "qws/linux-simpad-g++" if TARGET_SIMPAD && (! X11)
default "linux-g++" if TARGET_SIMPAD && X11
default "qws/linux-yopy-g++" if TARGET_YOPY && (! X11)
default "qws/macx-generic-g++" if TARGET_MACOSX && (! X11)
+ default "qws/linux-oe-g++" if TARGET_OE && (!X11)
config CUSTOMFILE
string
default "custom-ipaq.h" if TARGET_IPAQ
default "custom-sharp.h" if TARGET_SHARP
default "custom-ramses.h" if TARGET_RAMSES
default "custom-ipaq.h" if TARGET_SIMPAD
default "custom-yopy.h" if TARGET_YOPY
config OPTIMIZATIONS
string "Optimization flags"
depends OPTIMIZE
default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_IPAQ
default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_YOPY
default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SHARP
default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_RAMSES
default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SIMPAD
default "-march=armv5te -mtune=xscale -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_C700
config EXPERIMENTAL
bool "Prompt for development and/or incomplete items"
default y
endmenu
menu "Configuration"
config OPIE_NO_OVERRIDE_QT
boolean "Build Opie against an unpatched version of Qt"
default n
config OPIE_NO_ERASERECT_FIX
boolean "Disable Fixup eraseRect for HancomMobileWord,neocal.. to make libopiecore work on Sharps libqpe"
default n
config OPIE_NO_BUILTIN_SHUTDOWN
boolean "Disable the built in shutdown application"
default y
config OPIE_NO_BUILTIN_CALIBRATE
boolean "Disable the built in calibrate application"
default y if TARGET_YOPY
default n if ! TARGET_YOPY
config OPIE_SOUND_FRAGMENT_SHIFT
string "The sound fragment used in Opie Player I"
default "14" if TARGET_IPAQ
default "16" if ! TARGET_IPAQ
config USE_REALTIME_AUDIO_THREAD
boolean "Use a realtime thread in Opie Player I"
default y if TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP
default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP)
config QT_QWS_ALLOW_OVERCLOCK
boolean "Allow the user to overclock the device"
depends TARGET_RAMSES
default n
config USE_FILE_NOTIFICATION
boolean "Substitute (some) polling interfaces with OFileNotifier"
default y
config OPIE_NEW_ALLOC
boolean "Use malloc and free for the implementation"
default y if TARGET_RAMSES || TARGET_IPAQ || TARGET_SIMPAD || TARGET_SHARP
default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP)
config OPIE_TASKBAR_LOCK_KEY_STATE
boolean "Have a KeyLock state indicator on the taskbar"
default y if TARGET_SHARP
default n if !TARGET_SHARP
config LIBQPE_WITHROHFEEDBACK
boolean "Build libqpe with Right-On-Hold feedback"
default y
config OPIE_NO_SOUND_PCM_READ_BITS
boolean "There is not a pcm_read_bits io control"
default y if TARGET_SHARP
default n if ! TARGET_SHARP
endmenu
menu "Dependencies"
source dependencies.in
endmenu
menu "Base"
choice
prompt "Qpe Library Selection"
default LIBQPE
source library/config.in
source x11/config.in
endchoice
source libopie/config.in
source libopie2/config.in
diff --git a/mkspecs/qws/linux-oe-g++/qmake.conf b/mkspecs/qws/linux-oe-g++/qmake.conf
new file mode 100644
index 0000000..c4c273f
--- a/dev/null
+++ b/mkspecs/qws/linux-oe-g++/qmake.conf
@@ -0,0 +1,86 @@
+#
+# $Id$
+#
+# qmake configuration for linux-g++ using the arm-linux-g++ crosscompiler
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt link_prl
+
+STAGING_BINDIR = $(OEDIR)/tmp/staging/i686-linux/bin
+STAGING_CROSSDIR = $(OEDIR)/tmp/cross/bin
+STAGING_INCDIR = $(OEDIR)/tmp/staging/arm-linux/include
+STAGING_LIBDIR = $(OEDIR)/tmp/staging/arm-linux/lib
+
+QMAKE_CC = $(CCACHE) $(DISTCC) $$STAGING_CROSSDIR/arm-linux-gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA)
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+
+QMAKE_CXX = $(CCACHE) $(DISTCC) $$STAGING_CROSSDIR/arm-linux-g++ -DQT_QWS_SL5XX -DQT_QWS_SHARP -DQT_QWS_EBX -DQT_QWS_CUSTOM
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQWS -fno-exceptions -fno-rtti $(CXXFLAGS_EXTRA)
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR = $$STAGING_INCDIR
+QMAKE_LIBDIR = $$STAGING_LIBDIR
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $(QTDIR)/include
+QMAKE_LIBDIR_QT = $(QTDIR)/lib
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+QMAKE_INCDIR_QTOPIA =
+QMAKE_LIBDIR_QTOPIA =
+
+QMAKE_LINK = $$STAGING_CROSSDIR/arm-linux-g++
+QMAKE_LINK_SHLIB = $$STAGING_CROSSDIR/arm-linux-g++
+QMAKE_LFLAGS = $(LFLAGS_EXTRA)
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_RPATH = -Wl,-rpath-link,
+
+QMAKE_LIBS = $(LIBS_EXTRA)
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 =
+QMAKE_LIBS_X11SM =
+QMAKE_LIBS_QT = -lqte
+QMAKE_LIBS_QT_THREAD = -lqte-mt
+QMAKE_LIBS_QT_OPENGL = -lqgl
+QMAKE_LIBS_QTOPIA = -lqpe
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_MOC = $$STAGING_BINDIR/moc
+QMAKE_UIC = $$STAGING_BINDIR/uic
+
+QMAKE_AR = ar cqs
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
diff --git a/mkspecs/qws/linux-oe-g++/qplatformdefs.h b/mkspecs/qws/linux-oe-g++/qplatformdefs.h
new file mode 100644
index 0000000..8fea644
--- a/dev/null
+++ b/mkspecs/qws/linux-oe-g++/qplatformdefs.h
@@ -0,0 +1,103 @@
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// DNS system header files are a mess!
+// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
+// 'u_char' and includes <sys/types.h>. Now the problem is that
+// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
+// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
+#ifndef _BSD_SOURCE
+# define _BSD_SOURCE
+#endif
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#ifdef QT_THREAD_SUPPORT
+#include <pthread.h>
+#endif
+
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+#define QT_RTLD_FLAGS RTLD_LAZY|RTLD_GLOBAL
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+
+// DNS header files are not fully covered by X/Open specifications.
+// In particular nothing is said about res_* :/
+// Header files <netinet/in.h> and <arpa/nameser.h> are not included
+// by <resolv.h> on older versions of the GNU C library. Note that
+// <arpa/nameser.h> must be included before <resolv.h>.
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+
+
+#if !defined(QT_NO_COMPAT)
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+#endif
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T socklen_t
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H