embox

Форк
0
/
main-dist.mk 
125 строк · 2.1 Кб
1
#
2
# Embox main Makefile (distribution).
3
#
4

5
include mk/core/common.mk
6
include mk/variables.mk
7
include mk/version.mk
8

9
export DIST_BASE_DIR := .
10
export EMBOX_DIST_BASE_DIR := $(abspath $(DIST_BASE_DIR))
11

12
.PHONY : all a
13
a : all
14
all: build
15

16
define help-all
17
Usage: $(MAKE) [all]
18
   Or: $(MAKE) a
19

20
  Default build target. It is an alias to '$(MAKE) build'.
21
endef # all
22

23
make_build = $(MAKE) -f mk/build.mk
24

25
.PHONY : build b
26
b : build
27
build :
28
	+@$(make_build) $@
29

30
define help-build
31
Usage: $(MAKE) build-<template>
32
   Or: $(MAKE) build
33
   Or: $(MAKE) b
34

35
  Build the given <template> (if any) or the current active configuration.
36

37
  Compile all source files and link objects into main executable
38
  producing various debug and log info.
39
endef # build
40

41
.PHONY : rootfs
42
rootfs :
43
	+@$(make_build) build __REBUILD_ROOTFS=1
44

45
define help-rootfs
46
Usage: $(MAKE) rootfs
47

48
  Forces rootfs image to be rebuilt unconditionally.
49
endef # rootfs
50

51

52
#
53
# Disassembly
54
#
55

56
.PHONY : disasm
57
disasm :
58
	+@$(make_build) build DISASSEMBLY=y
59

60
define help-disasm
61
Usage: $(MAKE) disasm
62
  Disassembly image file
63
endef # disasm
64

65

66
#
67
# Docs
68
#
69

70
.PHONY : docsgen
71
docsgen :
72
	+@$(make_mybuild) $@
73

74
define help-docsgen
75
Usage: $(MAKE) docsgen
76

77
  Generate documentation from doxygen comments in source files.
78
endef # docsgen
79

80
#
81
# Cleaning targets.
82
#
83

84
.PHONY : clean
85
c : clean
86
clean :
87
	@$(RM) -r $(ROOT_DIR)/build
88

89
define help-clean
90
Usage: $(MAKE) clean
91
   Or: $(MAKE) c
92

93
  Remove most build artifacts (image, libraries, objects, etc.) #TODO Usecase?
94
endef # clean
95

96
#
97
# Make help and its friends.
98
#
99
.PHONY : help
100
help :
101
	@$(info $(help_main))#
102

103
define help_main
104
Usage: $(MAKE) [targets]
105
Embox version $(EMBOX_VERSION) [distibution].
106

107
Building targets:
108
  all (a)        - Default build target, alias to '$(MAKE) build'
109
  build (b)      - Build the current active configuration
110

111
Documentation targets:
112
  docsgen        - Denerate documentation from doxygen comments
113

114
Cleaning targets:
115
  clean (c)      - Remove most build artifacts (image, libraries, objects, etc.)
116

117
endef
118

119
help_entries := \
120
	all \
121
	build \
122
	docsgen \
123
	clean \
124
	disasm
125
help_targets := $(help_entries:%=help-%)
126

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.