mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tools/edbg: allow Makefile to be called stand-alone
Also: - refactor the Makefile so all is not called if edbg is already there - add a clean target to only remove the edbg binary
This commit is contained in:
parent
7e6b506ee6
commit
7d5f08babf
11
dist/tools/edbg/Makefile
vendored
11
dist/tools/edbg/Makefile
vendored
@ -3,14 +3,23 @@ PKG_URL=https://github.com/ataradov/edbg
|
||||
PKG_VERSION=99d15460fcff723f73b16c29c8ca14bff4b33b20
|
||||
PKG_LICENSE=BSD-3-Clause
|
||||
|
||||
# manually set some RIOT env vars, so this Makefile can be called stand-alone
|
||||
RIOTBASE ?= $(CURDIR)/../../..
|
||||
RIOTTOOLS ?= $(CURDIR)/..
|
||||
|
||||
PKG_SOURCE_DIR = $(CURDIR)/bin
|
||||
PKG_BUILD_OUT_OF_SOURCE = 0
|
||||
|
||||
include $(RIOTBASE)/pkg/pkg.mk
|
||||
|
||||
all:
|
||||
all: $(CURDIR)/edbg
|
||||
|
||||
$(CURDIR)/edbg:
|
||||
# Start edbg build in a clean environment, so variables set by RIOT's build process
|
||||
# for cross compiling a specific target platform are reset and edbg can
|
||||
# be built cleanly for the native platform.
|
||||
env -i PATH="$(PATH)" TERM="$(TERM)" "$(MAKE)" -C "$(PKG_BUILD_DIR)"
|
||||
mv $(PKG_BUILD_DIR)/edbg .
|
||||
|
||||
clean::
|
||||
rm -f $(CURDIR)/edbg
|
||||
|
Loading…
Reference in New Issue
Block a user