Commit graph

24 commits

Author SHA1 Message Date
Aidan MacDonald
2fb2364686 makefiles: Fix escaping issues under GNU make 4.2
Make 4.3 and newer doesn't interpret comments in a shell call,
whereas Make 4.2 and older do. Escaping the comment directly
works on old makes, but on new makes the backslash is passed
as well -- which we want to avoid.

The safe way to pass a literal "#" character to the shell on
both versions is by embedding it in a variable and expanding
that. It's ugly, but it works...

Change-Id: I1a217c42d747fd5aa83f9990c234e06966ac1a00
2023-03-21 09:31:18 +00:00
Aidan MacDonald
ed7ab52e27 makefiles: Suppress stray backslash warnings with grep 3.8
GNU grep 3.8 warns about "\#" when compiling. The "#" has to be
escaped for Makefiles and shell, but it isn't special to grep so
grep thinks it's an invalid escape sequence.

Change-Id: Ieb2607d42b7daa1939ca0101b915ec0c7afd4298
2023-03-21 04:48:31 -04:00
Vencislav Atanasov
7f9fc20afa Use full_path_subst on more places, to avoid replacing the wrong occurrences in
paths.

If ROOTDIR=/rockbox and BUILDDIR=/rockbox/build-something, it is now possible to
successfully build both target binaries and simulators.

Change-Id: If12d1d5933c5a15feebf627a4f1636dc1e3a67fa
2019-07-28 21:00:57 +02:00
Solomon Peachy
4c933a1d01 build: Properly generate build dependency for autogenerated bitmap .h files
* bmp2rb generated a .h file that rockbox .c files used.
 * .h files in .c files were used to generate dependency graphs for make
 * When Make saw the .h file for the bitmap, it didn't know how what
   to do with them
 * Only arose in parallel builds

Fixed this by adding explicit dependencies for the .h files as part of
the existing 'bmpdepfile' function.

Solves the Xduoo X3 bootloader build failure that I could trigger 100%
of the time by using 'make -j8'

Change-Id: I6b3e78dde26c820a3b6c7c286e7d6c981b8e01fc
2018-12-25 11:54:11 -05:00
Amaury Pouly
b959655822 Fix unsafe substitutions in Makefile.
Strange things can happen in the (unlikely) case that ROOTDIR=/rockbox

Change-Id: I085f928fd859b307667e8fccf40b29a9c325f7ae
2017-05-12 20:28:57 +10:00
Sean Bartell
cadb3627fc Add rbcodecplatform.h and rbcodecconfig.h.
librbcodec users must provide these two files when the library is built.
rbcodecconfig.h provides configuration #defines and basic types, and
will be included by public librbcodec headers, so it must not conflict
with the user's code. rbcodecplatform.h provides various OS functions,
and will only be included by source files and private headers. This
system is intended to provide maximum flexibility for use on embedded
systems, where no operating system headers are included. Unix systems
can just copy rbcodecconfig-example.h and rbcodecplatform-unix.h with
minimal changes.

Change-Id: I350a2274d173da391fd1ca00c4202e9760d91def
Reviewed-on: http://gerrit.rockbox.org/143
Reviewed-by: Nils Wallménius <nils@rockbox.org>
Tested-by: Nils Wallménius <nils@rockbox.org>
2012-05-03 14:49:35 +02:00
Thomas Martitz
4b56ee048a Refactor and unify objcopy calls in the build system. Also now properly handles DEBUG builds on hosted targets to keep debug symbols if necessary.
Change-Id: I884031b79c6d49479e4d95752f35ced68872dd5d
2012-04-04 21:48:19 +02:00
Thomas Martitz
f269aa0060 build system: unify/simplify library handling a bit.
libs in $ROOT/lib now add to $(CORE_LIBS) and $(EXTRA_LIBS) and are
automatically linked by the core and codecs/plugins respectively.

Change-Id: Iff482c792a8c8142718f6a16a450c6e2f1497c9a
2012-03-26 22:27:40 +02:00
Rafaël Carré
adb1b52404 remove obsolete comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30285 a1c6a512-1295-4272-9138-f99709370657
2011-08-13 20:03:11 +00:00
Rafaël Carré
27c509fc55 makefiles
- some functions don't need to return their output, drop $(shell ... )
and prefix with $(SILENT), make V=1 will show the complete scripts being
run

