1 | #
|
---|
2 | # qmake configuration for os2-g++
|
---|
3 | #
|
---|
4 | # Written for Innotek GCC/kLIBC and IBM ILINK or OpenWatcom WLINK
|
---|
5 | #
|
---|
6 |
|
---|
7 | MAKEFILE_GENERATOR = GNUMAKE
|
---|
8 | TEMPLATE = app
|
---|
9 | CONFIG += qt warn_on release link_prl copy_dir_files
|
---|
10 | QT += core gui
|
---|
11 | # @todo
|
---|
12 | #DEFINES += QT_LARGEFILE_SUPPORT
|
---|
13 | QMAKE_COMPILER_DEFINES += __OS2__ __EMX__ __INNOTEK_LIBC__ __GNUC__
|
---|
14 |
|
---|
15 | QMAKE_LINKER_TYPE = $$(EMXOMFLD_TYPE)
|
---|
16 | equals(QMAKE_LINKER_TYPE, "WLINK"):CONFIG *= wlink
|
---|
17 | else:equals(QMAKE_LINKER_TYPE, "wlink"):CONFIG *= wlink
|
---|
18 | else:CONFIG *= ilink
|
---|
19 |
|
---|
20 | QMAKE_EXT_OBJ = .obj
|
---|
21 | QMAKE_EXT_RES = _res.obj
|
---|
22 |
|
---|
23 | QMAKE_CC = gcc
|
---|
24 | QMAKE_LEX = flex
|
---|
25 | QMAKE_LEXFLAGS =
|
---|
26 | QMAKE_YACC = byacc
|
---|
27 | QMAKE_YACCFLAGS = -d
|
---|
28 | QMAKE_CFLAGS = -Zomf -march=i486 -mtune=generic
|
---|
29 | QMAKE_CFLAGS_DEPS = -M
|
---|
30 | QMAKE_CFLAGS_WARN_ON = -Wall
|
---|
31 | QMAKE_CFLAGS_WARN_OFF = -w
|
---|
32 | QMAKE_CFLAGS_RELEASE = -s -O2
|
---|
33 | QMAKE_CFLAGS_DEBUG = -g
|
---|
34 | QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
|
---|
35 |
|
---|
36 | QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
|
---|
37 | QMAKE_CFLAGS_USE_PRECOMPILE = -include ${QMAKE_PCH_OUTPUT_BASE}
|
---|
38 |
|
---|
39 | QMAKE_CFLAGS_INCDIR = -I
|
---|
40 |
|
---|
41 | QMAKE_CXX = g++
|
---|
42 | QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
|
---|
43 | QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
|
---|
44 | QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
|
---|
45 | QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
---|
46 | QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
---|
47 | QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
---|
48 | QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
---|
49 | QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
|
---|
50 | QMAKE_CXXFLAGS_RTTI_ON = -frtti
|
---|
51 | QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
|
---|
52 | QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions
|
---|
53 | QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
|
---|
54 |
|
---|
55 | # make sure includes from the project directory are always found
|
---|
56 | QMAKE_INCDIR = .
|
---|
57 |
|
---|
58 | QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
|
---|
59 | QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
|
---|
60 |
|
---|
61 | QMAKE_SH=$$(QMAKE_SH)
|
---|
62 | isEmpty(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 |
|
---|
82 | QMAKE_LINK = g++
|
---|
83 | QMAKE_LINK_C = gcc
|
---|
84 |
|
---|
85 | ilink {
|
---|
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 | }
|
---|
92 | wlink {
|
---|
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 | }
|
---|
99 | QMAKE_LFLAGS_CONSOLE = -Zlinker /PM:VIO
|
---|
100 | QMAKE_LFLAGS_WINDOWS = -Zlinker /PM:PM -Zno-fork
|
---|
101 | QMAKE_LFLAGS_DLL = -Zdll
|
---|
102 | QMAKE_LFLAGS_MAP = -Zmap
|
---|
103 | QMAKE_LFLAGS_HIGHMEM = -Zhigh-mem
|
---|
104 |
|
---|
105 | QMAKE_LFLAGS_LIBDIR = -L
|
---|
106 | QMAKE_LFLAGS_LIB = -l
|
---|
107 |
|
---|
108 | QMAKE_RUN_LINK = $(LINK) $(LFLAGS) -o $(DESTDIR_TARGET) $(DEF_FILE) -Wl,$$QMAKE_OBJECTS_REF $(LIBS)
|
---|
109 |
|
---|
110 | QMAKE_RUN_IMPLIB = emximp -p 128 -o $@ $<
|
---|
111 |
|
---|
112 | isEmpty(QMAKE_SH) {
|
---|
113 | QMAKE_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 {
|
---|
121 | QMAKE_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 |
|
---|
130 | QMAKE_RUN_GENDEF_EXPORT_ALL = $$QMAKE_RUN_GENDEF \
|
---|
131 | $(if $(DEF_FILE_MAP),-map \"$(DEF_FILE_MAP)\") \
|
---|
132 | $$QMAKE_OBJECTS_REF
|
---|
133 |
|
---|
134 | QMAKE_RUN_GENDEF_EXE = $$QMAKE_RUN_GENDEF \
|
---|
135 | $(if $(DEF_FILE_EXETYPE),-exe \"$(DEF_FILE_EXETYPE)\")
|
---|
136 |
|
---|
137 | QMAKE_LIBS =
|
---|
138 | QMAKE_LIBS_CORE = -lregistry.dll -lsocket
|
---|
139 | QMAKE_LIBS_GUI =
|
---|
140 | QMAKE_LIBS_NETWORK =
|
---|
141 | QMAKE_LIBS_OPENGL =
|
---|
142 | QMAKE_LIBS_COMPAT =
|
---|
143 | QMAKE_LIBS_QT_ENTRY =
|
---|
144 |
|
---|
145 | QMAKE_LIB = emxomfar r
|
---|
146 | QMAKE_RUN_LIB = $(LIB) $(DESTDIR_TARGET) $$QMAKE_OBJECTS_REF
|
---|
147 |
|
---|
148 | isEmpty(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 |
|
---|
168 | isEmpty(QMAKE_SH) {
|
---|
169 | QMAKE_MOC = $$[QT_INSTALL_BINS]\\moc.exe
|
---|
170 | QMAKE_UIC = $$[QT_INSTALL_BINS]\\uic.exe
|
---|
171 | QMAKE_IDC = $$[QT_INSTALL_BINS]\\idc.exe
|
---|
172 | } else {
|
---|
173 | QMAKE_MOC = $$[QT_INSTALL_BINS]/moc.exe
|
---|
174 | QMAKE_UIC = $$[QT_INSTALL_BINS]/uic.exe
|
---|
175 | QMAKE_IDC = $$[QT_INSTALL_BINS]/idc.exe
|
---|
176 | }
|
---|
177 |
|
---|
178 | QMAKE_IDL =
|
---|
179 | QMAKE_ZIP = zip -r -9
|
---|
180 |
|
---|
181 | QMAKE_RC = rc
|
---|
182 | QMAKE_RUN_RC2RES_ENV = export INCLUDE = $(INCLUDEPATH)
|
---|
183 | QMAKE_RUN_RC2RES = $(RC) -n -r $(RC_FILE) $(RES_FILE)
|
---|
184 | QMAKE_RUN_RC2EXE = $(RC) -n -x2 $(RES_FILE) $(DESTDIR_TARGET)
|
---|
185 |
|
---|
186 | QMAKE_STRIP =
|
---|
187 |
|
---|
188 | QMAKE_MAP_FILE = $(basename $(DESTDIR_TARGET)).map
|
---|
189 | QMAKE_SYM_FILE = $(basename $(DESTDIR_TARGET)).sym
|
---|
190 | ilink:QMAKE_RUN_MAPSYM = $(QMAKESPECDIR)\\runmapsym.cmd \
|
---|
191 | mapsym $$QMAKE_MAP_FILE $$QMAKE_SYM_FILE
|
---|
192 | wlink:QMAKE_RUN_MAPSYM = $(QMAKESPECDIR)\\runmapsym.cmd \
|
---|
193 | $(QMAKESPECDIR)\\wmapsym.cmd $$QMAKE_MAP_FILE $$QMAKE_SYM_FILE
|
---|
194 |
|
---|
195 | QMAKE_IFDEF = ifdef
|
---|
196 | QMAKE_IFNDEF = ifndef
|
---|
197 | QMAKE_ENDIF = endif
|
---|
198 |
|
---|
199 | load(qt_config)
|
---|