Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
84 lines (63 loc) · 2.96 KB
/
Copy pathMakefile
File metadata and controls
84 lines (63 loc) · 2.96 KB
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
################################################################################
################################################################################
##
## Makefile -- makefile for top level modules.
##
## Mandatory settings:
##
## o TOPDIR = the toplevel directory (using slashes as path separator)
## o TARGET = the machine qualifier to generate code for
## o DIRECTORIES = the list of sub directories to build
##
################################################################################
################################################################################
TOPDIR = .
SUBDIR = .
include $(TOPDIR)/env/make/Makefile.config
DIRECTORIES += env
DIRECTORIES += FreeRTOS
DIRECTORIES += applications
################################################################################
# define user targets
################################################################################
default: headers build install
clean: $(DIRECTORIES:%=subdir-clean-%)
build: $(DIRECTORIES:%=subdir-build-%)
headers: $(DIRECTORIES:%=subdir-headers-%)
install: $(DIRECTORIES:%=subdir-install-%)
all: clean headers install
################################################################################
# include internal definitions and rules
################################################################################
include $(TOPDIR)/env/make/Makefile.rules
################################################################################
# local directory specific rules
################################################################################
subdir-clean-%:
@$(NEWLINE)
@$(ECHO) $(ECHOPREFIX) Submaking clean [$(SUBDIR)/$(@:subdir-clean-%=%)] for target [$(TARGET)]
@$(SUBMAKE) -C $(@:subdir-clean-%=%) clean TARGET=$(TARGET)
subdir-depend-%:
@$(NEWLINE)
@$(ECHO) $(ECHOPREFIX) Submaking depend [$(SUBDIR)/$(@:subdir-depend-%=%)] for target [$(TARGET)]
@$(SUBMAKE) -C $(@:subdir-depend-%=%) depend TARGET=$(TARGET)
subdir-headers-%:
@$(NEWLINE)
@$(ECHO) $(ECHOPREFIX) Submaking headers [$(SUBDIR)/$(@:subdir-headers-%=%)] for target [$(TARGET)]
@$(SUBMAKE) -C $(@:subdir-headers-%=%) headers TARGET=$(TARGET)
subdir-build-%:
@$(NEWLINE)
@$(ECHO) $(ECHOPREFIX) Submaking build [$(SUBDIR)/$(@:subdir-build-%=%)] for target [$(TARGET)]
@$(SUBMAKE) -C $(@:subdir-build-%=%) build TARGET=$(TARGET)
subdir-install-%:
@$(NEWLINE)
@$(ECHO) $(ECHOPREFIX) Submaking install [$(SUBDIR)/$(@:subdir-install-%=%)] for target [$(TARGET)]
@$(SUBMAKE) -C $(@:subdir-install-%=%) install TARGET=$(TARGET)
subdir-release-%:
@$(NEWLINE)
@$(ECHO) $(ECHOPREFIX) Submaking release [$(SUBDIR)/$(@:subdir-release-%=%)] for target [$(TARGET)]
@$(SUBMAKE) -C $(@:subdir-release-%=%) release TARGET=$(TARGET)
subdir-doc-%:
@$(NEWLINE)
@$(ECHO) $(ECHOPREFIX) Submaking doc [$(SUBDIR)/$(@:subdir-doc-%=%)] for target [$(TARGET)]
@$(SUBMAKE) -C $(@:subdir-doc-%=%) doc TARGET=$(TARGET)