Statistics
| Branch: | Tag: | Revision:

mongoose / examples / nRF52 / http / boards / pca10040 / armgcc / Makefile.docker @ eaef5bd1

History | View | Annotate | Download (827 Bytes)

1
SDK ?= $(shell cat sdk.version)
2
SRC_DIR ?= $(realpath ../../../../../../..)
3

    
4
.PHONY: all clean flash gdbserver gdb jlinkexe rtt
5

    
6
MAKEFLAGS += w
7

    
8
ifeq ("$(VERBOSE)","1")
9
V := 
10
else
11
V := @
12
endif
13

    
14
ADD_DOCKER_ARGS =
15

    
16
# For communication with the device, we need docker container to be able
17
# to access it.
18
flash gdbserver gdb jlinkexe rtt: \
19
  ADD_DOCKER_ARGS = --privileged -v /dev/bus/usb:/dev/bus/usb --net=host
20

    
21
all clean flash gdbserver gdb jlinkexe rtt:
22
	$(V)docker run --rm -it $(ADD_DOCKER_ARGS) -v $(SRC_DIR):/src $(SDK) \
23
		/bin/bash -c "\
24
			make -C /src/mongoose mongoose.c mongoose.h && \
25
			if [ ! -e /src/mongoose/examples/nRF52/nrf5_iot_sdk ]; then ln -s /opt/nrf5_iot_sdk /src/mongoose/examples/nRF52/nrf5_iot_sdk; fi && \
26
			make -C /src/mongoose/examples/nRF52/http/boards/pca10040/armgcc $@ -$(MAKEFLAGS) \
27
		"