-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile.in
155 lines (131 loc) · 3.67 KB
/
Makefile.in
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#******************************************************************************
# Copyright (C) 2014 Nils Weiss, Patrick Bruenn.
#
# This file is part of WyLight.
#
# WyLight is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# WyLight is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WyLight. If not, see <http://www.gnu.org/licenses/>.
#******************************************************************************
PRJ_PREFIX=WyLight_
PRJ_NAME=${PRJ_PREFIX}$(MAKECMDGOALS)
FLAVOUR=$(MAKECMDGOALS)
# Tools
GIT=@GIT@
DOXYGEN=@DOXYGEN@
NDK=@NDK@
WINE=@WINE@
PIC_CC8E=@PIC_CC8E@
CPPCHECKER=@CPPCHECKER@
UNCRUSTIFY=@UNCRUSTIFY@
# Include the common make definitions.
include makedefs
TARGETS=test
TARGETS+=cli
ifneq "not_found" "@DOXYGEN@"
TARGETS+=docu
else
MESSAGES+="install doxygen and run ./configure again to make docu\n"
endif
MESSAGES="Attention:\n"
ifneq "not_found" "@PIC_CC8E@"
ifneq "not_found" "@WINE@"
TARGETS+=firmware_pic
else
MESSAGES+="install wine and run ./configure again to make pic firmware\n"
endif
else
MESSAGES+="install CC8E.exe from http://www.bknd.com in your home directory and run ./configure again to make pic firmware\n"
endif
ifneq "not_found" "@GL@"
ifneq "not_found" "@GLU@"
ifneq "not_found" "@glut@"
TARGETS+=firmware_simu
else
endif
else
endif
else
MESSAGES+="install openGL development library to make simu\n"
endif
ifneq "not_found" "@NDK@"
TARGETS+=android_client
else
MESSAGES+="install android ndk and run ./configure again to make android_client\n"
endif
all:
@$(foreach target,$(TARGETS),@make $(target); @make clean;)
@echo $(MESSAGES)
pre-build: clean
cli: pre-build ${OBJDIR} ${BINDIR} ${BINDIR}/${PRJ_NAME}.bin
ENDINGS=c h cpp ino
CODE_DIRS=android cli common firmware library LinkIt7688Duo/SerialToSPIandPWM
filelist:
@rm -f [email protected]
@$(foreach END, ${ENDINGS}, $(foreach DIR, ${CODE_DIRS}, find ./$(DIR) -name "*.$(END)" >> [email protected];))
@echo "Created [email protected]"
uncrustify: filelist
${UNCRUSTIFY} -F filelist.txt --no-backup -c uncrustify.cfg
test: clean-all ${OBJDIR} ${BINDIR}
@make firmware_test
@make library_test
${CPPCHECKER} ${CODE_DIRS} --force --quiet
help:
@echo "Targets: "
@echo -GENERAL-
@echo test
@echo clean
@echo clean-all
@echo all
@echo cli
@echo -PIC-
@echo firmware_linkit
@echo firmware_pic
@echo firmware_pic_release
@echo firmware_simu
@echo firmware_test
@echo -LIBRARY-
@echo library
@echo library_test
@echo -ANDROID-
@echo android_client
@echo android_clean
@echo android_test
@echo -DOCUMENTATION-
@echo docu
# The rule to clean out all the build products.
clean:
@rm -rf ${OBJDIR} ${wildcard *~}
@make --no-print-directory ${OBJDIR}
# The rule to clean out all the build products.
clean-all:
@rm -rf ${OBJDIR} ${wildcard *~}
@rm -rf ${BINDIR} ${wildcard *~}
@rm -f ${FW_FILE}
# The rule to create the target directories.
${OBJDIR}:
@mkdir -p ${OBJDIR}
${BINDIR}:
@mkdir -p ${BINDIR}
# Where to find source files that do not live in this directory.
VPATH=${ROOT}/library
VPATH+=${ROOT}/firmware
VPATH+=${ROOT}/cli
# Where to find header files that do not live in the source directory.
IPATH=${ROOT}/library
IPATH+=${ROOT}/firmware
IPATH+=${ROOT}/cli
include Makefile.firmware
include Makefile.android
include Makefile.docu
include Makefile.library
include Makefile.cli