Commit Graph

10 Commits

Author SHA1 Message Date
Sami Mujawar 88a1cf1e4e Update makefile to build fiptool for Windows
Although support for building fiptool on a Windows host was present,
the binary was not built when the top level makefile was invoked.

This patch makes the necessary changes to the to support building of
fiptool on a Windows host PC from the main makefile.

Change-Id: I0c01ba237fa3010a027a1b324201131210cf4d7c
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
2020-09-14 15:06:56 +01:00
Antonio Nino Diaz b5a0f4bd19 Makefile: Fix verbose builds on Windows
Commit <ee1ba6d4ddf1> ("Makefile: Support totally quiet output with -s")
broke verbose (V=1) builds on Windows. This patch fixes it by adding
helpers to silence echo prints in a OS-dependent way.

Change-Id: I24669150457516e9fb34fa32fa103398efe8082d
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-10-19 15:54:27 +01:00
davidcunado-arm 172138b9e0 Merge pull request #926 from EvanLloyd/win_make_4
Minor makefile fixes
2017-05-08 23:32:52 +01:00
dp-arm 82cb2c1ad9 Use SPDX license identifiers
To make software license auditing simpler, use SPDX[0] license
identifiers instead of duplicating the license text in every file.

NOTE: Files that have been imported by FreeBSD have not been modified.

[0]: https://spdx.org/

Change-Id: I80a00e1f641b8cc075ca5a95b10607ed9ed8761a
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
2017-05-03 09:39:28 +01:00
Evan Lloyd 6ba7d274e2 Build: Fix parallel build
2 problems were found, but are in one change to avoid submitting a patch
that might fail to build. The problems were:
1.  The macro MAKE_PREREQ_DIR has a minor bug, in that it is capable of
    generating recursive dependencies.
2.  The inclusion of BUILD_DIR in TEMP_OBJ_DIRS left no explicit
    dependency, BUILD_DIR might not exist when subdirectories are
    created by a thread on another CPU.

This fix corrects these with the following changes:
1.  MAKE_PREREQ_DIR does nothing for a direct self dependency.
2.  BUILD_DIR is built using MAKE_PREREQ_DIR.
3.  BUILD_DIR is an explicit prerequisite of all OBJ_DIRS.

Change-Id: I938cddea4a006df225c02a47b9cf759212f27fb7

Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
2017-05-02 18:27:05 +01:00
Masahiro Yamada f2e1d57e43 Build: exclude -c flag from TF_CFLAGS
The -c flag should not be included in the global variable TF_CFLAGS;
it should be specified in the build rule only when its target is a
*.o file.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-01-05 11:25:13 +09:00
Sandrine Bailleux 403973c95d Give user's compiler flags precedence over default ones
The user can provide additional CFLAGS to use when building TF.
However, these custom CFLAGS are currently prepended to the
standard CFLAGS that are hardcoded in the TF build system. This
is an issue because when providing conflicting compiler flags
(e.g. different optimisations levels like -O1 and -O0), the last
one on the command line usually takes precedence. This means that
the user flags get overriden.

To address this problem, this patch separates the TF CFLAGS from
the user CFLAGS. The former are now stored in the TF_CFLAGS make
variable, whereas the CFLAGS make variable is untouched and reserved
for the user. The order of the 2 sets of flags is enforced when
invoking the compiler.

Fixes ARM-Software/tf-issues#350

Change-Id: Ib189f44555b885f1dffbec6015092f381600e560
2016-04-14 16:16:37 +01:00
Evan Lloyd 414ab8530d Make:Improve version string generation portability
To get round problems encountered when building in a DOS build
environment the generation of the .o file containing build identifier
strings is modified.
The problems encounterred were:
   1. DOS echo doesn't strip ' characters from the output text.
   2. git is not available from CMD.EXE so the BUILD_STRING value needs
      some other origin.

A BUILD_STRING value of "development build" is used for now.

MAKE_BUILD_STRINGS is used to customise build string generation in a DOS
environment. This variable is not defined in the UNIX build environment
make file helper, and so the existing build string generation behaviour
is retained in these build environments.

NOTE: This commit completes a cumulative series aimed at improving
      build portability across development environments.
      This enables the build to run on several new build environments,
      if the relevant tools are available.
      At this point the build is tested on Windows 7 Enterprise SP1,
      using CMD.EXE, Cygwin and Msys (MinGW),as well as a native
      Linux envionment".  The Windows platform builds used
      aarch64-none-elf-gcc.exe 4.9.1.  CMD.EXE and Msys used Gnu
      Make 3.81, cygwin used Gnu Make 4.1.

CAVEAT: The cert_create tool build is not tested on the Windows
        platforms (openssl-for-windows has a GPL license).

Change-Id: Iaa4fc89dbe2a9ebae87e2600c9eef10a6af30251
2016-04-01 12:33:09 +01:00
Evan Lloyd 42a45b51aa Make:Allow for extension in tool names.
In some build environments executable programs have a specific file
extension.  The value of BIN_EXT is appended to the relevant tool file
names to allow for this.
The value of BIN_EXT is set, where appropriate, by the build environment
specific make helper (to .exe for Windows build environments).

.gitignore is updated to hide the new (.exe) files.

Change-Id: Icc32f64b750e425265075ad4e0dea18129640b86
2016-04-01 12:33:09 +01:00
Evan Lloyd e7f54dbd03 Make:Use environment variables for OS detection.
Add make helper files to select the appropriate settings for the build
environment. Selection is made in make_helpers/build_env.mk, which
selects other files to include using generic build environment settings.
The Trusted Firmware Makefile and supporting tool Makefiles are updated
to include build_env.mk instead of unix.mk.

NOTE: This change does not fully enable builds in other build
      environments. It facilitates this without compromising the
      existing build environments.

Change-Id: Ic4064ffe6ce158bbd16d7cc9f27dd4655a3580f6
2016-04-01 12:33:09 +01:00