forked from chris2511/xca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.w32
executable file
·101 lines (82 loc) · 2.27 KB
/
configure.w32
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
#!/bin/sh -e
BDIR=`cd ..; pwd`
TOPDIR="`cd $(dirname $0) && pwd`"
read VERSION < ${TOPDIR}/VERSION
QT="$BDIR"/qt/`ls "$BDIR"/qt/ |tail -n1`
LIBS="libcrypto.a libltdl.a"
INCS="openssl/opensslv.h ltdl.h"
for l in $LIBS; do
if test -f "$INSTALL_DIR/lib/$l"; then
echo found "$INSTALL_DIR/lib/$l"
else
echo NOT found "$INSTALL_DIR/lib/$l"
fi
done
for i in $INCS; do
if test -f "$INSTALL_DIR/include/$i"; then
echo found "$INSTALL_DIR/include/$i"
else
echo NOT found "$INSTALL_DIR/include/$i"
fi
done
echo "QT: '$QT'"
if test -z "$QT"; then
cat << EOF
OpenSSL or QT not found:
please look at INSTALL.w32
EOF
fi
if test -x "`which osslsigncode`" && test -f "${HOME}/Christian_Hohnstaedt.p12"; then
OSSLSIGN=osslsigncode
fi
cat > Local.mak << EOF
export TOPDIR=$TOPDIR
export VERSION=$VERSION
export HOST=w32
BDIR=$BDIR
QTDIR=$QT
INSTALL_DIR=$INSTALL_DIR
MAKENSIS=makensis
CROSS=$CROSS
CONSOLE=-mwindows
#CONSOLE=-mconsole
CPPFLAGS=-I\$(TOPDIR) -I\$(QTDIR)/include/QtGui -I\$(QTDIR)/include/QtCore -I\$(QTDIR)/include/QtWidgets -I\$(QTDIR)/include/QtSql -I\$(QTDIR)/include -I\$(INSTALL_DIR)/include -I\$(BUILD) -I\$(BUILD)/ui
CFLAGS=-Wall -g -O2 -mthreads \$(CONSOLE) -mnop-fun-dllimport -Wno-strict-aliasing -std=c++11
LDFLAGS= -L\$(QTDIR)/lib -L\$(INSTALL_DIR)/lib \
-Wl,-enable-stdcall-fixup -Wl,-enable-auto-import \
-Wl,-enable-runtime-pseudo-reloc \
-static-libgcc -static-libstdc++
# list of dynamic libraries
LIBS=-lQt5Gui -lQt5Core -lQt5Widgets -lQt5Sql -lcrypto -lltdl
# As long as the linux uic and moc are version compatible to the W32 ones
# we use the native tools, because they are much faster than the wine's
USE_HOSTTOOLS=yes
ifneq (\$(USE_HOSTTOOLS), yes)
MOC=wine \$(QTDIR)/bin/moc
UIC=wine \$(QTDIR)/bin/uic
RCC=wine \$(QTDIR)/bin/rcc
LRELEASE=wine \$(QTDIR)/bin/lrelease
LCONVERT=wine \$(QTDIR)/bin/lconvert
else
MOC=moc
UIC=uic
RCC=rcc
LRELEASE=lrelease
LCONVERT=lconvert
endif
CC=\$(CROSS)g++
LD=\$(CROSS)ld
STRIP=\$(CROSS)strip
WINDRES=\$(CROSS)windres
SUFFIX=.exe
DOCTOOL=linuxdoc -B html
OSSLSIGN=$OSSLSIGN
prefix=
basedir=
EOF
cat > local.h <<EOF
#define PACKAGE_VERSION "${VERSION}"
#define PACKAGE_TARNAME "xca"
#define PACKAGE_NAME "X Certificate and Key management"
EOF
test -f Makefile || ln -s ${TOPDIR}/Makefile