From ae5e883bca69832c48a097537076c7b708a7d8e2 Mon Sep 17 00:00:00 2001
From: cladmi <hartergaetan@gmail.com>
Date: Tue, 27 Mar 2018 15:09:57 +0200
Subject: [PATCH] Makefile.include: add targets to get .elf/.bin/.hex

---
 Makefile.include | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile.include b/Makefile.include
index b6cd9e3db1..c1647a5736 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -308,7 +308,7 @@ BASELIBS += $(BINDIR)/$(APPLICATION_MODULE).a
 BASELIBS += $(APPDEPS)
 
 .PHONY: all link clean flash flash-only term doc debug debug-server reset objdump help info-modules
-.PHONY: print-size
+.PHONY: print-size elffile binfile hexfile
 .PHONY: ..in-docker-container
 # Target can depend on FORCE to always rebuild but still let make use file
 # modification timestamp (contrary to .PHONY).
@@ -319,6 +319,11 @@ ELFFILE ?= $(BINDIR)/$(APPLICATION).elf
 HEXFILE ?= $(ELFFILE:.elf=.hex)
 BINFILE ?= $(ELFFILE:.elf=.bin)
 
+# Targets to get given file
+elffile: $(ELFFILE)
+hexfile: $(HEXFILE)
+binfile: $(BINFILE)
+
 # variables used to compile and link c++
 CPPMIX ?= $(if $(wildcard *.cpp),1,)
 
-- 
GitLab