summaryrefslogtreecommitdiffstats
path: root/rbutil/libtools.make
AgeCommit message (Collapse)AuthorFilesLines
2020-04-09rbutil: Add bspatch and libbzip2Solomon Peachy1-0/+5
This is to enable binary patching of Hiby-based firmware files Note that noting in rbutil uses this yet. Change-Id: I03ac824dd7402d508eb4e857ad78f184eb0d0243
2016-12-16Fix linking with C++ files.Dominik Riebeling1-9/+17
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
2016-12-16Support C++ in libtools.make and rewrite dependency handling.Dominik Riebeling1-21/+21
- 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
2016-12-16Don't add LIBSOURCES to SOURCES.Dominik Riebeling1-16/+9
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
2014-03-20OS X: detect clang and build for x86 target only.Dominik Riebeling1-1/+7
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
2014-01-05Fix rm function on Windows once more.Dominik Riebeling1-1/+1
Windows del doesn't handle a non-existing folder gracefully, so check for existence first. Change-Id: I9c401f3f3a3e1e01b80d29e335256fbf3db22d35
2014-01-05Fix rm function on Windows.Dominik Riebeling1-1/+1
Windows del doesn't handle paths with / as separators, need to convert them first. Change-Id: Idb3efa96167aec5666517feabab67385ebd2db1a
2014-01-05Fix rebuilding of libs on OS X.Dominik Riebeling1-2/+5
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
2013-11-12Move LDOPTS to the end of the linker call.Dominik Riebeling1-2/+2
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
2013-06-09Treat arch flags separately when building libraries.Dominik Riebeling1-5/+5
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
2013-05-11Implement dependency generation in libtools.make.Dominik Riebeling1-1/+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
2013-05-11Change mkdir -p to work on Windows.Dominik Riebeling1-5/+10
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
2013-05-11Make libtools compile rule more generic.Dominik Riebeling1-1/+3
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
2013-05-10Set APPVERSION globally for extralibs Makefile.Dominik Riebeling1-2/+2
Make sure its value quotes are properly escaped. Otherwise make on Windows causes problems. Also, expand CPPDEFINES only once. Change-Id: I52e91f17626b2596f389811b22abc12d94f721d1
2013-05-04Allow overriding make variables via environment variables.Dominik Riebeling1-2/+2
Fixes cross compiling for Rockbox Utility. Change-Id: I3419cb4c89836ec3bee10072495042b3732fd66b
2013-04-05Fix ipodpatcher on OS X.Dominik Riebeling1-5/+5
Fix a typo and update CC handling for OS X. Change-Id: Icde3cb5956ffe45ee1d610ff34957ed7b17f3f02
2013-04-05Replace the use of uname to get the build output.Dominik Riebeling1-9/+14
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
2013-01-01Fix version handling for patchers.Dominik Riebeling1-1/+1
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
2012-07-27Add quotes around APPVERSION to avoid issues when it has spaces.Frank Gevaerts1-1/+1
Change-Id: If281c0e37f56f81cb5dd57e264f82fb32bc08d3b
2012-04-28Move bin2c handling to libtools.makeDominik Riebeling1-0/+5
Change-Id: I60353bb9f9fd2658d66ba7f352e04f7489c7bf5d
2012-02-05Make sure we use POSIX/C99 printf() when building for windowsRafaël Carré1-0/+3
Change-Id: I429ed40dc2b9d4fb238762113bd40936df896df0 Reviewed-on: http://gerrit.rockbox.org/85 Reviewed-by: Dominik Riebeling <Dominik.Riebeling@gmail.com>
2012-01-06Remove OS X special universal binary handling.Dominik Riebeling1-14/+2
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
2012-01-05Update OS X library building.Dominik Riebeling1-19/+8
- 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
2012-01-02Fix cross compiling on OS X.Dominik Riebeling1-0/+2
- 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
2012-01-02libtools.make: allow overriding variables via environment.Dominik Riebeling1-10/+6
Simplify a bit while at it as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31523 a1c6a512-1295-4272-9138-f99709370657
2011-12-16libtools.make: add rule to build a DLL.Dominik Riebeling1-0/+10
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
2011-12-16ipodpatcher: move linker only options out of CFLAGS.Dominik Riebeling1-1/+1
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
2011-12-16mkamsboot: fix building as universal library.Dominik Riebeling1-3/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31325 a1c6a512-1295-4272-9138-f99709370657
2011-12-16ipodpatcher: convert to use libtools.make.Dominik Riebeling1-0/+11
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
2011-12-15Break some long lines.Dominik Riebeling1-4/+10
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31281 a1c6a512-1295-4272-9138-f99709370657
2011-12-14mkmpioboot: use common Makefile.Dominik Riebeling1-8/+17
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
2011-12-14Initial common Makefile for Rockbox Utility tools / libs.Dominik Riebeling1-0/+117
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