Ticket #303: qmake.conf

File qmake.conf, 7.0 KB (added by Silvan Scherrer, 3 years ago)
Line 
1#
2# qmake configuration for os2-g++
3#
4# Written for Innotek GCC/kLIBC and IBM ILINK or OpenWatcom WLINK
5#
6
7MAKEFILE_GENERATOR  = GNUMAKE
8TEMPLATE        = app
9CONFIG          += qt warn_on release link_prl copy_dir_files
10QT              += core gui
11# @todo
12#DEFINES         += QT_LARGEFILE_SUPPORT
13QMAKE_COMPILER_DEFINES  += __OS2__ __EMX__ __INNOTEK_LIBC__ __GNUC__
14
15QMAKE_LINKER_TYPE = $$(EMXOMFLD_TYPE)
16equals(QMAKE_LINKER_TYPE, "WLINK"):CONFIG *= wlink
17else:equals(QMAKE_LINKER_TYPE, "wlink"):CONFIG *= wlink
18else:CONFIG *= ilink
19
20QMAKE_EXT_OBJ           = .obj
21QMAKE_EXT_RES           = _res.obj
22
23QMAKE_CC                = gcc
24QMAKE_LEX               = flex
25QMAKE_LEXFLAGS          =
26QMAKE_YACC              = byacc
27QMAKE_YACCFLAGS         = -d
28QMAKE_CFLAGS            = -Zomf -march=i486 -mtune=generic
29QMAKE_CFLAGS_DEPS       = -M
30QMAKE_CFLAGS_WARN_ON    = -Wall
31QMAKE_CFLAGS_WARN_OFF   = -w
32QMAKE_CFLAGS_RELEASE    = -s -O2
33QMAKE_CFLAGS_DEBUG      = -g
34QMAKE_CFLAGS_YACC       = -Wno-unused -Wno-parentheses
35
36QMAKE_CFLAGS_PRECOMPILE     = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
37QMAKE_CFLAGS_USE_PRECOMPILE = -include ${QMAKE_PCH_OUTPUT_BASE}
38
39QMAKE_CFLAGS_INCDIR     = -I
40
41QMAKE_CXX               = g++
42QMAKE_CXXFLAGS          = $$QMAKE_CFLAGS
43QMAKE_CXXFLAGS_DEPS     = $$QMAKE_CFLAGS_DEPS
44QMAKE_CXXFLAGS_WARN_ON  = $$QMAKE_CFLAGS_WARN_ON
45QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
46QMAKE_CXXFLAGS_RELEASE  = $$QMAKE_CFLAGS_RELEASE
47QMAKE_CXXFLAGS_DEBUG    = $$QMAKE_CFLAGS_DEBUG
48QMAKE_CXXFLAGS_YACC     = $$QMAKE_CFLAGS_YACC
49QMAKE_CXXFLAGS_THREAD   = $$QMAKE_CFLAGS_THREAD
50QMAKE_CXXFLAGS_RTTI_ON  = -frtti
51QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
52QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions
53QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
54
55# make sure includes from the project directory are always found
56QMAKE_INCDIR        = .
57
58QMAKE_INCDIR_QT     = $$[QT_INSTALL_HEADERS]
59QMAKE_LIBDIR_QT     = $$[QT_INSTALL_LIBS]
60
61QMAKE_SH=$$(QMAKE_SH)
62isEmpty(QMAKE_SH) {
63    # we need response files because of CMD.EXE command line limit of 1024 chars
64    QMAKE_CFLAGS_RSP_VAR    = CFLAGS_RSP
65    QMAKE_CXXFLAGS_RSP_VAR  = CXXFLAGS_RSP
66    QMAKE_DEFINES_RSP_VAR   = DEFINES_RSP
67    QMAKE_INCPATH_RSP_VAR   = INCPATH_RSP
68    QMAKE_OBJECTS_RSP_VAR   = OBJECTS_RSP
69    QMAKE_RUN_CC        = $(CC) -c @$(CFLAGS_RSP) @$(DEFINES_RSP) @$(INCPATH_RSP) -o $obj $src
70    QMAKE_RUN_CC_IMP    = $(CC) -c @$(CFLAGS_RSP) @$(DEFINES_RSP) @$(INCPATH_RSP) -o $@ $<
71    QMAKE_RUN_CXX       = $(CXX) -c @$(CXXFLAGS_RSP) @$(DEFINES_RSP) @$(INCPATH_RSP) -o $obj $src
72    QMAKE_RUN_CXX_IMP   = $(CXX) -c @$(CXXFLAGS_RSP) @$(DEFINES_RSP) @$(INCPATH_RSP) -o $@ $<
73    QMAKE_OBJECTS_REF   = @$(OBJECTS_RSP)
74} else {
75    QMAKE_RUN_CC        = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
76    QMAKE_RUN_CC_IMP    = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
77    QMAKE_RUN_CXX       = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
78    QMAKE_RUN_CXX_IMP   = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
79    QMAKE_OBJECTS_REF   = $(OBJECTS)
80}
81
82QMAKE_LINK          = g++
83QMAKE_LINK_C        = gcc
84
85ilink {
86    QMAKE_LFLAGS            = -Zomf -Zstack 0x2000
87    QMAKE_LFLAGS_EXCEPTIONS_ON  =
88    QMAKE_LFLAGS_EXCEPTIONS_OFF =
89    QMAKE_LFLAGS_RELEASE    = -s -Zlinker /EXEPACK:2
90    QMAKE_LFLAGS_DEBUG      =
91}
92wlink {
93    QMAKE_LFLAGS            = -Zomf -Zstack 0x2000 -Zlinker \"DISABLE 1121\"
94    QMAKE_LFLAGS_EXCEPTIONS_ON  =
95    QMAKE_LFLAGS_EXCEPTIONS_OFF =
96    QMAKE_LFLAGS_RELEASE    = -s
97    QMAKE_LFLAGS_DEBUG      =
98}
99QMAKE_LFLAGS_CONSOLE    = -Zlinker /PM:VIO
100QMAKE_LFLAGS_WINDOWS    = -Zlinker /PM:PM -Zno-fork
101QMAKE_LFLAGS_DLL        = -Zdll
102QMAKE_LFLAGS_MAP        = -Zmap
103QMAKE_LFLAGS_HIGHMEM    = -Zhigh-mem
104
105QMAKE_LFLAGS_LIBDIR     = -L
106QMAKE_LFLAGS_LIB        = -l
107
108QMAKE_RUN_LINK          = $(LINK) $(LFLAGS) -o $(DESTDIR_TARGET) $(DEF_FILE) -Wl,$$QMAKE_OBJECTS_REF $(LIBS)
109
110QMAKE_RUN_IMPLIB        = emximp -p 128 -o $@ $<
111
112isEmpty(QMAKE_SH) {
113QMAKE_RUN_GENDEF            = \
114    $(QMAKESPECDIR)\\emxexpw.cmd -name $(basename $(TARGET)) \
115        -def $(DEF_FILE) \
116        $(if $(DEF_FILE_VERSION),-version \"$(DEF_FILE_VERSION)\") \
117        $(if $(DEF_FILE_DESCRIPTION),-desc \"$(DEF_FILE_DESCRIPTION)\") \
118        $(if $(DEF_FILE_VENDOR),-vendor \"$(DEF_FILE_VENDOR)\") \
119        $(if $(DEF_FILE_TEMPLATE),-template \"$(DEF_FILE_TEMPLATE)\")
120} else {
121QMAKE_RUN_GENDEF            = \
122    $(QMAKESPECDIR)/emxexpw.cmd -name $(basename $(TARGET)) \
123        -def $(DEF_FILE) \
124        $(if $(DEF_FILE_VERSION),-version \"$(DEF_FILE_VERSION)\") \
125        $(if $(DEF_FILE_DESCRIPTION),-desc \"$(DEF_FILE_DESCRIPTION)\") \
126        $(if $(DEF_FILE_VENDOR),-vendor \"$(DEF_FILE_VENDOR)\") \
127        $(if $(DEF_FILE_TEMPLATE),-template \"$(DEF_FILE_TEMPLATE)\")
128}
129
130QMAKE_RUN_GENDEF_EXPORT_ALL = $$QMAKE_RUN_GENDEF \
131        $(if $(DEF_FILE_MAP),-map \"$(DEF_FILE_MAP)\") \
132        $$QMAKE_OBJECTS_REF
133
134QMAKE_RUN_GENDEF_EXE    = $$QMAKE_RUN_GENDEF \
135        $(if $(DEF_FILE_EXETYPE),-exe \"$(DEF_FILE_EXETYPE)\")
136
137QMAKE_LIBS              =
138QMAKE_LIBS_CORE         = -lregistry.dll -lsocket
139QMAKE_LIBS_GUI          =
140QMAKE_LIBS_NETWORK      =
141QMAKE_LIBS_OPENGL       =
142QMAKE_LIBS_COMPAT       =
143QMAKE_LIBS_QT_ENTRY     =
144
145QMAKE_LIB               = emxomfar r
146QMAKE_RUN_LIB           = $(LIB) $(DESTDIR_TARGET) $$QMAKE_OBJECTS_REF
147
148isEmpty(QMAKE_SH) {
149    QMAKE_COPY          = copy
150    QMAKE_COPY_DIR      = $(QMAKESPECDIR)\\cpdir.cmd
151    QMAKE_MOVE          = move
152    QMAKE_DEL_FILE      = del
153    QMAKE_MKDIR         = $(QMAKESPECDIR)\\mkdir-p.cmd
154    QMAKE_DEL_DIR       = rmdir
155    QMAKE_CHK_DIR_EXISTS    = if not exist
156} else {
157    MINGW_IN_SHELL      = 1
158    QMAKE_DIR_SEP       = /
159    QMAKE_COPY          = cp
160    QMAKE_COPY_DIR      = $(QMAKESPECDIR)/cpdir.cmd
161    QMAKE_MOVE          = mv
162    QMAKE_DEL_FILE      = rm
163    QMAKE_MKDIR         = || mkdir -p
164    QMAKE_DEL_DIR       = rmdir
165    QMAKE_CHK_DIR_EXISTS    = test -d
166}
167
168isEmpty(QMAKE_SH) {
169QMAKE_MOC       = $$[QT_INSTALL_BINS]\\moc.exe
170QMAKE_UIC       = $$[QT_INSTALL_BINS]\\uic.exe
171QMAKE_IDC       = $$[QT_INSTALL_BINS]\\idc.exe
172} else {
173QMAKE_MOC       = $$[QT_INSTALL_BINS]/moc.exe
174QMAKE_UIC       = $$[QT_INSTALL_BINS]/uic.exe
175QMAKE_IDC       = $$[QT_INSTALL_BINS]/idc.exe
176}
177
178QMAKE_IDL       =
179QMAKE_ZIP       = zip -r -9
180
181QMAKE_RC                = rc
182QMAKE_RUN_RC2RES_ENV    = export INCLUDE = $(INCLUDEPATH)
183QMAKE_RUN_RC2RES        = $(RC) -n -r $(RC_FILE) $(RES_FILE)
184QMAKE_RUN_RC2EXE        = $(RC) -n -x2 $(RES_FILE) $(DESTDIR_TARGET)
185
186QMAKE_STRIP     =
187
188QMAKE_MAP_FILE  = $(basename $(DESTDIR_TARGET)).map
189QMAKE_SYM_FILE  = $(basename $(DESTDIR_TARGET)).sym
190ilink:QMAKE_RUN_MAPSYM  = $(QMAKESPECDIR)\\runmapsym.cmd \
191    mapsym $$QMAKE_MAP_FILE $$QMAKE_SYM_FILE
192wlink:QMAKE_RUN_MAPSYM  = $(QMAKESPECDIR)\\runmapsym.cmd \
193    $(QMAKESPECDIR)\\wmapsym.cmd $$QMAKE_MAP_FILE $$QMAKE_SYM_FILE
194
195QMAKE_IFDEF     = ifdef
196QMAKE_IFNDEF    = ifndef
197QMAKE_ENDIF     = endif
198
199load(qt_config)