2 # Copyright (c) 2015-2019, Arm Limited and Contributors. All rights reserved.
4 # SPDX-License-Identifier: BSD-3-Clause
7 # This Makefile generates the image files used in the Trusted Firmware-A
8 # document from the dia file.
10 # The PNG files in the present directory have been generated using Dia version
11 # 0.97.2, which can be obtained from https://wiki.gnome.org/Apps/Dia/Download
14 # generate_image use the tool dia generate png from dia file
16 # $(2) = image file name
17 # $(3) = image file format
18 # $(4) = addition opts
19 # $(5) = dia source file
21 dia
--show-layers
=$(1) --filter=$(3) --export=$(2) $(4) $(5)
24 RESET_DIA
= reset_code_flow.dia
26 default_reset_code.png \
27 reset_code_no_cpu_check.png \
28 reset_code_no_boot_type_check.png \
29 reset_code_no_checks.png \
31 # The $(RESET_DIA) file is organized in several layers.
32 # Each image is generated by combining and exporting the appropriate set of
34 default_reset_code_layers
= "Frontground,Background,cpu_type_check,boot_type_check"
35 reset_code_no_cpu_check_layers
= "Frontground,Background,no_cpu_type_check,boot_type_check"
36 reset_code_no_boot_type_check_layers
= "Frontground,Background,cpu_type_check,no_boot_type_check"
37 reset_code_no_checks_layers
= "Frontground,Background,no_cpu_type_check,no_boot_type_check"
39 default_reset_code_opts
=
40 reset_code_no_cpu_check_opts
=
41 reset_code_no_boot_type_check_opts
=
42 reset_code_no_checks_opts
=
44 INT_DIA
= int_handling.dia
46 sec-int-handling.png \
47 non-sec-int-handling.png
49 # The $(INT_DIA) file is organized in several layers.
50 # Each image is generated by combining and exporting the appropriate set of
52 non-sec-int-handling_layers
= "non_sec_int_bg,legend,non_sec_int_note,non_sec_int_handling"
53 sec-int-handling_layers
= "sec_int_bg,legend,sec_int_note,sec_int_handling"
55 non-sec-int-handling_opts
= --size
=1692x
56 sec-int-handling_opts
= --size
=1570x
58 XLAT_DIA
= xlat_align.dia
59 XLAT_PNG
= xlat_align.png
61 xlat_align_layers
= "bg,translations"
64 all:$(RESET_PNGS
) $(INT_PNGS
) $(XLAT_PNG
)
66 $(RESET_PNGS
):$(RESET_DIA
)
67 $(call generate_image
,$($(patsubst %.png
,%_layers
,$@
)),$@
,png
,$($(patsubst %.png
,%_opts
,$@
)),$<)
69 $(INT_PNGS
):$(INT_DIA
)
70 $(call generate_image
,$($(patsubst %.png
,%_layers
,$@
)),$@
,png
,$($(patsubst %.png
,%_opts
,$@
)),$<)
72 $(XLAT_PNG
):$(XLAT_DIA
)
73 $(call generate_image
,$($(patsubst %.png
,%_layers
,$@
)),$(patsubst %.png
,%.svg
,$@
),svg
,$($(patsubst %.png
,%_opts
,$@
)),$<)
74 inkscape
-z
$(patsubst %.png
,%.svg
,$@
) -e
$@
-d
45