This repository has been archived by the owner on Nov 16, 2022. It is now read-only.
forked from fwbuilder/fwbuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qmake.inc.in
211 lines (159 loc) · 5.94 KB
/
qmake.inc.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
#-*- mode: makefile; tab-width: 4; -*-
#
########## fwbuilder/qmake.inc.in
#
QTDIR = $$(QTDIR)
TEMPLATE = app
DEFINES += $$(DEFINES)
LANGUAGE = C++
UI_DIR = ui
MANDIR = @MANDIR@
DOCDIR = @DOCDIR@
HAVE_QTDBUS = @HAVE_QTDBUS@
HAVE_CPPUNIT = @HAVE_CPPUNIT@
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
CPPUNIT_LIBS = @CPPUNIT_LIBS@
# CONFIG -= nostrip
# CONFIG += release
CONFIG += debug
unix {
PREFIX = @PREFIX@
ANTLR_INCLUDEPATH = @ANTLR_INCLUDEPATH@
ANTLR_LIBS = @ANTLR_LIBS@
QMAKE_CXX = @CCACHE@ @DISTCC@ $$QMAKE_CXX
INCLUDEPATH += .. ../..
INCLUDEPATH += @XML_CFLAGS_Q@ @XSLT_CFLAGS_Q@
LIBS += @PTHREAD_LIBS@ @XML_LIBS@ @XSLT_LIBS@ @LIBSNMP_LIBS@ @LIB_RESOLV@ @LIBS@
UI_DIR = .ui
MOC_DIR = .moc
OBJECTS_DIR = .obj
QMAKE_CFLAGS_DEBUG += -Wno-unused-parameter
QMAKE_CFLAGS_RELEASE += -Wno-unused-parameter
QMAKE_CXXFLAGS_DEBUG += -Wno-unused-parameter
QMAKE_CXXFLAGS_RELEASE += -Wno-unused-parameter
!macx {
exec_prefix = @EXEC_PREFIX@
DESTDIR =
ICONSDIR = @ICONSDIR@
target.path = $$PREFIX/bin
dtd.path = @RES_DIR@/
migration.path = @RES_DIR@/migration
doc.path = @DOCDIR@
datadir.path = @DATADIR@
res.path = @RES_DIR@
res_os.path = $$res.path/os/
res_platform.path = $$res.path/platform/
res_help_C.path = $$res.path/help/C
res_help_en_US.path = $$res.path/help/en_US
res_desktop.path = @DATADIR@/applications/
res_configlets.path = $$res.path/configlets
# INSTALLS += icns
# LIBS += @LIBS@
PKGLOCALEDIR = $$res.path/locale
CONFIG += warn_on
# DEFINES += __STDC_FORMAT_MACROS
}
}
win32 {
# Keep this as a absolute full path. For some reason, when
# I leave it is up to qmake to define this variable, and it
# makes it "xcopy /i /y /s /q", I get an error "Invalid number of parameters"
# even though command line looks correct. Chances are, there is another
# xcopy somewhere on the system that gets used, but I could not find it.
# Setting this variable using full path works.
QMAKE_COPY_DIR = C:\\Windows\\System32\\xcopy /I /Y /S /Q
PREFIX = "c:/tmp/build_root"
DOCDIR = "$$PREFIX/doc/fwbuilder"
exec_prefix = "$$PREFIX"
MANDIR = "$$PREFIX/man/"
DESTDIR = ""
doc.path = $$DOCDIR
target.path = $$PREFIX/
res.path = $$PREFIX/resources
res_os.path = $$res.path/os
res_platform.path = $$res.path/platform
res_help_C.path = $$res.path/help/C
res_help_en_US.path = $$res.path/help/en_US
res_configlets.path = $$res.path/configlets
PKGLOCALEDIR = $$res.path/locale
CONFIG += qt thread rtti stl warn_on release
CONFIG -= debug
BINARY_SUBDIR = release
DEFINES += LIBXML_STATIC LIBXSLT_STATIC
DEFINES += LIBEXSLT_STATIC XMLSEC_STATIC
DEFINES += WIN32_LEAN_AND_MEAN
INCLUDEPATH += "../.."
INCLUDEPATH += $$(TOOLCHAIN_PREFIX)/include $$(TOOLCHAIN_PREFIX)/include/libxml2 $$(TOOLCHAIN_PREFIX)/include/net-snmp /include
LIBS += -L$$(TOOLCHAIN_PREFIX)/lib -L$$(TOOLCHAIN_PREFIX)/bin
# LIBS += -l xslt -l xml2 -l iconv -l pthread -l ws2_32
#LIBS += -l xslt -l xml2 -l iconv -l pthread -l netsnmp -l ws2_32
LIBS += -lxslt -lxml2 -liconv -lpthread -lz -lws2_32
# workaround for QT += dbus not working atm
# Standard QT binary Windows distribution does not include QtDBus library
# Checked with 4.4.1 and 4.4.3 06/12/2009
# LIBS += -lQtDBus
target.path = $$PREFIX/bin
# on windows we use antlr DLL
HAVE_ANTLR_RUNTIME = 1
HAVE_EXTERNAL_ANTLR = 0
antlr.path = $$PREFIX/lib
# Qt on windows does not have DBus framework support, turn parts of .pro files off
# HAVE_QTDBUS =
ANTLR_INCLUDEPATH = ..
ANTLR_LIBS = ../antlr/release/libantlr.a
# our parsers are linked as a library (code is in src/parsers)
FWBPARSER_LIB = ../parsers/release/libfwbparser.a
# fwtransfer library for secuwall (and possibly other os/platform)
# override the name for windows
# FWTRANSFER_LIB = ../fwtransfer/release/libfwtransfer.a
}
macx {
# PREFIX = "$$DESTDIR"
DOCDIR = "$$PREFIX/doc/"
MANDIR = "$$PREFIX/share/man"
# These do not really matter because we never run make install on Mac OS X
target.path = $$PREFIX/
res.path = $$PREFIX/resources/
res_os.path = $$res.path/os
res_platform.path = $$res.path/platform
res_help_C.path = $$res.path/help/C
res_help_en_US.path = $$res.path/help/en_US
res_configlets.path = $$res.path/configlets
icns.files = fwbuilder.icns
icns.path = $$PREFIX/
PKGLOCALEDIR = $$res.path/locale
# If I build on 10.6 without these, generated binary depends on
# /usr/lib/libxml2.2.dynlib that has compatibility version 10.0.0
# which does not work on 10.5 where its compatibility version is
# 9.0.0. Chances are, the same thing may be happening with other
# dependency libraries. Building on 10.6 with deployment target 10.5
# should solve the problem
QMAKE_MACOSX_DEPLOYMENT_TARGET = $$(QMAKE_MACOSX_DEPLOYMENT_TARGET)
QMAKE_CXXFLAGS += -mmacosx-version-min=$$(QMAKE_MACOSX_DEPLOYMENT_TARGET)
QMAKE_MAC_SDK = $$(QMAKE_MAC_SDK)
CONFIG += qt thread rtti stl warn_on debug # release
# not compiling for PPC because of problems on Snow Leopard
CONFIG -= x86
CONFIG += x86_64
# See http://trolltech.com/developer/task-tracker/index_html?method=entry&id=211852
# for why ppc architecture is commented out.
# If Trolltech does not fix it by the time of release v3.0, will have
# to figure out workaround (turn off precompiled headers ?)
# CONFIG += ppc
INCLUDEPATH += $(INSTALL_ROOT)/$$PREFIX/include/
INCLUDEPATH += /usr/include/libxml2 /usr/include
QMAKE_LIBS_QT =
QMAKE_LIBS_QT_THREAD =
# LIBS += $$LIBS_FWBUILDER
LIBS += -lxml2 -lz
LIBS += -lpthread
}
FWB_SIG = $$(FWB_SIG)
if (isEmpty(FWB_SIG)) { FWB_SIG=26932 }
DEFINES += FWB_SIG=$$FWB_SIG
QMAKE_CXXFLAGS_DEBUG += -D__STDC_FORMAT_MACROS
QMAKE_CXXFLAGS_RELEASE += -D__STDC_FORMAT_MACROS
exists(qmake2.inc) {
include(qmake2.inc)
}
INSTALLS += target