diff mbox series

[1/7] examples: generate demo.bin

Message ID 20200420223418.117186-2-mhorne@FreeBSD.org
State New
Headers show
Series Add support for CONFIG_API on RISC-V | expand

Commit Message

Mitchell Horne April 20, 2020, 10:34 p.m. UTC
From: Mitchell Horne <mhorne at FreeBSD.org>

The CONFIG_API option builds the example program, examples/api/demo, as
an ELF file. The make logic exists to create a binary as well, so add
the target to do so.

Signed-off-by: Mitchell Horne <mhorne at FreeBSD.org>
---
 examples/api/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Bin Meng April 23, 2020, 2:18 p.m. UTC | #1
On Tue, Apr 21, 2020 at 7:27 AM <mhorne at freebsd.org> wrote:
>
> From: Mitchell Horne <mhorne at FreeBSD.org>
>
> The CONFIG_API option builds the example program, examples/api/demo, as
> an ELF file. The make logic exists to create a binary as well, so add
> the target to do so.
>
> Signed-off-by: Mitchell Horne <mhorne at FreeBSD.org>
> ---
>  examples/api/Makefile | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
diff mbox series

Patch

diff --git a/examples/api/Makefile b/examples/api/Makefile
index ca4eb1f71a..9ff793206f 100644
--- a/examples/api/Makefile
+++ b/examples/api/Makefile
@@ -20,7 +20,7 @@  endif
 endif
 
 # Resulting ELF and binary exectuables will be named demo and demo.bin
-extra-y = demo
+extra-y = demo demo.bin
 
 # Source files located in the examples/api directory
 OBJ-y += crt0.o
@@ -56,7 +56,6 @@  cmd_link_demo = $(LD) --gc-sections -Ttext $(LOAD_ADDR) -o $@ $(filter-out $(PHO
 $(obj)/demo: $(OBJS) FORCE
 	$(call if_changed,link_demo)
 
-# demo.bin is never genrated. Is this necessary?
 OBJCOPYFLAGS_demo.bin := -O binary
 $(obj)/demo.bin: $(obj)/demo FORCE
 	$(call if_changed,objcopy)