-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.wrmakefile
137 lines (115 loc) · 3.77 KB
/
.wrmakefile
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# The file ".wrmakefile" is the template used by the Wind River Workbench to
# generate the makefiles of this project. Add user-specific build targets and
# make rules only(!) in this project's ".wrmakefile" file. These will then be
# automatically dumped into the makefiles.
WIND_HOME := $(subst \,/,$(WIND_HOME))
WIND_BASE := $(subst \,/,$(WIND_BASE))
WIND_USR := $(subst \,/,$(WIND_USR))
all : pre_recursion subdirs_all post_recursion pre_build main_all post_build
%IDE_GENERATED%
-include *.makefile
main_all : check_objectdir external_build $(PROJECT_TARGETS)
@echo "make: built targets of `pwd`"
check_objectdir :
@if [ ! -d "$(OBJ_DIR)" ]; then\
mkdir -p $(OBJ_DIR);\
fi
# entry point for extending the build
external_build ::
@echo ""
# main entry point for pre processing prior to the recursion
pre_recursion ::
@echo ""
# main entry point for post processing after the recursion
post_recursion ::
@echo ""
# main entry point for pre processing prior to the build
pre_build :: $(PRE_BUILD_STEP) generate_sources
@echo ""
# entry point for generating sources prior to the build
generate_sources ::
@echo ""
# main entry point for post processing after the build
post_build :: $(POST_BUILD_STEP) deploy_output
@echo ""
# entry point for deploying output after the build
deploy_output ::
@echo ""
# recursive make in SUBDIRS
subdirs_all :
@_PWD=`pwd`;\
for dir in _dummy_ $(SUBDIRS); do\
if [ "$$dir" = "_dummy_" ]; then\
continue ;\
fi;\
if [ ! -d "$$dir" ]; then\
continue ;\
fi;\
echo "Recursive make: Changing to Directory '$$dir'";\
cd "$$dir";\
"$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) all || exit;\
echo "Recursive make: Changing back to Directory '$$_PWD'";\
cd "$$_PWD";\
done
clean ::
@_PWD=`pwd`;\
for dir in _dummy_ $(SUBDIRS); do\
if [ "$$dir" = "_dummy_" ]; then\
continue ;\
fi;\
if [ ! -d "$$dir" ]; then\
continue ;\
fi;\
echo "Recursive make: Changing to Directory '$$dir'";\
cd "$$dir";\
"$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) $@ || exit;\
echo "Recursive make: Changing back to Directory '$$_PWD'";\
cd "$$_PWD";\
done
clean :: external_clean $(CLEAN_STEP) _clean
# entry point for extending the build clean
external_clean ::
@echo ""
_clean :
@echo "make: removing targets and objects of `pwd`";\
rm -f $(OBJECTS) $(PROJECT_TARGETS) $(DEP_FILES) $(wildcard $(OBJ_DIR)/*.unstripped) $(wildcard $(OBJ_DIR)/ctdt.*)
build_all_specs :
@echo "building target default for ALL build-specs";\
for spec in _dummy_ $(ALL_BUILD_SPECS); do\
if [ "$$spec" = "_dummy_" ]; then\
continue ;\
fi;\
echo " ";\
echo "building all for build-spec '$$spec'";\
"$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) BUILD_SPEC=$$spec DEBUG_MODE=$(DEBUG_MODE) TRACE=$(TRACE) || exit;\
done
clean_all_specs :
@echo "building target clean for ALL build-specs";\
for spec in _dummy_ $(ALL_BUILD_SPECS); do\
if [ "$$spec" = "_dummy_" ]; then\
continue ;\
fi;\
echo " ";\
echo "building clean for build-spec '$$spec'";\
"$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) BUILD_SPEC=$$spec DEBUG_MODE=$(DEBUG_MODE) TRACE=$(TRACE) clean || exit;\
done
build_enabled_specs :
@echo "building target default for ENABLED build-specs";\
for spec in _dummy_ $(ENABLED_BUILD_SPECS); do\
if [ "$$spec" = "_dummy_" ]; then\
continue ;\
fi;\
echo " ";\
echo "building all for build-spec '$$spec'";\
"$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) BUILD_SPEC=$$spec DEBUG_MODE=$(DEBUG_MODE) TRACE=$(TRACE) || exit;\
done
clean_enabled_specs :
@echo "building target clean for ENABLED build-specs";\
for spec in _dummy_ $(ENABLED_BUILD_SPECS); do\
if [ "$$spec" = "_dummy_" ]; then\
continue ;\
fi;\
echo " ";\
echo "building clean for build-spec '$$spec'";\
"$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) BUILD_SPEC=$$spec DEBUG_MODE=$(DEBUG_MODE) TRACE=$(TRACE) clean || exit;\
done