summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore 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
@@ -105,19 +105,23 @@ qtmessages:
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
diff --git a/Vars.make b/Vars.make
index 5e2cd7b..238918f 100644
--- a/Vars.make
+++ b/Vars.make
@@ -1,25 +1,33 @@
-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
diff --git a/config.in b/config.in
index 37cbb67..372ecfb 100644
--- a/config.in
+++ b/config.in
@@ -16,30 +16,37 @@ choice
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"
@@ -75,16 +82,17 @@ config SPECFILE
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
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