author | mickeyl <mickeyl> | 2004-11-15 14:29:41 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-11-15 14:29:41 (UTC) |
commit | 5e6ce0ba567dd9c8ae33353fcf1d0554b34241e8 (patch) (unidiff) | |
tree | e3903fd3f146c16d3521db20a6f3ca2db8b95121 /mkspecs/qws | |
parent | c9543dc4edd3ea586c04e8114e133296ad9529d9 (diff) | |
download | opie-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)
-rw-r--r-- | mkspecs/qws/linux-oe-g++/qmake.conf | 86 | ||||
-rw-r--r-- | mkspecs/qws/linux-oe-g++/qplatformdefs.h | 103 |
2 files changed, 189 insertions, 0 deletions
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 @@ | |||
1 | # | ||
2 | # $Id$ | ||
3 | # | ||
4 | # qmake configuration for linux-g++ using the arm-linux-g++ crosscompiler | ||
5 | # | ||
6 | |||
7 | MAKEFILE_GENERATOR= UNIX | ||
8 | TEMPLATE = app | ||
9 | CONFIG += qt link_prl | ||
10 | |||
11 | STAGING_BINDIR = $(OEDIR)/tmp/staging/i686-linux/bin | ||
12 | STAGING_CROSSDIR = $(OEDIR)/tmp/cross/bin | ||
13 | STAGING_INCDIR = $(OEDIR)/tmp/staging/arm-linux/include | ||
14 | STAGING_LIBDIR = $(OEDIR)/tmp/staging/arm-linux/lib | ||
15 | |||
16 | QMAKE_CC = $(CCACHE) $(DISTCC) $$STAGING_CROSSDIR/arm-linux-gcc | ||
17 | QMAKE_LEX = flex | ||
18 | QMAKE_LEXFLAGS = | ||
19 | QMAKE_YACC = yacc | ||
20 | QMAKE_YACCFLAGS = -d | ||
21 | QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA) | ||
22 | QMAKE_CFLAGS_WARN_ON= -Wall -W | ||
23 | QMAKE_CFLAGS_WARN_OFF= | ||
24 | QMAKE_CFLAGS_RELEASE= $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2) | ||
25 | QMAKE_CFLAGS_DEBUG= -g | ||
26 | QMAKE_CFLAGS_SHLIB= -fPIC | ||
27 | QMAKE_CFLAGS_YACC= -Wno-unused -Wno-parentheses | ||
28 | QMAKE_CFLAGS_THREAD= -D_REENTRANT | ||
29 | |||
30 | QMAKE_CXX = $(CCACHE) $(DISTCC) $$STAGING_CROSSDIR/arm-linux-g++ -DQT_QWS_SL5XX -DQT_QWS_SHARP -DQT_QWS_EBX -DQT_QWS_CUSTOM | ||
31 | QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQWS -fno-exceptions -fno-rtti $(CXXFLAGS_EXTRA) | ||
32 | QMAKE_CXXFLAGS_WARN_ON= $$QMAKE_CFLAGS_WARN_ON | ||
33 | QMAKE_CXXFLAGS_WARN_OFF= $$QMAKE_CFLAGS_WARN_OFF | ||
34 | QMAKE_CXXFLAGS_RELEASE= $$QMAKE_CFLAGS_RELEASE | ||
35 | QMAKE_CXXFLAGS_DEBUG= $$QMAKE_CFLAGS_DEBUG | ||
36 | QMAKE_CXXFLAGS_SHLIB= $$QMAKE_CFLAGS_SHLIB | ||
37 | QMAKE_CXXFLAGS_YACC= $$QMAKE_CFLAGS_YACC | ||
38 | QMAKE_CXXFLAGS_THREAD= $$QMAKE_CFLAGS_THREAD | ||
39 | |||
40 | QMAKE_INCDIR = $$STAGING_INCDIR | ||
41 | QMAKE_LIBDIR = $$STAGING_LIBDIR | ||
42 | QMAKE_INCDIR_X11= | ||
43 | QMAKE_LIBDIR_X11= | ||
44 | QMAKE_INCDIR_QT = $(QTDIR)/include | ||
45 | QMAKE_LIBDIR_QT = $(QTDIR)/lib | ||
46 | QMAKE_INCDIR_OPENGL= | ||
47 | QMAKE_LIBDIR_OPENGL= | ||
48 | QMAKE_INCDIR_QTOPIA= | ||
49 | QMAKE_LIBDIR_QTOPIA= | ||
50 | |||
51 | QMAKE_LINK = $$STAGING_CROSSDIR/arm-linux-g++ | ||
52 | QMAKE_LINK_SHLIB= $$STAGING_CROSSDIR/arm-linux-g++ | ||
53 | QMAKE_LFLAGS = $(LFLAGS_EXTRA) | ||
54 | QMAKE_LFLAGS_RELEASE= | ||
55 | QMAKE_LFLAGS_DEBUG= | ||
56 | QMAKE_LFLAGS_SHLIB = -shared | ||
57 | QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB | ||
58 | QMAKE_LFLAGS_SONAME = -Wl,-soname, | ||
59 | QMAKE_LFLAGS_THREAD = | ||
60 | QMAKE_RPATH = -Wl,-rpath-link, | ||
61 | |||
62 | QMAKE_LIBS = $(LIBS_EXTRA) | ||
63 | QMAKE_LIBS_DYNLOAD = -ldl | ||
64 | QMAKE_LIBS_X11 = | ||
65 | QMAKE_LIBS_X11SM= | ||
66 | QMAKE_LIBS_QT = -lqte | ||
67 | QMAKE_LIBS_QT_THREAD = -lqte-mt | ||
68 | QMAKE_LIBS_QT_OPENGL= -lqgl | ||
69 | QMAKE_LIBS_QTOPIA= -lqpe | ||
70 | QMAKE_LIBS_THREAD = -lpthread | ||
71 | |||
72 | QMAKE_MOC = $$STAGING_BINDIR/moc | ||
73 | QMAKE_UIC = $$STAGING_BINDIR/uic | ||
74 | |||
75 | QMAKE_AR = ar cqs | ||
76 | QMAKE_RANLIB = | ||
77 | |||
78 | QMAKE_TAR = tar -cf | ||
79 | QMAKE_GZIP = gzip -9f | ||
80 | |||
81 | QMAKE_COPY = cp -f | ||
82 | QMAKE_MOVE = mv -f | ||
83 | QMAKE_DEL_FILE = rm -f | ||
84 | QMAKE_DEL_DIR = rmdir | ||
85 | QMAKE_CHK_DIR_EXISTS= test -d | ||
86 | 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 @@ | |||
1 | #ifndef QPLATFORMDEFS_H | ||
2 | #define QPLATFORMDEFS_H | ||
3 | |||
4 | // Get Qt defines/settings | ||
5 | |||
6 | #include "qglobal.h" | ||
7 | |||
8 | // Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs | ||
9 | |||
10 | // DNS system header files are a mess! | ||
11 | // <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using | ||
12 | // 'u_char' and includes <sys/types.h>. Now the problem is that | ||
13 | // <sys/types.h> defines 'u_char' only if __USE_BSD is defined. | ||
14 | // __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined. | ||
15 | #ifndef _BSD_SOURCE | ||
16 | # define _BSD_SOURCE | ||
17 | #endif | ||
18 | |||
19 | // 1) need to reset default environment if _BSD_SOURCE is defined | ||
20 | // 2) need to specify POSIX thread interfaces explicitly in glibc 2.0 | ||
21 | // 3) it seems older glibc need this to include the X/Open stuff | ||
22 | #ifndef _GNU_SOURCE | ||
23 | # define _GNU_SOURCE | ||
24 | #endif | ||
25 | |||
26 | #include <unistd.h> | ||
27 | |||
28 | |||
29 | // We are hot - unistd.h should have turned on the specific APIs we requested | ||
30 | |||
31 | |||
32 | #ifdef QT_THREAD_SUPPORT | ||
33 | #include <pthread.h> | ||
34 | #endif | ||
35 | |||
36 | #include <dirent.h> | ||
37 | #include <fcntl.h> | ||
38 | #include <grp.h> | ||
39 | #include <pwd.h> | ||
40 | #include <signal.h> | ||
41 | #include <dlfcn.h> | ||
42 | #define QT_RTLD_FLAGSRTLD_LAZY|RTLD_GLOBAL | ||
43 | |||
44 | #include <sys/types.h> | ||
45 | #include <sys/ioctl.h> | ||
46 | #include <sys/ipc.h> | ||
47 | #include <sys/time.h> | ||
48 | #include <sys/shm.h> | ||
49 | #include <sys/socket.h> | ||
50 | #include <sys/stat.h> | ||
51 | #include <sys/wait.h> | ||
52 | |||
53 | // DNS header files are not fully covered by X/Open specifications. | ||
54 | // In particular nothing is said about res_* :/ | ||
55 | // Header files <netinet/in.h> and <arpa/nameser.h> are not included | ||
56 | // by <resolv.h> on older versions of the GNU C library. Note that | ||
57 | // <arpa/nameser.h> must be included before <resolv.h>. | ||
58 | #include <netinet/in.h> | ||
59 | #include <arpa/nameser.h> | ||
60 | #include <resolv.h> | ||
61 | |||
62 | |||
63 | #if !defined(QT_NO_COMPAT) | ||
64 | #define QT_STATBUF struct stat | ||
65 | #define QT_STATBUF4TSTATstruct stat | ||
66 | #define QT_STAT ::stat | ||
67 | #define QT_FSTAT ::fstat | ||
68 | #define QT_STAT_REG S_IFREG | ||
69 | #define QT_STAT_DIR S_IFDIR | ||
70 | #define QT_STAT_MASK S_IFMT | ||
71 | #define QT_STAT_LNK S_IFLNK | ||
72 | #define QT_FILENO fileno | ||
73 | #define QT_OPEN ::open | ||
74 | #define QT_CLOSE ::close | ||
75 | #define QT_LSEEK ::lseek | ||
76 | #define QT_READ ::read | ||
77 | #define QT_WRITE ::write | ||
78 | #define QT_ACCESS ::access | ||
79 | #define QT_GETCWD ::getcwd | ||
80 | #define QT_CHDIR ::chdir | ||
81 | #define QT_MKDIR ::mkdir | ||
82 | #define QT_RMDIR ::rmdir | ||
83 | #define QT_OPEN_RDONLY O_RDONLY | ||
84 | #define QT_OPEN_WRONLY O_WRONLY | ||
85 | #define QT_OPEN_RDWR O_RDWR | ||
86 | #define QT_OPEN_CREAT O_CREAT | ||
87 | #define QT_OPEN_TRUNC O_TRUNC | ||
88 | #define QT_OPEN_APPEND O_APPEND | ||
89 | #endif | ||
90 | |||
91 | #define QT_SIGNAL_RETTYPEvoid | ||
92 | #define QT_SIGNAL_ARGS int | ||
93 | #define QT_SIGNAL_IGNORESIG_IGN | ||
94 | |||
95 | #define QT_SOCKLEN_T socklen_t | ||
96 | |||
97 | #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) | ||
98 | #define QT_SNPRINTF ::snprintf | ||
99 | #define QT_VSNPRINTF ::vsnprintf | ||
100 | #endif | ||
101 | |||
102 | |||
103 | #endif // QPLATFORMDEFS_H | ||