-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
87 lines (73 loc) · 2.26 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# ===============================================================
#
# Release under GPLv-3.0.
#
# @file Makefile
# @brief
# @author gnsyxiang <[email protected]>
# @date 14/11 2019 20:18
# @version v0.0.1
#
# @since note
# @note note
#
# change log:
# NO. Author Date Modified
# 00 zhenquan.qiu 14/11 2019 create the file
#
# last modified: 14/11 2019 20:18
# ===============================================================
top_dir := $(shell pwd)
makefile_list = $(shell find ./project -name Makefile)
export top_dir
export makefile_list
include $(top_dir)/configs/common_var.mk
all:
ifdef lib
$(call run_dir_makefile_make_project, $(makefile_list), $(lib))
else
$(ECHO) "the instructions are as follows:"
$(ECHO) ''
$(ECHO) "\tmake test \t\t- test gcc is working."
$(ECHO) "\tmake list \t\t- show all projects that can be compiled."
$(ECHO) "\tmake clean \t\t- clean all build projects."
$(ECHO) "\tmake distclean\t\t- clean all projects."
$(ECHO) ''
endif
include $(sub_target_path)/define_func.mk
include $(sub_target_path)/common_target.mk
include $(top_dir)/configs/vender/platform_config.mk
test:
$(ECHO) "gcc path: "
$(ECHO) " $(CC)"
$(ECHO) ""
$(ECHO) "gcc version: "
$(CC) --version
list:
$(ECHO) "support compiled projects: "
$(ECHO) ""
$(call run_dir_makefile_make_target, $(makefile_list), list)
$(ECHO) ""
$(ECHO) ""
$(ECHO) "\teg: make lib=zlib - compile zlib"
$(ECHO) "\teg: make lib=htop - compile htop"
$(ECHO) ""
$(ECHO) "\teg: make lib=zlib V=1 - compile zlib with verbose info"
$(ECHO) "\teg: make lib=zlib_clean - clean zlib with build(./build/zlib-x.x.x) dir"
$(ECHO) "\teg: make lib=zlib_distcelan - clean zlib with build(./build/zlib/-x.x.x) and src(./src/zlib-x.x.x) dir"
$(ECHO) ""
clean:
$(ECHO) "clean all build projects"
$(RM) $(prefix_path)
$(call run_dir_makefile_make_target, $(makefile_list), clean)
clean-src:
$(ECHO) "clean all src projects"
$(RM) $(prefix_path)
$(call run_dir_makefile_make_target, $(makefile_list), clean-src)
distclean:
$(ECHO) "clean all projects"
$(RM) $(prefix_path)
$(call run_dir_makefile_make_target, $(makefile_list), distclean)
debug:
echo $(makefile_list)
.PHONY: all list