/
Makefile
51 lines (40 loc) · 1.14 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
51
#
# file: Makefile
#
# Makefile for whole project, just a proxy for nuttx/Makefile or tup, with some additional logic
#
# chip: STM32F401RE
#
# author: Freddie Chopin, http://www.freddiechopin.info http://www.distortec.com
# date: 2014-12-17
#
ifeq ($(OS),Windows_NT)
# Windows format, but with forward slashes
PWD := "pwd -W"
else
PWD := "pwd"
endif
TOPDIR := "${shell echo `$(PWD)`}/nuttx"
all: nuttx/.config nuttx/Make.defs
$(MAKE) -C nuttx V=1 TOPDIR=$(TOPDIR)
@echo ' '
@echo "Creating extended listing nuttx.lss..."
arm-none-eabi-objdump --demangle -S nuttx/nuttx > nuttx/nuttx.lss
@echo ' '
arm-none-eabi-size -B nuttx/nuttx
clean:
$(MAKE) -C nuttx clean
clean_context:
$(MAKE) -C nuttx clean_context
distclean:
$(MAKE) -C nuttx distclean
tup: nuttx/.config nuttx/Make.defs tup.config
$(MAKE) -C nuttx TOPDIR=$(TOPDIR) context
tup
nuttx/.config: nuttx/configs/nucleo-f4x1re/f401-nsh/defconfig
cp $< nuttx/.config
nuttx/Make.defs: nuttx/configs/nucleo-f4x1re/f401-nsh/Make.defs
cp $< nuttx/Make.defs
tup.config: nuttx/.config
cp $< $@
.PHONY: all clean clean_context distclean