-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
executable file
·57 lines (50 loc) · 1.3 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
52
53
54
55
56
57
export TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
include config.mk
MENUCONFIG_PATH=tool/menuconfig
KCONFIG_PATH=Kconfig
AR=${CROSS_COMPILER}ar
RANLIB=${CROSS_COMPILER}ranlib
CROSS_COMPILER_VERSION = $(shell expr `$(CROSS_COMPILER)gcc -dumpversion | cut -f1 -d.` \>= 4)
.PHONY : bsp app vendor
bsp:
ifeq ($(CROSS_COMPILER_VERSION),1)
@rm ./bsp/images -rf
@mkdir -p ./bsp/images
@cd bsp;make all
else
@echo -e "\033[31mNot Found $(CROSS_COMPILER)gcc\033[0m"
endif
bsp-uboot:
ifeq ($(CROSS_COMPILER_VERSION),1)
@rm ./bsp/images/u-boot-*.bin -rf
@mkdir -p ./bsp/images
@cd bsp;make uboot
else
@echo -e "\033[31mNot Found $(CROSS_COMPILER)gcc\033[0m"
endif
bsp-linux:
ifeq ($(CROSS_COMPILER_VERSION),1)
@rm ./bsp/images/uImage -rf
@mkdir -p ./bsp/images
@cd bsp;make linux
else
@echo -e "\033[31mNot Found $(CROSS_COMPILER)gcc\033[0m"
endif
bsp-rootfs:
ifeq ($(CROSS_COMPILER_VERSION),1)
@rm ./bsp/images/rootfs* -rf
@mkdir -p ./bsp/images
@cd bsp;make rootfs
else
@echo -e "\033[31mNot Found $(CROSS_COMPILER)gcc\033[0m"
endif
vendor:
@rm ./vendor/output -rf
@mkdir ./vendor/output
@cd vendor;make vendor-deps
libs:
@cd app && $(MAKE) lib
app:
@cd app && $(MAKE) app
menuconfig:$(MENUCONFIG_PATH)/mconf
$< $(KCONFIG_PATH)