summaryrefslogtreecommitdiff
path: root/rbutil/libtools.make (follow)
Commit message (Collapse)AuthorAge
* Fix linking with C++ files.Dominik Riebeling2016-12-16
| | | | | | | | | | | | When linking with C++ files the linker also needs to link against the C++ libraries. This is done automatically when invoking the compiler upon linking. Since we don't want C++ dependencies on C-only projects we check if we actually have C++ files and use either the C or C++ compiler. Rename CFLAGS since it's now used for both C and C++ compiler and add dedicated CFLAGS, CXXFLAGS and LDFLAGS variables. Change-Id: I9cc068a8038f21e8fd96b20173a8f790e6ab4b6e
* Support C++ in libtools.make and rewrite dependency handling.Dominik Riebeling2016-12-16
| | | | | | | | | | | | | | - Change suffix of objects and depencency files to keep the original file suffix. This makes it easy to distinguish between C and C++ files when building and avoids implicit make rules trying to build in a way we don't want to. - Implicitly handle dependencies instead of having an explicit rule. Simplifies things a bit. - Support C++ files by adding an explicit rule for them. With keeping the original file suffixes this becomes quite simple. To use C++ files simply add them to SOURCES (or LIBSOURCES). Change-Id: I22c56a6e153e281cfa675e91ad4a70fd18e2c43c
* Don't add LIBSOURCES to SOURCES.Dominik Riebeling2016-12-16
| | | | | | | | | | | Split source files for library and stand-alone binary and use library as dependency when building the stand-alone binary. This avoids dependencies getting added multiple times. Remove outdated RBARCH handling, we always create fat binaries on OS X these days. Change-Id: Ia15a731296edcbe90869a1bf66dda2c3d6c7e317
* OS X: detect clang and build for x86 target only.Dominik Riebeling2014-03-20
| | | | | | | | Newer versions of Xcode / OS X don't support PPC code anymore and replace gcc with clang. When clang is detected assume we want to build for the default architecture only and change the minimum OS X version to 10.5. Change-Id: I5843fa9bb3d957ec6f0a537e857608ad99c31517
* Fix rm function on Windows once more.Dominik Riebeling2014-01-05
| | | | | | | Windows del doesn't handle a non-existing folder gracefully, so check for existence first. Change-Id: I9c401f3f3a3e1e01b80d29e335256fbf3db22d35
* Fix rm function on Windows.Dominik Riebeling2014-01-05
| | | | | | | Windows del doesn't handle paths with / as separators, need to convert them first. Change-Id: Idb3efa96167aec5666517feabab67385ebd2db1a
* Fix rebuilding of libs on OS X.Dominik Riebeling2014-01-05
| | | | | | | | OS X ar operates on fat libaries. In this case updating the library isn't possible and when those change ar will only return an error. Remove the output file prior to running ar to work around this limitation. Change-Id: I7ebc66efd092a8e6037ae86a3658afe6b4da777f
* Move LDOPTS to the end of the linker call.Dominik Riebeling2013-11-12
| | | | | | | | Command line order is important with newer gcc versions. mkzenboot extends LDOPTS but the linker would ignore that since no object using it has been mentioned on the command line. Moving it to the end should fix this. Change-Id: I081e86fa88f95dba6077a50f2b4315bf3a805ae5
* Treat arch flags separately when building libraries.Dominik Riebeling2013-06-09
| | | | | | | | On OS X we're passing -arch twice which dependency generation doesn't like. Since we don't have dependencies that differ between architectures simply don't add them during dependency generation. Change-Id: Ie3d58bf9af31edcacb88345c7debf39eb798e302
* Implement dependency generation in libtools.make.Dominik Riebeling2013-05-11
| | | | | | | | | Automatically generate dependency files for all sources so changes in headers are picked up automatically. Use one dependency file for each source file, since that allows to create them without using external tools (except the compiler of course). Change-Id: I246c1ceb525692547af22a2e32c4bab0c11507e1
* Change mkdir -p to work on Windows.Dominik Riebeling2013-05-11
| | | | | | | | Windows mkdir doesn't know about the -p option and requires paths to use \ as path separator. Try to detect when building on Windows and use the Windows internal function instead of relying on a compatible mkdir in the path. Change-Id: I47d47d45edeb38c672321f77d6e91268bf744dba
* Make libtools compile rule more generic.Dominik Riebeling2013-05-11
| | | | | | | | | | Create the object - source dependency internally and use a more generic rule for compiling. Removes the need for explicit rules for source files located in a different folder. This adds the limitation for SOURCES and LIBSOURCES to only hold C files. Change-Id: I56f6a4b1e7df36347cd2f54051e072251f456092
* Set APPVERSION globally for extralibs Makefile.Dominik Riebeling2013-05-10
| | | | | | | Make sure its value quotes are properly escaped. Otherwise make on Windows causes problems. Also, expand CPPDEFINES only once. Change-Id: I52e91f17626b2596f389811b22abc12d94f721d1
* Allow overriding make variables via environment variables.Dominik Riebeling2013-05-04
| | | | | | Fixes cross compiling for Rockbox Utility. Change-Id: I3419cb4c89836ec3bee10072495042b3732fd66b
* Fix ipodpatcher on OS X.Dominik Riebeling2013-04-05
| | | | | | Fix a typo and update CC handling for OS X. Change-Id: Icde3cb5956ffe45ee1d610ff34957ed7b17f3f02
* Replace the use of uname to get the build output.Dominik Riebeling2013-04-05
| | | | | | | | | | Using uname has a couple of problems, especially when cross compiling. Instead check the defines set by the preprocessor to figure the type of binaries it produces. This improves support for cross compiling as it allows to (1) select the correct default target and (2) makes it possible to use separate build folders for different targets. Change-Id: I69a32904dab97755034f2f0d63f8402309d479d2
* Fix version handling for patchers.Dominik Riebeling2013-01-01
| | | | | | | | The working directory will usually be different than the one libtools.make is located in, so make sure to use the correct starting folder for the relative path. Change-Id: I9a84a0573c9f1f32601f31587425689dcf8fb81f
* Add quotes around APPVERSION to avoid issues when it has spaces.Frank Gevaerts2012-07-27
| | | | Change-Id: If281c0e37f56f81cb5dd57e264f82fb32bc08d3b
* Move bin2c handling to libtools.makeDominik Riebeling2012-04-28
| | | | Change-Id: I60353bb9f9fd2658d66ba7f352e04f7489c7bf5d
* Make sure we use POSIX/C99 printf() when building for windowsRafaël Carré2012-02-05
| | | | | | Change-Id: I429ed40dc2b9d4fb238762113bd40936df896df0 Reviewed-on: http://gerrit.rockbox.org/85 Reviewed-by: Dominik Riebeling <Dominik.Riebeling@gmail.com>
* Remove OS X special universal binary handling.Dominik Riebeling2012-01-06
| | | | | | | | | Since the libs are now build as universal libs there is no need anymore to create separate binaries for both architectures and run lipo on them, just build in a single run now. Fixes building universal binaries and dmg for all tools using libtools.make. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31590 a1c6a512-1295-4272-9138-f99709370657
* Update OS X library building.Dominik Riebeling2012-01-05
| | | | | | | | | | | - As done with libucl and librbspeex, create universal libraries using ar instead of building twice and using lipo. This notably simplifies things. - Allow overwriting the compiler via command line. This is required for building on OS X. - Update Rockbox Utility to the changed library rules. Fixes building which was broken by the previous Makefile changes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31588 a1c6a512-1295-4272-9138-f99709370657
* Fix cross compiling on OS X.Dominik Riebeling2012-01-02
| | | | | | | | | - The OS X specific flags must not be set when cross compiling. Check for a MinGW compiler on OS X before adding them. - Do not set CC explicitly in chinachippatcher, it will be set from Rockbox Utility's Makefile. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31527 a1c6a512-1295-4272-9138-f99709370657
* libtools.make: allow overriding variables via environment.Dominik Riebeling2012-01-02
| | | | | | Simplify a bit while at it as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31523 a1c6a512-1295-4272-9138-f99709370657
* libtools.make: add rule to build a DLL.Dominik Riebeling2011-12-16
| | | | | | | | | This only works for Windows, so you need to use it on Windows or set CROSS accordingly. Update mkamsboot to make mkamsboot.dll build and link against ucl.dll. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31333 a1c6a512-1295-4272-9138-f99709370657
* ipodpatcher: move linker only options out of CFLAGS.Dominik Riebeling2011-12-16
| | | | | | | OS X requires some linker-only options. Remove them from CFLAGS to avoid a compiler warning. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31330 a1c6a512-1295-4272-9138-f99709370657
* mkamsboot: fix building as universal library.Dominik Riebeling2011-12-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31325 a1c6a512-1295-4272-9138-f99709370657
* ipodpatcher: convert to use libtools.make.Dominik Riebeling2011-12-16
| | | | | | | | This allows building libipodpatcher, which will make it possible to stop building ipodpatcher files in Rockbox Utility directly. Move some OS X common values to libtools.make as well (might fix building libmkamsboot on OS X). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31324 a1c6a512-1295-4272-9138-f99709370657
* Break some long lines.Dominik Riebeling2011-12-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31281 a1c6a512-1295-4272-9138-f99709370657
* mkmpioboot: use common Makefile.Dominik Riebeling2011-12-14
| | | | | | | Extend common libtools.make with libucl dependency, which will be needed by other tools as well. Update mkmpioboot. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31259 a1c6a512-1295-4272-9138-f99709370657
* Initial common Makefile for Rockbox Utility tools / libs.Dominik Riebeling2011-12-14
Introduce a new Makefile holding the common functionality for building tools used by Rockbox Utility (*patcher / mk*boot). This converts mktccboot to use the common Makefile. Also introduces BUILD_DIR variable to control the path used for placing intermediate objects into. This should avoid filename clashes between different tools. Filenames are (still) assumed to be unique withing a single tool. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31257 a1c6a512-1295-4272-9138-f99709370657