From dfd6854b348442632c11535a38e1609f0d0acf15 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Sun, 3 Mar 2013 22:26:04 +0100 Subject: [PATCH] redirect builds to bin directory --- Makefile | 40 +++++++++++++++++++++++++--------------- elam | 2 +- pack | 2 +- src/msmoke.sh | 19 +------------------ src/smoke.pro | 9 ++++++--- twig | 2 +- tzone | 2 +- zip/zip.pro | 1 - 8 files changed, 36 insertions(+), 41 deletions(-) diff --git a/Makefile b/Makefile index a9eff52..e750ddf 100644 --- a/Makefile +++ b/Makefile @@ -31,10 +31,6 @@ DOXYGEN = doxygen # packages first PREFIX = /usr/local -#the make utility to use -# normally you do not need to change this, the macosx target changes it on its own -MYMAKE = $(MAKE) - #this builds the installation package on win32 NSIS = makensis @@ -55,6 +51,8 @@ QTDIR=$(shell $(QMAKE) -query QT_INSTALL_PREFIX) QTBIN=$(shell $(QMAKE) -query QT_INSTALL_BINS) QTTRANS=$(shell $(QMAKE) -query QT_INSTALL_TRANSLATIONS) +QMCFG = DESTDIR=$(CURDIR)/bin CONFIG+=separate_debug_info + none: @echo "Usage: $(MAKE) target" @echo " " @@ -81,6 +79,8 @@ none: @echo " nsis - generate NSIS package (Win32)" @echo " dpkg - generate Debian packages" @echo " tgz - generate generic tar.gz packages (Unix/Linux)" + @echo " spack - generate signed self-extracting package" + @echo " for user installation and update" @echo "Cleanup:" @echo " clean - clean up intermediate files (Unix/Mac)" @echo " distclean - clean up built files (Unix/Mac)" @@ -91,28 +91,29 @@ wob: woc cd wob && $(abspath pack/woc/woc) magicsmoke.wolf woc: - cd pack && $(MYMAKE) + cd pack && $(MAKE) wbase: woc + cp -a pack/qtbase/lib* bin elam: - cd elam/src && $(QMAKE) $(QMAKEFLAGS) && $(MYMAKE) + cd elam/src && $(QMAKE) $(QMCFG) $(QMAKEFLAGS) && $(MAKE) server: wob client: wob zip tzone elam - cd src && $(QMAKE) $(QMAKEFLAGS) && $(MYMAKE) + cd src && $(QMAKE) $(QMAKEFLAGS) && $(MAKE) zip: - cd zip && $(QMAKE) $(QMAKEFLAGS) && $(MYMAKE) + cd zip && $(QMAKE) $(QMCFG) $(QMAKEFLAGS) && $(MAKE) tzone: - cd tzone && $(QMAKE) $(QMAKEFLAGS) && $(MYMAKE) + cd tzone && $(QMAKE) $(QMCFG) $(QMAKEFLAGS) && $(MAKE) sdoc: $(DOXYGEN) Doxyfile-php $(DOXYGEN) Doxyfile-cpp - $(MYMAKE) -C pack doc + $(MAKE) -C pack doc cd tzone && $(DOXYGEN) Doxyfile cd elam/src && $(DOXYGEN) Doxyfile cd dptr && $(DOXYGEN) Doxyfile @@ -159,6 +160,7 @@ clean: -rm -rf `find . -name '*~'` -rm -rf `find . -name '*.bak'` -rm -rf `find . -name 'core*'` + -rm -rf bin distclean: clean @@ -167,7 +169,7 @@ debug: client server ##installation packages -macosx: MYMAKE=xcodebuild +macosx: MAKE=xcodebuild macosx: client server lrelease cd src ; cp *.qm msmoke.app/Contents/MacOS cd src ; for i in *.qm ; do cp -f $(QTTRANS)/qt$${i#smoke} msmoke.app/Contents/MacOS || true ; done @@ -183,15 +185,15 @@ nsis: script client dpkg: fakeroot debian/rules binary -tgz-clean: +spack-clean tgz-clean: -rm -rf dist-srv dist-cli dist-doc tgz-server: PREFIX=dist-srv tgz-server: install-server cd dist-srv ; tar c . |gzip > ../magicsmoke2-server.tar.gz -tgz-client: PREFIX=dist-cli -tgz-client: install-client +install-libs: + mkdir -p dist-cli/lib cp -a $(QTDIR)/lib/libQtScript.s* dist-cli/lib/magicsmoke2 cp -a $(QTDIR)/lib/libQtScriptTools.s* dist-cli/lib/magicsmoke2 cp -a $(QTDIR)/lib/libQtCore.s* dist-cli/lib/magicsmoke2 @@ -202,6 +204,9 @@ tgz-client: install-client cp -a zip/libQtZipHelper.s* dist-cli/lib/magicsmoke2 cp -a elam/libelam.s* dist-cli/lib/magicsmoke2 cp -a pack/qtbase/libqwbase.s* dist-cli/lib/magicsmoke2 + +tgz-client: PREFIX=dist-cli +tgz-client: install-client install-libs cd dist-cli ; tar c . |gzip >../magicsmoke2-client.tar.gz tgz-doc: PREFIX=dist-srv @@ -209,7 +214,12 @@ tgz-doc: install-doc cd dist-doc ; tar c . |gzip >../magicsmoke2-doc.tar.gz tgz: tgz-clean tgz-server tgz-client tgz-doc - + +spack: PREFIX=dist-cli +spack: tgz-clean install-client install-libs + -rm magicsmoke-installer magicsmoke-installer.exe + cd dist-cli && 7z a -sfx ../magicsmoke-installer + #tell Make that the rules above are symbolic: .PHONY: script woc wob server client sdoc zip wbase clean distclean tzone elam debug macosx diff --git a/elam b/elam index a49453f..b4ad96a 160000 --- a/elam +++ b/elam @@ -1 +1 @@ -Subproject commit a49453f1414ea094eb5fbd67865659b7d1a65c04 +Subproject commit b4ad96ad2a22c962aade498f1a5042f04c61121b diff --git a/pack b/pack index 6925562..01e3256 160000 --- a/pack +++ b/pack @@ -1 +1 @@ -Subproject commit 692556212a82a27a2563852923b89b83faebbb3d +Subproject commit 01e32564337c5a177110bef33032b5b498375eda diff --git a/src/msmoke.sh b/src/msmoke.sh index 4c987bc..9cd119d 100755 --- a/src/msmoke.sh +++ b/src/msmoke.sh @@ -1,20 +1,3 @@ #!/bin/bash -#helper script that makes sure the correct libs are included - -echo "MagicSmoke development wrapper at work..." - -#detect Qt -#test "x$QTDIR" == x && { -# which qmake >/dev/null && QTLIB=`qmake -query QT_INSTALL_LIBS` || QTLIB=/usr/local/Trolltech/Qt/lib -#} || { -# QTLIB=$QTDIR/lib -#} -#echo "Using Qt from $QTLIB" - -#export path... -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}../elam:../zip:../tzone:../pack/qtbase - -echo "Lib path: $LD_LIBRARY_PATH" - -exec ./msmoke "$@" +exec `dirname $0`/../bin/magicsmoke "$@" diff --git a/src/smoke.pro b/src/smoke.pro index 1b479d6..5607d58 100644 --- a/src/smoke.pro +++ b/src/smoke.pro @@ -2,7 +2,8 @@ # (c) Konrad Rosenbaum, 2007-2011 TEMPLATE = app -TARGET = ../src/msmoke +TARGET = magicsmoke +DESTDIR = $$PWD/../bin #build for debug or release? #CONFIG += release @@ -15,7 +16,7 @@ TRANSLATIONS = \ smoke_en.ts #make sure the correct Qt DLLs are used -CONFIG += qt thread link_prl +CONFIG += qt thread link_prl separate_debug_info QT += xml network script scripttools QT += widgets printsupport @@ -26,7 +27,6 @@ win32-* { } #compilation output: -DESTDIR = ../src OBJECTS_DIR = .ctmp MOC_DIR = .ctmp RCC_DIR = .ctmp @@ -56,6 +56,7 @@ include(wob/wob.pri) #make sure dependencies are found DEPENDPATH += $$INCLUDEPATH +LIBS += -L$$PWD/../bin #security features linux-g++* { @@ -63,6 +64,8 @@ linux-g++* { QMAKE_CFLAGS += -fPIE QMAKE_CXXFLAGS += -fPIE QMAKE_LFLAGS += -pie + #make sure we find our libs + QMAKE_LFLAGS += -Wl,-rpath,\'\$$ORIGIN\' } #activate C++11 for g++ diff --git a/twig b/twig index 31f0592..a56f740 160000 --- a/twig +++ b/twig @@ -1 +1 @@ -Subproject commit 31f05925258063a363178691be6988bde78ab5fb +Subproject commit a56f7405be86b900405d09b00fac2d73b6bdf85f diff --git a/tzone b/tzone index 460de61..887a690 160000 --- a/tzone +++ b/tzone @@ -1 +1 @@ -Subproject commit 460de61d1f264f4559cc298e58bc853b6097febe +Subproject commit 887a6906f5b8cc735a50aaaaf1e667994d4f499f diff --git a/zip/zip.pro b/zip/zip.pro index 926f1e5..68d4e63 100644 --- a/zip/zip.pro +++ b/zip/zip.pro @@ -29,7 +29,6 @@ TEMPLATE = lib TARGET = QtZipHelper -DESTDIR = src/.. CONFIG += dll create_prl OBJECTS_DIR = .ctmp MOC_DIR = .ctmp -- 1.7.2.5