- tweak make.dep generation: make the temporary file appear in root.make
  only, and remove a useless "real command", there is already a real
  command (mv)

- make addtargetdir.pl terminate its output with a newline ($(shell) did
  that for us)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27855 a1c6a512-1295-4272-9138-f99709370657
2010-08-21 18:07:12 +00:00
Teruaki Kawashima
e3fc65cfff change dependencies in make files:
* apps.make: depends on ctype.o instead of errno.o to depend on config-*.h so that it works for simulator.
* lang.make: add dependency of lang.h to make it sure that the file is updated properly when needed.
* plugins.make: object files don't depend on libpluginbitmaps.a.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24256 a1c6a512-1295-4272-9138-f99709370657
2010-01-17 13:03:10 +00:00
Björn Stenberg
4fc00222cb Dependency generation now uses all cores on multi-core machines.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22021 a1c6a512-1295-4272-9138-f99709370657
2009-07-24 21:53:32 +00:00
Andrew Mahone
54715e6d07 Small fix for asmdefs, make sure $var is cleared the line after it is read, so that value *must* follow label immediately.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21876 a1c6a512-1295-4272-9138-f99709370657
2009-07-14 21:52:22 +00:00
Andrew Mahone
fec4206f39 Handle sh and m68k compiler's output correctly in asmdefs2file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21859 a1c6a512-1295-4272-9138-f99709370657
2009-07-14 11:39:21 +00:00
Andrew Mahone
668a769ca4 Add new asmdefs mechanism for exporting information only available to the C compiler for use in asm files, and use it in arm jpeg idct. See apps/apps.make, apps/core_asmdefs.c, and apps/recorder/jpeg_idct_arm.S for details.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21831 a1c6a512-1295-4272-9138-f99709370657
2009-07-13 00:40:35 +00:00
Andrew Mahone
541072ae5d Rework addtargetdir.pl to also fix prefix generated-file depedencies with the target directory, and simplify the sed expression for mkdepfile.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21826 a1c6a512-1295-4272-9138-f99709370657
2009-07-12 22:02:09 +00:00
Tom Ross
4fb5864a6c Move generated lang-related files to their own directory in preparation of localizable plugins.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20170 a1c6a512-1295-4272-9138-f99709370657
2009-03-02 06:13:18 +00:00
Maurus Cuelenaere
e8da447729 Commit FS#9494 by Yoshihisa Uchida: add support for building the simulators under Windows using MingW
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19923 a1c6a512-1295-4272-9138-f99709370657
2009-02-04 20:59:27 +00:00
Björn Stenberg
0d97a5f021 Better file suffix replacement. Bug fix by Nils Wallménius. Closes FS #9644.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19443 a1c6a512-1295-4272-9138-f99709370657
2008-12-15 09:55:20 +00:00
Björn Stenberg
3eece18b95 Write dependencies to a temporary file until they are completed. This fixes the problem with an aborted dependency generation not being detected.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19241 a1c6a512-1295-4272-9138-f99709370657
2008-11-26 23:20:12 +00:00
Björn Stenberg
a091d20ba0 Added 'keywords' and 'eol-style' properties.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19218 a1c6a512-1295-4272-9138-f99709370657
2008-11-25 19:54:23 +00:00
Björn Stenberg
6640978129 Altered mkdepfile to use a single gcc call and post-process the output. This speeds up the dependency generation, especially in cygwin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19169 a1c6a512-1295-4272-9138-f99709370657
2008-11-21 15:07:15 +00:00
Björn Stenberg
344ad683be FS#9566: Change regex to make it work on old versions of sed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19166 a1c6a512-1295-4272-9138-f99709370657
2008-11-21 13:01:03 +00:00
Björn Stenberg
c6b3d38a15 New makefile solution: A single invocation of 'make' to build the entire tree. Fully controlled dependencies give faster and more correct recompiles.
Many #include lines adjusted to conform to the new standards.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
2008-11-20 11:27:31 +00:00