summaryrefslogtreecommitdiff
path: root/rbutil/libtools.make
AgeCommit message (Collapse)Author
2020-06-30mac: Fix build rule for dmg.Dominik Riebeling
Also add the version string to the folder used for creating the dmg, since that will appear when mounting it. Change-Id: Ibf5918bf51ae37082d7b2ca5baf919319f6e568d
2020-04-09rbutil: Add bspatch and libbzip2Solomon Peachy
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 Riebeling
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 Riebeling
- 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 Riebeling
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 Riebeling
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 Riebeling
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 Riebeling
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 Riebeling
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 Riebeling
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 Riebeling
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 Riebeling
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 Riebeling
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 Riebeling
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 Riebeling
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 Riebeling
Fixes cross compiling for Rockbox Utility. Change-Id: I3419cb4c89836ec3bee10072495042b3732fd66b
2013-04-05Fix ipodpatcher on OS X.Dominik Riebeling
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 Riebeling
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 Riebeling
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 Gevaerts
Change-Id: If281c0e37f56f81cb5dd57e264f82fb32bc08d3b
2012-04-28Move bin2c handling to libtools.makeDominik Riebeling
Change-Id: I60353bb9f9fd2658d66ba7f352e04f7489c7bf5d
2012-02-05Make sure we use POSIX/C99 printf() when building for windowsRafaël Carré
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 Riebeling
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 Riebeling
- 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 Riebeling
- 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 Riebeling
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 Riebeling
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 Riebeling
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 Riebeling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31325 a1c6a512-1295-4272-9138-f99709370657
2011-12-16ipodpatcher: convert to use libtools.make.Dominik Riebeling
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 Riebeling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31281 a1c6a512-1295-4272-9138-f99709370657
2011-12-14mkmpioboot: use common Makefile.Dominik Riebeling
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 Riebeling
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