-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (35 loc) · 973 Bytes
/
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
52
53
54
55
56
ROOT = $(PWD)
include config.mk
obj-y = base/
obj-y += main.o
# Command User Interface
obj-$(CONFIG_CUI) += cui/
# devicies
obj-y += devices/
# test cases
obj-y += test/
#obj-y += fw-tst/
include script/make-var.mk
all: config subdir mini dump
config: $(ROOT)/include/config.h
$(ROOT)/include/config.h: config.mk
$(ROOT)/script/gen_config.pl $< > $@
mini: $(OBJS) base/link.lds
@echo "LINK -o $@"; $(LD) -T base/link.lds -o $@ $(OBJS) $(LIBS)
base/link.lds: base/link.lds.S include/config.h
$(GCC) -E -Iinclude $< | grep -v "^#" > $@
dump: mini
@echo "DUMP > $@"; $(OBJDUMP) -d $< >| dump
ncsim: mini
$(OBJCOPY) --set-section-flags .text_rom=alloc,readonly,code $< mini
.PHONY: all clean image install config ncsim distclean
clean: _clean
@echo "CLEANED"; \
rm -f mini ;
distclean: _distclean
@echo "DISTCLEANED"; \
rm -f mini dump uImage;
include script/make-com.mk
ifeq (,$(filter clean distclean,$(MAKECMDGOALS)))
include .depend
endif