From: Charles McGarvey Date: Tue, 10 Nov 2009 22:01:20 +0000 (-0700) Subject: minor build system changes X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=592c83141aef55c6e3a17c516e2f09441f29c267;p=chaz%2Fyoink minor build system changes --- diff --git a/AUTHORS b/AUTHORS index aa78b3c..c3be7bc 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1 @@ -Charles McGarvey +Charles McGarvey diff --git a/configure.ac b/configure.ac index a9018e1..997a7f2 100644 --- a/configure.ac +++ b/configure.ac @@ -68,16 +68,16 @@ AM_CONDITIONAL([WIN32], test "$WIN32" = "yes") # Checks for configuration arguments. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -AC_ARG_ENABLE([developer], - [ --enable-developer use all compiler flags developers need], - [developer=$enableval], - [developer=no]) - AC_ARG_ENABLE([debug], [ --enable-debug include debugging symbols and features], [debug=$enableval], [debug=no]) +AC_ARG_ENABLE([double-precision], + [ --enable-double-precision use double-precision numbers], + [double_precision=$enableval], + [double_precision=no]) + AC_ARG_ENABLE([profile], [ --enable-profile make a binary for use with gprof profiler], [profile=$enableval], @@ -88,37 +88,31 @@ AC_ARG_ENABLE([extra-warnings], [extra_warnings=$enableval], [extra_warnings=no]) +AC_ARG_ENABLE([threads], + [ --enable-threads use threads for some parallel tasks], + [threads=$enableval], + [threads=no]) + AC_ARG_WITH([log-level], [AS_HELP_STRING([--with-log-level=NUM], [0, none... 1, errors... 4, everything (default: 3)])], [log_level=$withval], [log_level=3]) -AC_ARG_ENABLE([double], - [ --enable-double use double-precision numbers], - [double=$enableval], - [double=no]) - -if test x$developer = xyes +if test x$debug = xyes then - debug=yes - log_level=4 - - if test x$WIN32 != xyes - then -# i haven't had much success with gprof profiling on win32 - profile=yes - fi + CFLAGS="$CFLAGS -Wall -g -DDEBUG" + CXXFLAGS="$CXXFLAGS -Wall -g -DDEBUG" +else + CFLAGS="$CFLAGS -DNDEBUG" + CXXFLAGS="$CXXFLAGS -DNDEBUG" fi -if test x$debug = xyes +if test x$double_precision = xyes then - CFLAGS="$CFLAGS -Wall -O0 -DDEBUG" - CXXFLAGS="$CXXFLAGS -Wall -O0 -DDEBUG" -else - CFLAGS="$CFLAGS -O2 -DNDEBUG" - CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG" + AC_DEFINE([USE_DOUBLE_PRECISION], 1, + [Define to 1 if you want to use doubles instead of floats.]) fi if test x$profile = xyes @@ -135,13 +129,12 @@ then CXXFLAGS="$CXXFLAGS -Wextra -Wno-unused-parameter" fi -if test x$double = xyes +if test x$threads = xyes then - AC_DEFINE([USE_DOUBLE_PRECISION], 1, - [Define to 1 if you want to use double-precison numbers.]) + AC_DEFINE([USE_THREADS], 1, + [Define to 1 if you want to use threads for parallel tasks.]) fi - AC_DEFINE_UNQUOTED([YOINK_LOGLEVEL], [$log_level], [Define to detail level of logging.]) @@ -151,15 +144,11 @@ then prefix="$ac_default_prefix" fi -AC_ARG_WITH([assetdir], - [AS_HELP_STRING([--with-assetdir=DIR], - [real path to assets (default: $datarootdir/yoink)])], - [DATADIR="$withval"], - [eval DATADIR="$datarootdir/yoink"]) - if test x$WIN32 = xyes then DATADIR="data" +else + eval eval DATADIR="${datadir}/yoink" fi AC_SUBST([DATADIR]) @@ -340,13 +329,14 @@ AC_OUTPUT echo "" echo " Configuration complete! :-)" echo "" -echo " Target: $target" -echo " Prefix: $prefix" -echo " Data Directory: $DATADIR" -echo " Log Level: $log_level" -echo " Debug: $debug" -echo " Profile: $profile" -echo " Extra Warnings: $extra_warnings" +echo " Target: $target" +echo " Prefix: $prefix" +echo " Data Directory: $DATADIR" +echo " Log Level: $log_level" +echo " Debug: $debug" +echo " Double Precision: $double_precision" +echo " Profile: $profile" +echo " Extra Warnings: $extra_warnings" echo "" echo " To finish the installation, execute:" echo " make" diff --git a/data/COPYING b/data/COPYING deleted file mode 100644 index c5ffc69..0000000 --- a/data/COPYING +++ /dev/null @@ -1,21 +0,0 @@ -The zlib/libpng License - -Copyright (c) 2003 Neil Carter - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from -the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software in a -product, an acknowledgment in the product documentation would be -appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. diff --git a/data/sounds/COPYING b/data/sounds/COPYING deleted file mode 100644 index 462fe3c..0000000 --- a/data/sounds/COPYING +++ /dev/null @@ -1,32 +0,0 @@ - -Night Fusion -http://8bitcollective.com/members/FearofDark/ - -Copyright Stephen H. Johnston -Licensed under the Creative Commons BY-NC-SA License -http://creativecommons.org/licenses/by-nc-sa/2.5/ - ---------------------------------------------------------------------------- - -The zlib/libpng License - -Copyright (c) 2003 Neil Carter - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from -the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software in a -product, an acknowledgment in the product documentation would be -appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. - diff --git a/data/textures/COPYING b/data/textures/COPYING deleted file mode 100644 index c5ffc69..0000000 --- a/data/textures/COPYING +++ /dev/null @@ -1,21 +0,0 @@ -The zlib/libpng License - -Copyright (c) 2003 Neil Carter - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from -the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software in a -product, an acknowledgment in the product documentation would be -appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. diff --git a/extra/yoink.ebuild b/extra/yoink.ebuild index bad9149..2bd8d27 100644 --- a/extra/yoink.ebuild +++ b/extra/yoink.ebuild @@ -14,7 +14,7 @@ SRC_URI="http://www.dogcows.com/yoink/${P}.tar.bz2 LICENSE="BSD-2 BSD LGPL-2.1 ZLIB" SLOT="0" KEYWORDS="amd64 ~ppc x86" -IUSE="debug profile" +IUSE="debug double-precision profile threads" RDEPEND="dev-lang/lua media-libs/freealut @@ -44,14 +44,15 @@ src_prepare() { src_configure() { egamesconf \ --disable-dependency-tracking \ - --with-assetdir="${GAMES_DATADIR}/${PN}" \ $(use_enable debug) \ - $(use_enable profile) + $(use_enable double-precision) \ + $(use_enable profile) \ + $(use_enable threads) } src_install() { emake DESTDIR="${D}" install || die "emake install failed" - dodoc AUTHORS ChangeLog README TODO + dodoc AUTHORS ChangeLog COPYING README TODO doman doc/yoink.6 doicon data/yoink.png make_desktop_entry ${PN} Yoink diff --git a/extra/yoink.spec.in b/extra/yoink.spec.in index f59f9d6..8d10855 100644 --- a/extra/yoink.spec.in +++ b/extra/yoink.spec.in @@ -43,7 +43,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_bindir}/yoink %doc %{_mandir}/man6/* -%doc COPYING AUTHORS README NEWS +%doc AUTHORS ChangeLog COPYING README TODO %{_datadir}/yoink %{_datadir}/applications/* %{_datadir}/pixmaps/* diff --git a/make-win32-installer.sh.in b/make-win32-installer.sh.in index 4bfc6b3..2f251c2 100644 --- a/make-win32-installer.sh.in +++ b/make-win32-installer.sh.in @@ -88,8 +88,8 @@ RequestExecutionLevel highest ;; Modern UI Configuration ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -!define MUI_ICON "$ROOT_DIR/src/yoink_setup.ico" -!define MUI_UNICON "$ROOT_DIR/src/yoink_uninstall.ico" +!define MUI_ICON "$ROOT_DIR/src/setup.ico" +!define MUI_UNICON "$ROOT_DIR/src/uninstall.ico" ; Language !define MUI_LANGDLL_ALWAYSSHOW !define MUI_LANGDLL_REGISTRY_ROOT "HKCU" @@ -263,6 +263,9 @@ Section "$SEC_INSTALL" SecInstallYoink File "$ROOT_DIR/src/yoink.exe" ; data File /r /x Makefile* /x *.desktop "$ROOT_DIR/data" + ; documentation + File "$ROOT_DIR/AUTHORS" "$ROOT_DIR/ChangeLog" "$ROOT_DIR/COPYING" + File "$ROOT_DIR/README" "$ROOT_DIR/TODO" ; uninstall WriteUninstaller "uninstall.exe" EOF diff --git a/src/MainLayer.cc b/src/MainLayer.cc index 4975e17..c5a9386 100644 --- a/src/MainLayer.cc +++ b/src/MainLayer.cc @@ -205,11 +205,15 @@ void printInfo() #ifndef USE_DOUBLE_PRECISION << "-" #endif - << "double " + << "double-precision " #ifndef PROFILING_ENABLED << "-" #endif << "profile " +#ifndef USE_THREADS + << "-" +#endif + << "threads " << std::endl; #if !defined (_WIN32) && !defined(__WIN32__) system("uname -a"); diff --git a/src/setup.ico b/src/setup.ico new file mode 100644 index 0000000..f928e6f Binary files /dev/null and b/src/setup.ico differ diff --git a/src/uninstall.ico b/src/uninstall.ico new file mode 100644 index 0000000..f278dc4 Binary files /dev/null and b/src/uninstall.ico differ