summaryrefslogtreecommitdiff
path: root/mkspecs/linux-kcc
Unidiff
Diffstat (limited to 'mkspecs/linux-kcc') (more/less context) (ignore whitespace changes)
-rw-r--r--mkspecs/linux-kcc/qmake.conf89
-rw-r--r--mkspecs/linux-kcc/qplatformdefs.h109
2 files changed, 198 insertions, 0 deletions
diff --git a/mkspecs/linux-kcc/qmake.conf b/mkspecs/linux-kcc/qmake.conf
new file mode 100644
index 0000000..20bcd80
--- a/dev/null
+++ b/mkspecs/linux-kcc/qmake.conf
@@ -0,0 +1,89 @@
1#
2# $Id$
3#
4# qmake configuration for KAI C++ 4.0f for Linux
5#
6# From the KAI C++ man page for Linux:
7# --[no_]thread_safe
8 # [Waive or] Request thread-safe handling of system-allocated objects.
9 # To guarantee thread safety, this option must be used when both
10 # compiling and linking. Thread-safe C++ is not link-compatible with
11 # (the default) non-thread-safe C++.
12#
13
14 MAKEFILE_GENERATOR= UNIX
15 TEMPLATE = app
16 CONFIG += qt warn_on release
17
18 QMAKE_CC = KCC
19 QMAKE_LEX = flex
20 QMAKE_LEXFLAGS =
21 QMAKE_YACC = yacc
22 QMAKE_YACCFLAGS = -d
23 QMAKE_CFLAGS = --c --display_error_number --backend -pipe
24 QMAKE_CFLAGS_DEPS= -M
25 QMAKE_CFLAGS_WARN_ON=
26 QMAKE_CFLAGS_WARN_OFF= -w
27 QMAKE_CFLAGS_RELEASE= +K2
28 QMAKE_CFLAGS_DEBUG= +K0
29 QMAKE_CFLAGS_SHLIB= -fPIC
30 QMAKE_CFLAGS_YACC= --diag_suppress 111,177
31 QMAKE_CFLAGS_THREAD= --thread_safe
32
33 QMAKE_CXX = KCC
34 QMAKE_CXXFLAGS = --display_error_number --diag_suppress 611,1142 --backend -pipe
35 QMAKE_CXXFLAGS_DEPS= $$QMAKE_CFLAGS_DEPS
36 QMAKE_CXXFLAGS_WARN_ON= $$QMAKE_CFLAGS_WARN_ON
37 QMAKE_CXXFLAGS_WARN_OFF= $$QMAKE_CFLAGS_WARN_OFF
38 QMAKE_CXXFLAGS_RELEASE= $$QMAKE_CFLAGS_RELEASE
39 QMAKE_CXXFLAGS_DEBUG= $$QMAKE_CFLAGS_DEBUG
40 QMAKE_CXXFLAGS_SHLIB= $$QMAKE_CFLAGS_SHLIB
41 QMAKE_CXXFLAGS_YACC= $$QMAKE_CFLAGS_YACC
42 QMAKE_CXXFLAGS_THREAD= $$QMAKE_CFLAGS_THREAD
43
44 QMAKE_INCDIR =
45 QMAKE_LIBDIR =
46 QMAKE_INCDIR_X11= /usr/X11R6/include
47 QMAKE_LIBDIR_X11= /usr/X11R6/lib
48 QMAKE_INCDIR_QT = $(QTDIR)/include
49 QMAKE_LIBDIR_QT = $(QTDIR)/lib
50 QMAKE_INCDIR_OPENGL= /usr/X11R6/include
51 QMAKE_LIBDIR_OPENGL= /usr/X11R6/lib
52
53 QMAKE_LINK = KCC
54 QMAKE_LINK_SHLIB= KCC
55 QMAKE_LFLAGS =
56 QMAKE_LFLAGS_RELEASE=
57 QMAKE_LFLAGS_DEBUG=
58 QMAKE_LFLAGS_SHLIB=
59 QMAKE_LFLAGS_PLUGIN= $$QMAKE_LFLAGS_SHLIB
60 QMAKE_LFLAGS_SONAME= --soname$$LITERAL_WHITESPACE
61 QMAKE_LFLAGS_THREAD= --thread_safe
62 QMAKE_RPATH = -rpath$$LITERAL_WHITESPACE
63
64 QMAKE_LIBS =
65 QMAKE_LIBS_DYNLOAD= -ldl
66 QMAKE_LIBS_X11 = -lXext -lX11 -lm
67 QMAKE_LIBS_X11SM= -lSM -lICE
68 QMAKE_LIBS_NIS = -lnsl
69 QMAKE_LIBS_QT = -lqt
70 QMAKE_LIBS_QT_THREAD= -lqt-mt
71 QMAKE_LIBS_OPENGL= -lGLU -lGL -lXmu
72 QMAKE_LIBS_OPENGL_QT= -lGL -lXmu
73 QMAKE_LIBS_THREAD=
74
75 QMAKE_MOC = $(QTDIR)/bin/moc
76 QMAKE_UIC = $(QTDIR)/bin/uic
77
78 QMAKE_AR = ar cqs
79 QMAKE_RANLIB =
80
81 QMAKE_CLEAN = -r $(OBJECTS_DIR)ti_files
82
83 QMAKE_TAR = tar -cf
84 QMAKE_GZIP = gzip -9f
85
86 QMAKE_COPY = cp -f
87 QMAKE_MOVE = mv -f
88 QMAKE_DEL_FILE = rm -f
89 QMAKE_DEL_DIR = rmdir
diff --git a/mkspecs/linux-kcc/qplatformdefs.h b/mkspecs/linux-kcc/qplatformdefs.h
new file mode 100644
index 0000000..9df75e3
--- a/dev/null
+++ b/mkspecs/linux-kcc/qplatformdefs.h
@@ -0,0 +1,109 @@
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// KAI C++ has at the moment problems with unloading the Qt plugins.
43// So don't unload them as a workaround for now.
44#define QT_NO_LIBRARY_UNLOAD
45
46#include <sys/types.h>
47#include <sys/ioctl.h>
48#include <sys/ipc.h>
49#include <sys/time.h>
50#include <sys/shm.h>
51#include <sys/socket.h>
52#include <sys/stat.h>
53#include <sys/wait.h>
54
55// DNS header files are not fully covered by X/Open specifications.
56// In particular nothing is said about res_* :/
57// Header files <netinet/in.h> and <arpa/nameser.h> are not included
58// by <resolv.h> on older versions of the GNU C library. Note that
59// <arpa/nameser.h> must be included before <resolv.h>.
60#include <netinet/in.h>
61#include <arpa/nameser.h>
62#include <resolv.h>
63
64
65#if !defined(QT_NO_COMPAT)
66 #define QT_STATBUF struct stat
67 #define QT_STATBUF4TSTATstruct stat
68 #define QT_STAT ::stat
69 #define QT_FSTAT ::fstat
70 #define QT_STAT_REG S_IFREG
71 #define QT_STAT_DIR S_IFDIR
72 #define QT_STAT_MASK S_IFMT
73 #define QT_STAT_LNK S_IFLNK
74 #define QT_FILENO fileno
75 #define QT_OPEN ::open
76 #define QT_CLOSE ::close
77 #define QT_LSEEK ::lseek
78 #define QT_READ ::read
79 #define QT_WRITE ::write
80 #define QT_ACCESS ::access
81 #define QT_GETCWD ::getcwd
82 #define QT_CHDIR ::chdir
83 #define QT_MKDIR ::mkdir
84 #define QT_RMDIR ::rmdir
85 #define QT_OPEN_RDONLY O_RDONLY
86 #define QT_OPEN_WRONLY O_WRONLY
87 #define QT_OPEN_RDWR O_RDWR
88 #define QT_OPEN_CREAT O_CREAT
89 #define QT_OPEN_TRUNC O_TRUNC
90 #define QT_OPEN_APPEND O_APPEND
91#endif
92
93 #define QT_SIGNAL_RETTYPEvoid
94 #define QT_SIGNAL_ARGS int
95 #define QT_SIGNAL_IGNORESIG_IGN
96
97#if defined(__GLIBC__) && (__GLIBC__ >= 2)
98 #define QT_SOCKLEN_T socklen_t
99#else
100 #define QT_SOCKLEN_T int
101#endif
102
103#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
104 #define QT_SNPRINTF ::snprintf
105 #define QT_VSNPRINTF ::vsnprintf
106#endif
107
108
109#endif // QPLATFORMDEFS_H