From 3e894743acec0ecbde7bcd20d4a2af5044ad1ff5 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 11 Apr 2007 16:32:01 +0200 Subject: [PATCH] minor changes in the build system to make it qmake compatible also add a "configure.w32" for easy cross-compiling --- INSTALL.w32 | 9 ++++----- Makefile | 2 +- Rules.mak | 2 +- configure.w32 | 27 +++++++++++++++++++++++++++ doc/Makefile | 5 +---- doc/{xca.man => xca.1} | 0 misc/Local.mak.w32 | 13 ++++++++----- 7 files changed, 42 insertions(+), 16 deletions(-) create mode 100755 configure.w32 rename doc/{xca.man => xca.1} (100%) diff --git a/INSTALL.w32 b/INSTALL.w32 index b5e0e412..afbee987 100644 --- a/INSTALL.w32 +++ b/INSTALL.w32 @@ -15,6 +15,7 @@ unpack xca there Use a W32 host to execute and install the selfextracting QT4....exe copy the installed tree to xca-w32/qt/ + $ cp openssl-0.9.8X.tar.gz xca-w32/ $ tar zxf openssl-0.9.8X.tar.gz @@ -26,11 +27,9 @@ compile openssl with: $ sh ms/mingw32-cross.sh compile xca: -$ cd xca -$ cp misc/Local.mak.w32 Local.mak -Edit Local.mak: - set BDIR to /FULLPATH/xca-w32 - set OPENSSLDIR and QTDIR +$ cd xca-0.6.X +$ ./configure.w32 +Edit Local.mak if needed: if your linux-qt is the same version as the w32 one, keep USE_HOSTTOOLS at "yes" otherwise set it to "no" and say make diff --git a/Makefile b/Makefile index da2542b1..cbe24274 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ TAG=RELEASE.$(TVERSION) TARGET=xca-$(TVERSION) -VERSION=$(shell cat $(TOPDIR)/VERSION ) +export VERSION=$(shell cat $(TOPDIR)/VERSION ) export TOPDIR=$(shell pwd) sinclude Local.mak diff --git a/Rules.mak b/Rules.mak index 7198b3f2..d3098779 100644 --- a/Rules.mak +++ b/Rules.mak @@ -3,7 +3,7 @@ include $(TOPDIR)/Local.mak all: target.obj SRCS=$(patsubst %.o, %.cpp, $(OBJS)) -HEADERS=$(shell ls *.h) +HEADERS=$(shell ls *.h 2>/dev/null) GCH=$(patsubst %, %.gch, $(HEADERS)) pheaders: $(GCH) diff --git a/configure.w32 b/configure.w32 new file mode 100755 index 00000000..1eaed7d2 --- /dev/null +++ b/configure.w32 @@ -0,0 +1,27 @@ +#!/bin/sh -e + +BDIR=`cd ..; pwd` + +SSL=`find "$BDIR" -type d -name openssl-* |tail -n1` +QT=`find "$BDIR"/qt -type d -name 4.* |tail -n1` + +echo "OpenSSL: '$SSL'" +echo "QT: '$QT'" +if test -z "$SSL" -o -z "$QT"; then + cat << EOF +OpenSSL or QT not found: +please look at INSTALL.w32 +EOF +fi + +cat > Local.mak << EOF +BDIR=$BDIR +OPENSSLDIR=$SSL +QTDIR=$QT +EOF + +cat misc/Local.mak.w32 >> Local.mak +echo "#define VER \"`cat VERSION`\"" >local.h + +echo +echo success, type 'make' diff --git a/doc/Makefile b/doc/Makefile index 3670285c..dc6a5b7d 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -9,11 +9,8 @@ doc: xca.1.gz xca.html xca.1.gz: xca.1 gzip -9 <$^ >$@ -xca.1: xca.man - cat $^ | sed s/MY_VERSION/$(VERSION)/g > $@ - xca.html: xca.sgml - $(LINUXDOC) -B html $< || touch xca.html + $(LINUXDOC) -B html $< install: xca.1.gz xca.html install -m 755 -d $(destdir)$(prefix)/share/xca \ diff --git a/doc/xca.man b/doc/xca.1 similarity index 100% rename from doc/xca.man rename to doc/xca.1 diff --git a/misc/Local.mak.w32 b/misc/Local.mak.w32 index 6969fdf4..0080ad2a 100644 --- a/misc/Local.mak.w32 +++ b/misc/Local.mak.w32 @@ -1,15 +1,18 @@ -HOST=w32 -BDIR=/D +#### Change the following settings +# BDIR=/D +# QTDIR=$(BDIR)/qt/4.2.1 +# OPENSSLDIR=$(BDIR)/openssl-0.9.8d -QTDIR=$(BDIR)/qt/4.2.1 -OPENSSLDIR=$(BDIR)/openssl-0.9.8d + +HOST=w32 MAKENSIS=makensis CROSS=i586-mingw32msvc- CONSOLE=-mwindows #CONSOLE=-mconsole -CPPFLAGS=-I. -I.. -I$(QTDIR)/include -I$(OPENSSLDIR)/outinc +CPPFLAGS=-I. -I.. -I$(QTDIR)/include -I$(OPENSSLDIR)/outinc \ + -I$(QTDIR)/include/Qt -I$(TOPDIR)/ui CFLAGS=-Wall -g -O2 -mthreads -mno-cygwin $(CONSOLE) LDFLAGS= -L$(OPENSSLDIR)/out -L$(QTDIR)/lib \