-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·50 lines (44 loc) · 1.54 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# All configuration
ifeq ($(MAKECMDGOALS),)
ifeq ($(example),)
$(error Please specify example! make example=... all)
endif
ifeq ($(target),)
$(error Please specify target! make target=... all)
else
BUILDDIR = build_$(target)
FWINC += targets/$(target)
endif
endif
help:
@echo "*********** NODI MAKEFILE HELP **********"
@echo ""
@echo ""
@echo "USAGE:"
@echo "make help Show this help"
@echo "make configure Configure environement for fixture generators"
@echo "make distclean Deconfigure environement, remove additional and builds files"
@echo "make target=... clean_build Clean all compile files with target build directory"
@echo "make target=... all Simply compile test for target using available files"
configure:
@echo "Configure environement..."
@if test -d env; then echo "env directory exist!"; else mkdir env; fi
@echo "Setting env config variables... - EXPERIMENTAL"
@./scripts/ENV_VARS.sh
@echo "Downloading nRF cmd tools..."
@./scripts/download_nrf_cmd_tools.sh
@echo "Installing newest gcc toolchain..."
@./scripts/install_new_gcc.sh
@echo "Done!"
distclean:
@echo "Deconfigure environement..."
@git clean -xdf
@echo "Done!"
all:
@echo "Compiling example..."
@cd examples/$(example)/$(target) && make clean && make all
@echo "Done!"
flash: all
@echo "Compiling and flashing example..."
@./scripts/compile_flash_example.sh $(example) $(target)
@echo "Done!"