2 # Top level Makefile for the OpenPilot project build system.
3 # Copyright (c) 2010-2013, The OpenPilot Team, http://www.openpilot.org
4 # Use 'make help' for instructions.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 # You should have received a copy of the GNU General Public License along
17 # with this program; if not, write to the Free Software Foundation, Inc.,
18 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 # This top level Makefile passes down some variables to sub-makes through
22 # the environment. They are explicitly exported using the export keyword.
23 # Lower level makefiles assume that these variables are defined. To ensure
24 # that a special magic variable is exported here. It must be checked for
25 # existance by each sub-make.
26 export OPENPILOT_IS_COOL
:= Fuck Yeah
!
28 # It is possible to set OPENPILOT_DL_DIR and/or OPENPILOT_TOOLS_DIR environment
29 # variables to override local tools download and installation directorys. So the
30 # same toolchains can be used for all working copies. Particularly useful for CI
31 # server build agents, but also for local installations.
33 # If no OPENPILOT_* variables found, makefile internal DL_DIR and TOOLS_DIR paths
34 # will be used. They still can be overriden by the make command line parameters:
35 # make DL_DIR=/path/to/download/directory TOOLS_DIR=/path/to/tools/directory targets...
37 # Function for converting Windows style slashes into Unix style
38 slashfix
= $(subst \
,/,$(1))
40 # Function for converting an absolute path to one relative
41 # to the top of the source tree
42 toprel
= $(subst $(realpath
$(ROOT_DIR
))/,,$(abspath
$(1)))
44 # Set up some macros for common directories within the tree
45 export ROOT_DIR
:= $(realpath
$(dir $(lastword
$(MAKEFILE_LIST
))))
46 export DL_DIR
:= $(if
$(OPENPILOT_DL_DIR
),$(call slashfix
,$(OPENPILOT_DL_DIR
)),$(ROOT_DIR
)/downloads
)
47 export TOOLS_DIR
:= $(if
$(OPENPILOT_TOOLS_DIR
),$(call slashfix
,$(OPENPILOT_TOOLS_DIR
)),$(ROOT_DIR
)/tools
)
48 export BUILD_DIR
:= $(ROOT_DIR
)/build
49 export PACKAGE_DIR
:= $(ROOT_DIR
)/build
/package
50 export DIST_DIR
:= $(ROOT_DIR
)/build
/dist
52 DIRS
= $(DL_DIR
) $(TOOLS_DIR
) $(BUILD_DIR
) $(PACKAGE_DIR
) $(DIST_DIR
)
54 # Set up default build configurations (debug | release)
55 GCS_BUILD_CONF
:= release
56 UAVOGEN_BUILD_CONF
:= release
57 ANDROIDGCS_BUILD_CONF
:= debug
58 GOOGLE_API_VERSION
:= 14
60 # Clean out undesirable variables from the environment and command-line
61 # to remove the chance that they will cause problems with our build
63 $(if
$(filter-out undefined
,$(origin $(1))),
64 $(info $(EMPTY
) NOTE Sanitized
$(2) variable
'$(1)' from
$(origin $(1)))
65 MAKEOVERRIDES
= $(filter-out $(1)=%,$(MAKEOVERRIDES
))
71 # These specific variables can influence compilation in unexpected (and undesirable) ways
73 SANITIZE_GCC_VARS
:= TMPDIR GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH
75 SANITIZE_GCC_VARS
+= CPATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH OBJC_INCLUDE_PATH DEPENDENCIES_OUTPUT
77 SANITIZE_GCC_VARS
+= CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LDLIBS
78 $(foreach var
, $(SANITIZE_GCC_VARS
), $(eval
$(call SANITIZE_VAR
,$(var
),disallowed
)))
80 # These specific variables used to be valid but now they make no sense
81 SANITIZE_DEPRECATED_VARS
:= USE_BOOTLOADER CLEAN_BUILD
82 $(foreach var
, $(SANITIZE_DEPRECATED_VARS
), $(eval
$(call SANITIZE_VAR
,$(var
),deprecated
)))
84 # Make sure this isn't being run as root unless installing (no whoami on Windows, but that is ok here)
85 ifeq ($(shell whoami
2>/dev
/null
),root
)
86 ifeq ($(filter install,$(MAKECMDGOALS
)),)
88 $(error You should not be running this
as root
)
93 # Decide on a verbosity level based on the V= parameter
104 # Make sure we know few things about the architecture before including
105 # the tools.mk to ensure that we download/install the right tools.
106 UNAME
:= $(shell uname
)
107 ARCH
:= $(shell uname
-m
)
108 # Here and everywhere if not Linux or Mac then assume Windows
109 ifeq ($(filter Linux Darwin
, $(UNAME
)), )
113 # Include tools installers
114 include $(ROOT_DIR
)/make
/tools.mk
116 # Include third party builders if available
117 -include $(ROOT_DIR
)/make
/3rdparty
/3rdparty.mk
119 # We almost need to consider autoconf/automake instead of this
120 ifeq ($(UNAME
), Linux
)
122 UAVOBJGENERATOR
= "$(BUILD_DIR)/uavobjgenerator/uavobjgenerator"
123 else ifeq ($(UNAME
), Darwin
)
125 UAVOBJGENERATOR
= "$(BUILD_DIR)/uavobjgenerator/uavobjgenerator"
126 else ifeq ($(UNAME
), Windows
)
128 UAVOBJGENERATOR
= "$(BUILD_DIR)/uavobjgenerator/$(UAVOGEN_BUILD_CONF)/uavobjgenerator.exe"
131 ##############################
135 ##############################
138 all: uavobjects all_ground all_flight
142 @
$(ECHO
) " CLEAN $(call toprel, $(BUILD_DIR))"
143 $(V1
) [ ! -d
"$(BUILD_DIR)" ] ||
$(RM
) -rf
"$(BUILD_DIR)"
149 ##############################
153 ##############################
158 UAVOGEN_SILENT
:= silent
161 UAVOBJGENERATOR_DIR
= $(BUILD_DIR
)/uavobjgenerator
162 DIRS
+= $(UAVOBJGENERATOR_DIR
)
164 .PHONY
: uavobjgenerator
165 uavobjgenerator
: |
$(UAVOBJGENERATOR_DIR
)
166 $(V1
) cd
$(UAVOBJGENERATOR_DIR
) && \
167 $(QMAKE
) $(ROOT_DIR
)/ground
/uavobjgenerator
/uavobjgenerator.pro \
168 -spec
$(QT_SPEC
) -r CONFIG
+=$(UAVOGEN_BUILD_CONF
) CONFIG
+=$(UAVOGEN_SILENT
) && \
169 $(MAKE
) --no-print-directory
-w
171 UAVOBJ_TARGETS
:= gcs flight python matlab java wireshark
174 uavobjects
: $(addprefix uavobjects_
, $(UAVOBJ_TARGETS
))
176 UAVOBJ_XML_DIR
:= $(ROOT_DIR
)/shared
/uavobjectdefinition
177 UAVOBJ_OUT_DIR
:= $(BUILD_DIR
)/uavobject-synthetics
179 DIRS
+= $(UAVOBJ_OUT_DIR
)
181 uavobjects_
%: $(UAVOBJ_OUT_DIR
) uavobjgenerator
182 $(V1
) ( cd
$(UAVOBJ_OUT_DIR
) && \
183 $(UAVOBJGENERATOR
) -$* $(UAVOBJ_XML_DIR
) $(ROOT_DIR
) ; \
186 uavobjects_test
: $(UAVOBJ_OUT_DIR
) uavobjgenerator
187 $(V1
) $(UAVOBJGENERATOR
) -v
-none
$(UAVOBJ_XML_DIR
) $(ROOT_DIR
)
190 @
$(ECHO
) " CLEAN $(call toprel, $(UAVOBJ_OUT_DIR))"
191 $(V1
) [ ! -d
"$(UAVOBJ_OUT_DIR)" ] ||
$(RM
) -r
"$(UAVOBJ_OUT_DIR)"
193 ##############################
195 # Flight related components
197 ##############################
199 # Define some pointers to the various important pieces of the flight code
200 # to prevent these being repeated in every sub makefile
201 export PIOS
:= $(ROOT_DIR
)/flight
/pios
202 export FLIGHTLIB
:= $(ROOT_DIR
)/flight
/libraries
203 export OPMODULEDIR
:= $(ROOT_DIR
)/flight
/modules
204 export OPUAVOBJ
:= $(ROOT_DIR
)/flight
/uavobjects
205 export OPUAVTALK
:= $(ROOT_DIR
)/flight
/uavtalk
206 export OPUAVSYNTHDIR
:= $(BUILD_DIR
)/uavobject-synthetics
/flight
207 export OPGCSSYNTHDIR
:= $(BUILD_DIR
)/openpilotgcs-synthetics
209 DIRS
+= $(OPGCSSYNTHDIR
)
211 # Define supported board lists
212 ALL_BOARDS
:= oplinkmini revolution osd revoproto simposix discoveryf4bare gpsplatinum revonano
214 # Short names of each board (used to display board name in parallel builds)
215 oplinkmini_short
:= 'oplm'
216 revolution_short
:= 'revo'
218 revoproto_short
:= 'revp'
219 revonano_short
:= 'revn'
220 simposix_short
:= 'posx'
221 discoveryf4bare_short
:= 'df4b'
222 gpsplatinum_short
:= 'gps9'
224 # SimPosix only builds on Linux so drop it from the list for
225 # all other platforms.
226 ifneq ($(UNAME
), Linux
)
227 ALL_BOARDS
:= $(filter-out simposix
, $(ALL_BOARDS
))
230 # Start out assuming that we'll build fw, bl and bu for all boards
231 FW_BOARDS
:= $(ALL_BOARDS
)
232 BL_BOARDS
:= $(ALL_BOARDS
)
233 BU_BOARDS
:= $(ALL_BOARDS
)
234 EF_BOARDS
:= $(ALL_BOARDS
)
236 # SimPosix doesn't have a BL, BU or EF target so we need to
237 # filter them out to prevent errors on the all_flight target.
238 BL_BOARDS
:= $(filter-out simposix
, $(BL_BOARDS
))
239 BU_BOARDS
:= $(filter-out simposix gpsplatinum
, $(BU_BOARDS
))
240 EF_BOARDS
:= $(filter-out simposix
, $(EF_BOARDS
))
242 # Generate the targets for whatever boards are left in each list
243 FW_TARGETS
:= $(addprefix fw_
, $(FW_BOARDS
))
244 BL_TARGETS
:= $(addprefix bl_
, $(BL_BOARDS
))
245 BU_TARGETS
:= $(addprefix bu_
, $(BU_BOARDS
))
246 EF_TARGETS
:= $(addprefix ef_
, $(EF_BOARDS
))
248 # When building any of the "all_*" targets, tell all sub makefiles to display
249 # additional details on each line of output to describe which build and target
250 # that each line applies to. The same applies also to all, opfw_resource,
252 ifneq ($(strip $(filter all_
% all opfw_resource package
,$(MAKECMDGOALS
))),)
253 export ENABLE_MSG_EXTRA
:= yes
256 # When building more than one goal in a single make invocation, also
257 # enable the extra context for each output line
258 ifneq ($(word 2,$(MAKECMDGOALS
)),)
259 export ENABLE_MSG_EXTRA
:= yes
262 # TEMPLATES (used to generate build rules)
264 # $(1) = Canonical board name all in lower case (e.g. coptercontrol)
265 # $(2) = Short name for board (e.g cc)
269 fw_
$(1): fw_
$(1)_opfw
271 fw_
$(1)_
%: uavobjects_flight
272 $(V1
) $$(ARM_GCC_VERSION_CHECK_TEMPLATE
)
273 $(V1
) $(MKDIR
) -p
$(BUILD_DIR
)/fw_
$(1)/dep
274 $(V1
) cd
$(ROOT_DIR
)/flight
/targets
/boards
/$(1)/firmware
&& \
275 $$(MAKE
) -r
--no-print-directory \
278 BOARD_SHORT_NAME
=$(2) \
279 TOPDIR
=$(ROOT_DIR
)/flight
/targets
/boards
/$(1)/firmware \
280 OUTDIR
=$(BUILD_DIR
)/fw_
$(1) \
285 $(1)_clean
: fw_
$(1)_clean
287 @
$(ECHO
) " CLEAN $(call toprel, $(BUILD_DIR)/fw_$(1))"
288 $(V1
) $(RM
) -fr
$(BUILD_DIR
)/fw_
$(1)
291 # $(1) = Canonical board name all in lower case (e.g. coptercontrol)
292 # $(2) = Short name for board (e.g cc)
296 bl_
$(1)_bino
: bl_
$(1)_bin
299 $(V1
) $$(ARM_GCC_VERSION_CHECK_TEMPLATE
)
300 $(V1
) $(MKDIR
) -p
$(BUILD_DIR
)/bl_
$(1)/dep
301 $(V1
) cd
$(ROOT_DIR
)/flight
/targets
/boards
/$(1)/bootloader
&& \
302 $$(MAKE
) -r
--no-print-directory \
305 BOARD_SHORT_NAME
=$(2) \
306 TOPDIR
=$(ROOT_DIR
)/flight
/targets
/boards
/$(1)/bootloader \
307 OUTDIR
=$(BUILD_DIR
)/bl_
$(1) \
312 unbrick_
$(1): bl_
$(1)_hex
313 $(if
$(filter-out undefined
,$(origin UNBRICK_TTY
)),
314 $(V0
) @
$(ECHO
) " UNBRICK $(1) via $$(UNBRICK_TTY)"
315 $(V1
) $(STM32FLASH_DIR
)/stm32flash \
316 -w
$(BUILD_DIR
)/bl_
$(1)/bl_
$(1).hex \
321 $(V0
) @
$(ECHO
) "ERROR: You must specify UNBRICK_TTY=<serial-device> to use for unbricking."
322 $(V0
) @
$(ECHO
) " eg. $$(MAKE) $$@ UNBRICK_TTY=/dev/ttyUSB0"
325 .PHONY
: bl_
$(1)_clean
327 @
$(ECHO
) " CLEAN $(call toprel, $(BUILD_DIR)/bl_$(1))"
328 $(V1
) $(RM
) -fr
$(BUILD_DIR
)/bl_
$(1)
331 # $(1) = Canonical board name all in lower case (e.g. coptercontrol)
332 # $(2) = Short name for board (e.g cc)
335 bu_
$(1): bu_
$(1)_opfw
337 bu_
$(1)_
%: bl_
$(1)_bino
338 $(V1
) $(MKDIR
) -p
$(BUILD_DIR
)/bu_
$(1)/dep
339 $(V1
) cd
$(ROOT_DIR
)/flight
/targets
/common
/bootloader_updater
&& \
340 $$(MAKE
) -r
--no-print-directory \
343 BOARD_SHORT_NAME
=$(2) \
344 TOPDIR
=$(ROOT_DIR
)/flight
/targets
/common
/bootloader_updater \
345 OUTDIR
=$(BUILD_DIR
)/bu_
$(1) \
349 .PHONY
: bu_
$(1)_clean
351 @
$(ECHO
) " CLEAN $(call toprel, $(BUILD_DIR)/bu_$(1))"
352 $(V1
) $(RM
) -fr
$(BUILD_DIR
)/bu_
$(1)
355 # $(1) = Canonical board name all in lower case (e.g. coptercontrol)
356 # $(2) = Short name for board (e.g cc)
361 ef_
$(1)_
%: bl_
$(1)_bin fw_
$(1)_opfw
362 $(V1
) $(MKDIR
) -p
$(BUILD_DIR
)/ef_
$(1)
363 $(V1
) cd
$(ROOT_DIR
)/flight
/targets
/common
/entire_flash
&& \
364 $$(MAKE
) -r
--no-print-directory \
367 BOARD_SHORT_NAME
=$(2) \
368 DFU_CMD
="$(DFUUTIL_DIR)/bin/dfu-util" \
369 TOPDIR
=$(ROOT_DIR
)/flight
/targets
/common
/entire_flash \
370 OUTDIR
=$(BUILD_DIR
)/ef_
$(1) \
374 .PHONY
: ef_
$(1)_clean
376 @
$(ECHO
) " CLEAN $(call toprel, $(BUILD_DIR)/ef_$(1))"
377 $(V1
) $(RM
) -fr
$(BUILD_DIR
)/ef_
$(1)
380 # $(1) = Canonical board name all in lower case (e.g. coptercontrol)
381 define BOARD_PHONY_TEMPLATE
383 all_
$(1): $$(filter fw_
$(1), $$(FW_TARGETS
))
384 all_
$(1): $$(filter bl_
$(1), $$(BL_TARGETS
))
385 all_
$(1): $$(filter bu_
$(1), $$(BU_TARGETS
))
386 all_
$(1): $$(filter ef_
$(1), $$(EF_TARGETS
))
388 .PHONY
: all_
$(1)_clean
389 all_
$(1)_clean
: $$(addsuffix _clean
, $$(filter fw_
$(1), $$(FW_TARGETS
)))
390 all_
$(1)_clean
: $$(addsuffix _clean
, $$(filter bl_
$(1), $$(BL_TARGETS
)))
391 all_
$(1)_clean
: $$(addsuffix _clean
, $$(filter bu_
$(1), $$(BU_TARGETS
)))
392 all_
$(1)_clean
: $$(addsuffix _clean
, $$(filter ef_
$(1), $$(EF_TARGETS
)))
395 # Generate flight build rules
396 .PHONY
: all_fw all_fw_clean
397 all_fw
: $(addsuffix _opfw
, $(FW_TARGETS
))
398 all_fw_clean
: $(addsuffix _clean
, $(FW_TARGETS
))
400 .PHONY
: all_bl all_bl_clean
401 all_bl
: $(addsuffix _bin
, $(BL_TARGETS
))
402 all_bl_clean
: $(addsuffix _clean
, $(BL_TARGETS
))
404 .PHONY
: all_bu all_bu_clean
405 all_bu
: $(addsuffix _opfw
, $(BU_TARGETS
))
406 all_bu_clean
: $(addsuffix _clean
, $(BU_TARGETS
))
408 .PHONY
: all_ef all_ef_clean
409 all_ef
: $(EF_TARGETS
)
410 all_ef_clean
: $(addsuffix _clean
, $(EF_TARGETS
))
412 .PHONY
: all_flight all_flight_clean
413 all_flight
: all_fw all_bl all_bu all_ef
414 all_flight_clean
: all_fw_clean all_bl_clean all_bu_clean all_ef_clean
416 # Expand the groups of targets for each board
417 $(foreach board
, $(ALL_BOARDS
), $(eval
$(call BOARD_PHONY_TEMPLATE
,$(board
))))
419 # Expand the firmware rules
420 $(foreach board
, $(ALL_BOARDS
), $(eval
$(call FW_TEMPLATE
,$(board
),$($(board
)_short
))))
422 # Expand the bootloader rules
423 $(foreach board
, $(ALL_BOARDS
), $(eval
$(call BL_TEMPLATE
,$(board
),$($(board
)_short
))))
425 # Expand the bootloader updater rules
426 $(foreach board
, $(ALL_BOARDS
), $(eval
$(call BU_TEMPLATE
,$(board
),$($(board
)_short
))))
428 # Expand the entire-flash rules
429 $(foreach board
, $(ALL_BOARDS
), $(eval
$(call EF_TEMPLATE
,$(board
),$($(board
)_short
))))
432 sim_win32
: sim_win32_exe
434 sim_win32_
%: uavobjects_flight
435 $(V1
) $(MKDIR
) -p
$(BUILD_DIR
)/sitl_win32
436 $(V1
) $(MAKE
) --no-print-directory \
437 -C
$(ROOT_DIR
)/flight
/targets
/OpenPilot
--file
=$(ROOT_DIR
)/flight
/targets
/OpenPilot
/Makefile.win32
$*
442 sim_osx_
%: uavobjects_flight
443 $(V1
) $(MKDIR
) -p
$(BUILD_DIR
)/sim_osx
444 $(V1
) $(MAKE
) --no-print-directory \
445 -C
$(ROOT_DIR
)/flight
/targets
/SensorTest
--file
=$(ROOT_DIR
)/flight
/targets
/SensorTest
/Makefile.osx
$*
447 ##############################
449 # GCS related components
451 ##############################
454 all_ground
: openpilotgcs uploader
456 # Convenience target for the GCS
457 .PHONY
: gcs gcs_qmake gcs_clean
459 gcs_qmake
: openpilotgcs_qmake
460 gcs_clean
: openpilotgcs_clean
468 OPENPILOTGCS_DIR
:= $(BUILD_DIR
)/openpilotgcs_
$(GCS_BUILD_CONF
)
469 DIRS
+= $(OPENPILOTGCS_DIR
)
471 OPENPILOTGCS_MAKEFILE
:= $(OPENPILOTGCS_DIR
)/Makefile
473 .PHONY
: openpilotgcs_qmake
474 openpilotgcs_qmake
$(OPENPILOTGCS_MAKEFILE
): |
$(OPENPILOTGCS_DIR
)
475 $(V1
) cd
$(OPENPILOTGCS_DIR
) && \
476 $(QMAKE
) $(ROOT_DIR
)/ground
/openpilotgcs
/openpilotgcs.pro \
477 -spec
$(QT_SPEC
) -r CONFIG
+=$(GCS_BUILD_CONF
) CONFIG
+=$(GCS_SILENT
) $(GCS_QMAKE_OPTS
)
480 openpilotgcs
: uavobjects_gcs
$(OPENPILOTGCS_MAKEFILE
)
481 $(V1
) $(MAKE
) -w
-C
$(OPENPILOTGCS_DIR
)/$(MAKE_DIR
);
483 .PHONY
: openpilotgcs_clean
485 @
$(ECHO
) " CLEAN $(call toprel, $(OPENPILOTGCS_DIR))"
486 $(V1
) [ ! -d
"$(OPENPILOTGCS_DIR)" ] ||
$(RM
) -r
"$(OPENPILOTGCS_DIR)"
490 ################################
492 # Serial Uploader tool
494 ################################
496 UPLOADER_DIR
:= $(BUILD_DIR
)/uploader_
$(GCS_BUILD_CONF
)
497 DIRS
+= $(UPLOADER_DIR
)
499 UPLOADER_MAKEFILE
:= $(UPLOADER_DIR
)/Makefile
501 .PHONY
: uploader_qmake
502 uploader_qmake
$(UPLOADER_MAKEFILE
): |
$(UPLOADER_DIR
)
503 $(V1
) cd
$(UPLOADER_DIR
) && \
504 $(QMAKE
) $(ROOT_DIR
)/ground
/openpilotgcs
/src
/experimental
/USB_UPLOAD_TOOL
/upload.pro \
505 -spec
$(QT_SPEC
) -r CONFIG
+=$(GCS_BUILD_CONF
) CONFIG
+=$(GCS_SILENT
) $(GCS_QMAKE_OPTS
)
508 uploader
: $(UPLOADER_MAKEFILE
)
509 $(V1
) $(MAKE
) -w
-C
$(UPLOADER_DIR
)
511 .PHONY
: uploader_clean
513 @
$(ECHO
) " CLEAN $(call toprel, $(UPLOADER_DIR))"
514 $(V1
) [ ! -d
"$(UPLOADER_DIR)" ] ||
$(RM
) -r
"$(UPLOADER_DIR)"
517 # We want to take snapshots of the UAVOs at each point that they change
518 # to allow the GCS to be compatible with as many versions as possible.
519 # We always include a pseudo collection called "srctree" which represents
520 # the UAVOs in the source tree. So not necessary to add current tree UAVO
521 # hash here, it is always included.
523 # Find the git hashes of each commit that changes uavobjects with:
524 # git log --format=%h -- shared/uavobjectdefinition/ | head -n 2
525 # List only UAVO hashes of past releases, do not list current hash.
526 # Past compatible versions are so far: RELEASE-12.10.2
527 UAVO_GIT_VERSIONS
:= 5e14f53
529 # All versions includes also the current source tree UAVO hash
530 UAVO_ALL_VERSIONS
:= $(UAVO_GIT_VERSIONS
) srctree
532 # This is where the UAVO collections are stored
533 UAVO_COLLECTION_DIR
:= $(BUILD_DIR
)/uavo-collections
535 # $(1) git hash of a UAVO snapshot
536 define UAVO_COLLECTION_GIT_TEMPLATE
538 # Make the output directory that will contain all of the synthetics for the
539 # uavo collection referenced by the git hash $(1)
540 $$(UAVO_COLLECTION_DIR
)/$(1):
541 $$(V1
) $(MKDIR
) -p
$$(UAVO_COLLECTION_DIR
)/$(1)
543 # Extract the snapshot of shared/uavobjectdefinition from git hash $(1)
544 $$(UAVO_COLLECTION_DIR
)/$(1)/uavo-xml.
tar: |
$$(UAVO_COLLECTION_DIR
)/$(1)
545 $$(UAVO_COLLECTION_DIR
)/$(1)/uavo-xml.
tar:
546 $$(V0
) @
$(ECHO
) " UAVOTAR $(1)"
547 $$(V1
) $(GIT
) archive
$(1) -o
$$@
-- shared
/uavobjectdefinition
/
549 # Extract the uavo xml files from our snapshot
550 $$(UAVO_COLLECTION_DIR
)/$(1)/uavo-xml
: $$(UAVO_COLLECTION_DIR
)/$(1)/uavo-xml.
tar
551 $$(V0
) @
$(ECHO
) " UAVOUNTAR $(1)"
553 $$(V1
) $(MKDIR
) -p
$$@
554 $$(V1
) $(TAR
) -C
$$(call toprel
, $$@
) -xf
$$(call toprel
, $$<) ||
$(RM
) -rf
$$@
557 # Map the current working directory into the set of UAVO collections
558 $(UAVO_COLLECTION_DIR
)/srctree
:
561 $(UAVO_COLLECTION_DIR
)/srctree
/uavo-xml
: |
$(UAVO_COLLECTION_DIR
)/srctree
562 $(UAVO_COLLECTION_DIR
)/srctree
/uavo-xml
: $(UAVOBJ_XML_DIR
)
563 $(V1
) $(LN
) -sf
$(ROOT_DIR
) $(UAVO_COLLECTION_DIR
)/srctree
/uavo-xml
565 # $(1) git hash (or symbolic name) of a UAVO snapshot
566 define UAVO_COLLECTION_BUILD_TEMPLATE
568 # This leaves us with a (broken) symlink that points to the full sha1sum of the collection
569 $$(UAVO_COLLECTION_DIR
)/$(1)/uavohash
: $$(UAVO_COLLECTION_DIR
)/$(1)/uavo-xml
570 # Compute the sha1 hash for this UAVO collection
571 # The sed bit truncates the UAVO hash to 16 hex digits
572 $$(V1
) $$(VERSION_INFO
) \
573 --uavodir
=$$(UAVO_COLLECTION_DIR
)/$(1)/uavo-xml
/shared
/uavobjectdefinition \
574 --format
='$$$${UAVO_HASH}' | \
575 $(SED
) -e
's|\(................\).*|\1|' > $$@
577 $$(V0
) @
$(ECHO
) " UAVOHASH $(1) ->" $$$$(cat
$$(UAVO_COLLECTION_DIR
)/$(1)/uavohash
)
579 # Generate the java uavobjects for this UAVO collection
580 $$(UAVO_COLLECTION_DIR
)/$(1)/java-build
/java
: $$(UAVO_COLLECTION_DIR
)/$(1)/uavohash
581 $$(V0
) @
$(ECHO
) " UAVOJAVA $(1) " $$$$(cat
$$(UAVO_COLLECTION_DIR
)/$(1)/uavohash
)
582 $$(V1
) $(MKDIR
) -p
$$@
584 cd
$$(UAVO_COLLECTION_DIR
)/$(1)/java-build
&& \
585 $$(UAVOBJGENERATOR
) -java
$$(UAVO_COLLECTION_DIR
)/$(1)/uavo-xml
/shared
/uavobjectdefinition
$$(ROOT_DIR
) ; \
588 # Build a jar file for this UAVO collection
589 $$(UAVO_COLLECTION_DIR
)/$(1)/java-build
/uavobjects.jar
: |
$$(ANDROIDGCS_ASSETS_DIR
)/uavos
590 $$(UAVO_COLLECTION_DIR
)/$(1)/java-build
/uavobjects.jar
: $$(UAVO_COLLECTION_DIR
)/$(1)/java-build
/java
591 $$(V0
) @
$(ECHO
) " UAVOJAR $(1) " $$$$(cat
$$(UAVO_COLLECTION_DIR
)/$(1)/uavohash
)
593 HASH
=$$$$(cat
$$(UAVO_COLLECTION_DIR
)/$(1)/uavohash
) && \
594 cd
$$(UAVO_COLLECTION_DIR
)/$(1)/java-build
&& \
595 $(JAVAC
) java
/*.java \
596 $$(ROOT_DIR
)/androidgcs
/src
/org
/openpilot
/uavtalk
/UAVDataObject.java \
597 $$(ROOT_DIR
)/androidgcs
/src
/org
/openpilot
/uavtalk
/UAVObject
*.java \
598 $$(ROOT_DIR
)/androidgcs
/src
/org
/openpilot
/uavtalk
/UAVMetaObject.java \
600 find .
/org
/openpilot
/uavtalk
/uavobjects
-type f
-name
'*.class' > classlist.txt
&& \
601 $(JAR
) cf tmp_uavobjects.jar @classlist.txt
&& \
604 --output
$$(ANDROIDGCS_ASSETS_DIR
)/uavos
/$$$${HASH}.jar \
605 tmp_uavobjects.jar
&& \
606 $(LN
) -sf
$$(ANDROIDGCS_ASSETS_DIR
)/uavos
/$$$${HASH}.jar uavobjects.jar \
611 # One of these for each element of UAVO_GIT_VERSIONS so we can extract the UAVOs from git
612 $(foreach githash
, $(UAVO_GIT_VERSIONS
), $(eval
$(call UAVO_COLLECTION_GIT_TEMPLATE
,$(githash
))))
614 # One of these for each UAVO_ALL_VERSIONS which includes the ones in the srctree
615 $(foreach githash
, $(UAVO_ALL_VERSIONS
), $(eval
$(call UAVO_COLLECTION_BUILD_TEMPLATE
,$(githash
))))
617 .PHONY
: uavo-collections_java
618 uavo-collections_java
: $(foreach githash
, $(UAVO_ALL_VERSIONS
), $(UAVO_COLLECTION_DIR
)/$(githash
)/java-build
/uavobjects.jar
)
620 .PHONY
: uavo-collections
621 uavo-collections
: uavo-collections_java
623 .PHONY
: uavo-collections_clean
624 uavo-collections_clean
:
625 @
$(ECHO
) " CLEAN $(call toprel, $(UAVO_COLLECTION_DIR))"
626 $(V1
) [ ! -d
"$(UAVO_COLLECTION_DIR)" ] ||
$(RM
) -r
$(UAVO_COLLECTION_DIR
)
628 ##############################
632 ##############################
634 ALL_UNITTESTS
:= logfs math lednotification
636 # Build the directory for the unit tests
637 UT_OUT_DIR
:= $(BUILD_DIR
)/unit_tests
638 DIRS
+= $(UT_OUT_DIR
)
641 all_ut
: $(addsuffix _elf
, $(addprefix ut_
, $(ALL_UNITTESTS
)))
644 all_ut_xml
: $(addsuffix _xml
, $(addprefix ut_
, $(ALL_UNITTESTS
)))
647 all_ut_run
: $(addsuffix _run
, $(addprefix ut_
, $(ALL_UNITTESTS
)))
651 @
$(ECHO
) " CLEAN $(call toprel, $(UT_OUT_DIR))"
652 $(V1
) [ ! -d
"$(UT_OUT_DIR)" ] ||
$(RM
) -r
"$(UT_OUT_DIR)"
654 # $(1) = Unit test name
659 ut_
$(1)_
%: $$(UT_OUT_DIR
)
660 $(V1
) $(MKDIR
) -p
$(UT_OUT_DIR
)/$(1)
661 $(V1
) cd
$(ROOT_DIR
)/flight
/tests
/$(1) && \
662 $$(MAKE
) -r
--no-print-directory \
664 BOARD_SHORT_NAME
=$(1) \
665 TOPDIR
=$(ROOT_DIR
)/flight
/tests
/$(1) \
666 OUTDIR
="$(UT_OUT_DIR)/$(1)" \
670 .PHONY
: ut_
$(1)_clean
672 @
$(ECHO
) " CLEAN $(call toprel, $(UT_OUT_DIR)/$(1))"
673 $(V1
) [ ! -d
"$(UT_OUT_DIR)/$(1)" ] ||
$(RM
) -r
"$(UT_OUT_DIR)/$(1)"
676 # Expand the unittest rules
677 $(foreach ut
, $(ALL_UNITTESTS
), $(eval
$(call UT_TEMPLATE
,$(ut
))))
679 # Disable parallel make when the all_ut_run target is requested otherwise the TAP
680 # output is interleaved with the rest of the make output.
681 ifneq ($(strip $(filter all_ut_run
,$(MAKECMDGOALS
))),)
683 $(info $(EMPTY
) NOTE Parallel make disabled by all_ut_run target so we have sane console output
)
686 ##############################
688 # Packaging components
690 ##############################
692 # Firmware files to package
693 PACKAGE_FW_EXCLUDE
:= fw_simposix
$(if
$(PACKAGE_FW_INCLUDE_DISCOVERYF4BARE
),,fw_discoveryf4bare
)
694 PACKAGE_FW_TARGETS
:= $(filter-out $(PACKAGE_FW_EXCLUDE
), $(FW_TARGETS
))
695 PACKAGE_ELF_TARGETS
:= $(filter fw_simposix
, $(FW_TARGETS
))
697 # Rules to generate GCS resources used to embed firmware binaries into the GCS.
698 # They are used later by the vehicle setup wizard to update board firmware.
699 # To open a firmware image use ":/firmware/fw_coptercontrol.opfw"
700 OPFW_RESOURCE
:= $(OPGCSSYNTHDIR
)/opfw_resource.qrc
701 OPFW_RESOURCE_PREFIX
:= ..
/..
/
702 OPFW_FILES
:= $(foreach fw_targ
, $(PACKAGE_FW_TARGETS
), $(call toprel
, $(BUILD_DIR
)/$(fw_targ
)/$(fw_targ
).opfw
))
704 <!DOCTYPE RCC
><RCC version
="1.0"> \
705 <qresource
prefix="/firmware"> \
706 $(foreach fw_file
, $(OPFW_FILES
), <file alias
="$(notdir $(fw_file))">$(OPFW_RESOURCE_PREFIX
)$(fw_file
)</file
>) \
710 .PHONY
: opfw_resource
711 opfw_resource
: $(OPFW_RESOURCE
)
713 $(OPFW_RESOURCE
): $(FW_TARGETS
) |
$(OPGCSSYNTHDIR
)
714 @
$(ECHO
) Generating OPFW resource file
$(call toprel
, $@
)
715 $(V1
) $(ECHO
) $(QUOTE
)$(OPFW_CONTENTS
)$(QUOTE
) > $@
717 # If opfw_resource or all firmware are requested, GCS should depend on the resource
718 ifneq ($(strip $(filter opfw_resource
all all_fw all_flight package
,$(MAKECMDGOALS
))),)
719 $(OPENPILOTGCS_MAKEFILE
): $(OPFW_RESOURCE
)
722 # Packaging targets: package
723 # - builds all firmware, opfw_resource, gcs
724 # - copies firmware into a package directory
725 # - calls paltform-specific packaging script
727 # Define some variables
728 PACKAGE_LBL
:= $(shell $(VERSION_INFO
) --format
=\
$${LABEL})
729 PACKAGE_NAME
:= OpenPilot
731 PACKAGE_FULL_NAME
:= $(PACKAGE_NAME
)$(PACKAGE_SEP
)$(PACKAGE_LBL
)
733 include $(ROOT_DIR
)/package
/$(UNAME
).mk
735 # Source distribution is never dirty because it uses git archive
736 DIST_NAME
:= $(DIST_DIR
)/$(subst dirty-
,,$(PACKAGE_FULL_NAME
)).
tar
738 ##############################
740 # Source code formatting
742 ##############################
744 UNCRUSTIFY_TARGETS
:= flight ground
746 # $(1) = Uncrustify target (e.g flight or ground)
747 # $(2) = Target root directory
748 define UNCRUSTIFY_TEMPLATE
750 .PHONY
: uncrustify_
$(1)
752 @
$(ECHO
) "Auto-formatting $(1) source code"
753 $(V1
) UNCRUSTIFY_CONFIG
="$(ROOT_DIR)/make/uncrustify/uncrustify.cfg" $(SHELL
) make
/scripts
/uncrustify.sh
$(call toprel
, $(2))
756 $(foreach uncrustify_targ
, $(UNCRUSTIFY_TARGETS
), $(eval
$(call UNCRUSTIFY_TEMPLATE
,$(uncrustify_targ
),$(ROOT_DIR
)/$(uncrustify_targ
))))
758 .PHONY
: uncrustify_all
759 uncrustify_all
: $(addprefix uncrustify_
,$(UNCRUSTIFY_TARGETS
))
761 ##############################
763 # Doxygen documentation
765 # Each target should have own Doxyfile.$(target) with build directory build/docs/$(target),
766 # proper source directory (e.g. $(target)) and appropriate other doxygen options.
768 ##############################
770 DOCS_TARGETS
:= flight ground uavobjects
772 # $(1) = Doxygen target (e.g flight or ground)
773 define DOXYGEN_TEMPLATE
776 docs_
$(1): docs_
$(1)_clean
777 @
$(ECHO
) "Generating $(1) documentation"
778 $(V1
) $(MKDIR
) -p
$(BUILD_DIR
)/docs
/$(1)
779 $(V1
) $(DOXYGEN
) $(ROOT_DIR
)/make
/doxygen
/Doxyfile.
$(1)
781 .PHONY
: docs_
$(1)_clean
783 @
$(ECHO
) " CLEAN $(call toprel, $(BUILD_DIR)/docs/$(1))"
784 $(V1
) [ ! -d
"$(BUILD_DIR)/docs/$(1)" ] ||
$(RM
) -r
"$(BUILD_DIR)/docs/$(1)"
788 $(foreach docs_targ
, $(DOCS_TARGETS
), $(eval
$(call DOXYGEN_TEMPLATE
,$(docs_targ
))))
791 docs_all
: $(addprefix docs_
,$(DOCS_TARGETS
))
793 .PHONY
: docs_all_clean
795 @
$(ECHO
) " CLEAN $(call toprel, $(BUILD_DIR)/docs)"
796 $(V1
) [ ! -d
"$(BUILD_DIR)/docs" ] ||
$(RM
) -rf
"$(BUILD_DIR)/docs"
798 ##############################
802 ##############################
805 build-info
: |
$(BUILD_DIR
)
806 @
$(ECHO
) " BUILD-INFO $(call toprel, $(BUILD_DIR)/$@.txt)"
807 $(V1
) $(VERSION_INFO
) \
808 --uavodir
=$(ROOT_DIR
)/shared
/uavobjectdefinition \
809 --template
="make/templates/$@.txt" \
810 --outfile
="$(BUILD_DIR)/$@.txt"
812 ##############################
814 # Source for distribution
816 ##############################
818 DIST_VER_INFO
:= $(DIST_DIR
)/version-info.json
820 $(DIST_VER_INFO
): .git
/index |
$(DIST_DIR
)
821 $(V1
) $(VERSION_INFO
) --jsonpath
="$(DIST_DIR)"
824 $(DIST_NAME
).gz
: $(DIST_VER_INFO
) .git
/index |
$(DIST_DIR
)
825 @
$(ECHO
) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_NAME).gz)"
826 $(V1
) git archive
--prefix="$(PACKAGE_NAME)/" -o
"$(DIST_NAME)" HEAD
827 $(V1
) tar --append
--file
="$(DIST_NAME)" \
828 --transform
='s,.*version-info.json,$(PACKAGE_NAME)/version-info.json,' \
829 $(call toprel
, "$(DIST_VER_INFO)")
830 $(V1
) gzip
-f
"$(DIST_NAME)"
833 dist: $(DIST_NAME
).gz
836 ##############################
840 ##############################
846 ##############################
848 # Help message, the default Makefile goal
850 ##############################
852 .DEFAULT_GOAL
:= help
857 @
$(ECHO
) " This Makefile is known to work on Linux and Mac in a standard shell environment."
858 @
$(ECHO
) " It also works on Windows by following the instructions given on this wiki page:"
859 @
$(ECHO
) " http://wiki.openpilot.org/display/Doc/Windows%3A+Building+and+Packaging"
861 @
$(ECHO
) " Here is a summary of the available targets:"
863 @
$(ECHO
) " [Source tree preparation]"
864 @
$(ECHO
) " prepare - Install GIT commit message template"
865 @
$(ECHO
) " [Tool Installers]"
866 @
$(ECHO
) " arm_sdk_install - Install the GNU ARM gcc toolchain"
867 @
$(ECHO
) " qt_sdk_install - Install the QT development tools"
868 @
$(ECHO
) " nsis_install - Install the NSIS Unicode (Windows only)"
869 @
$(ECHO
) " sdl_install - Install the SDL library (Windows only)"
870 @
$(ECHO
) " mesawin_install - Install the OpenGL32 DLL (Windows only)"
871 @
$(ECHO
) " openssl_install - Install the OpenSSL libraries (Windows only)"
872 @
$(ECHO
) " uncrustify_install - Install the Uncrustify source code beautifier"
873 @
$(ECHO
) " doxygen_install - Install the Doxygen documentation generator"
874 @
$(ECHO
) " gtest_install - Install the GoogleTest framework"
875 @
$(ECHO
) " These targets are not updated yet and are probably broken:"
876 @
$(ECHO
) " openocd_install - Install the OpenOCD JTAG daemon"
877 @
$(ECHO
) " stm32flash_install - Install the stm32flash tool for unbricking F1-based boards"
878 @
$(ECHO
) " dfuutil_install - Install the dfu-util tool for unbricking F4-based boards"
879 @
$(ECHO
) " Install all available tools:"
880 @
$(ECHO
) " all_sdk_install - Install all of above (platform-dependent)"
881 @
$(ECHO
) " build_sdk_install - Install only essential for build tools (platform-dependent)"
883 @
$(ECHO
) " Other tool options are:"
884 @
$(ECHO
) " <tool>_version - Display <tool> version"
885 @
$(ECHO
) " <tool>_clean - Remove installed <tool>"
886 @
$(ECHO
) " <tool>_distclean - Remove downloaded <tool> distribution file(s)"
888 @
$(ECHO
) " [Big Hammer]"
889 @
$(ECHO
) " all - Generate UAVObjects, build openpilot firmware and gcs"
890 @
$(ECHO
) " all_flight - Build all firmware, bootloaders and bootloader updaters"
891 @
$(ECHO
) " all_fw - Build only firmware for all boards"
892 @
$(ECHO
) " all_bl - Build only bootloaders for all boards"
893 @
$(ECHO
) " all_bu - Build only bootloader updaters for all boards"
895 @
$(ECHO
) " all_clean - Remove your build directory ($(BUILD_DIR))"
896 @
$(ECHO
) " all_flight_clean - Remove all firmware, bootloaders and bootloader updaters"
897 @
$(ECHO
) " all_fw_clean - Remove firmware for all boards"
898 @
$(ECHO
) " all_bl_clean - Remove bootloaders for all boards"
899 @
$(ECHO
) " all_bu_clean - Remove bootloader updaters for all boards"
901 @
$(ECHO
) " all_<board> - Build all available images for <board>"
902 @
$(ECHO
) " all_<board>_clean - Remove all available images for <board>"
904 @
$(ECHO
) " all_ut - Build all unit tests"
905 @
$(ECHO
) " all_ut_tap - Run all unit tests and capture all TAP output to files"
906 @
$(ECHO
) " all_ut_run - Run all unit tests and dump TAP output to console"
908 @
$(ECHO
) " [Firmware]"
909 @
$(ECHO
) " <board> - Build firmware for <board>"
910 @
$(ECHO
) " Supported boards are ($(ALL_BOARDS))"
911 @
$(ECHO
) " fw_<board> - Build firmware for <board>"
912 @
$(ECHO
) " Supported boards are ($(FW_BOARDS))"
913 @
$(ECHO
) " fw_<board>_clean - Remove firmware for <board>"
914 @
$(ECHO
) " fw_<board>_program - Use OpenOCD + JTAG to write firmware to <board>"
916 @
$(ECHO
) " [Bootloader]"
917 @
$(ECHO
) " bl_<board> - Build bootloader for <board>"
918 @
$(ECHO
) " Supported boards are ($(BL_BOARDS))"
919 @
$(ECHO
) " bl_<board>_clean - Remove bootloader for <board>"
920 @
$(ECHO
) " bl_<board>_program - Use OpenOCD + JTAG to write bootloader to <board>"
922 @
$(ECHO
) " [Entire Flash]"
923 @
$(ECHO
) " ef_<board> - Build entire flash image for <board>"
924 @
$(ECHO
) " Supported boards are ($(EF_BOARDS))"
925 @
$(ECHO
) " ef_<board>_clean - Remove entire flash image for <board>"
926 @
$(ECHO
) " ef_<board>_program - Use OpenOCD + JTAG to write entire flash image to <board>"
928 @
$(ECHO
) " [Bootloader Updater]"
929 @
$(ECHO
) " bu_<board> - Build bootloader updater for <board>"
930 @
$(ECHO
) " Supported boards are ($(BU_BOARDS))"
931 @
$(ECHO
) " bu_<board>_clean - Remove bootloader updater for <board>"
933 @
$(ECHO
) " [Unbrick a board]"
934 @
$(ECHO
) " unbrick_<board> - Use the STM32's built in boot ROM to write a bootloader to <board>"
935 @
$(ECHO
) " Supported boards are ($(BL_BOARDS))"
936 @
$(ECHO
) " [Unittests]"
937 @
$(ECHO
) " ut_<test> - Build unit test <test>"
938 @
$(ECHO
) " ut_<test>_xml - Run test and capture XML output into a file"
939 @
$(ECHO
) " ut_<test>_run - Run test and dump output to console"
941 @
$(ECHO
) " [Simulation]"
942 @
$(ECHO
) " sim_osx - Build OpenPilot simulation firmware for OSX"
943 @
$(ECHO
) " sim_osx_clean - Delete all build output for the osx simulation"
944 @
$(ECHO
) " sim_win32 - Build OpenPilot simulation firmware for Windows"
945 @
$(ECHO
) " using mingw and msys"
946 @
$(ECHO
) " sim_win32_clean - Delete all build output for the win32 simulation"
949 @
$(ECHO
) " gcs - Build the Ground Control System (GCS) application (debug|release)"
950 @
$(ECHO
) " Compile specific directory: MAKE_DIR=<dir>"
951 @
$(ECHO
) " Example: make gcs MAKE_DIR=src/plugins/coreplugin"
952 @
$(ECHO
) " gcs_qmake - Run qmake for the Ground Control System (GCS) application (debug|release)"
953 @
$(ECHO
) " gcs_clean - Remove the Ground Control System (GCS) application (debug|release)"
954 @
$(ECHO
) " Supported build configurations: GCS_BUILD_CONF=debug|release (default is $(GCS_BUILD_CONF))"
956 @
$(ECHO
) " [Uploader Tool]"
957 @
$(ECHO
) " uploader - Build the serial uploader tool (debug|release)"
958 @
$(ECHO
) " uploader_qmake - Run qmake for the serial uploader tool (debug|release)"
959 @
$(ECHO
) " uploader_clean - Remove the serial uploader tool (debug|release)"
960 @
$(ECHO
) " Supported build configurations: GCS_BUILD_CONF=debug|release (default is $(GCS_BUILD_CONF))"
963 @
$(ECHO
) " [UAVObjects]"
964 @
$(ECHO
) " uavobjects - Generate source files from the UAVObject definition XML files"
965 @
$(ECHO
) " uavobjects_test - Parse xml-files - check for valid, duplicate ObjId's, ..."
966 @
$(ECHO
) " uavobjects_<group> - Generate source files from a subset of the UAVObject definition XML files"
967 @
$(ECHO
) " Supported groups are ($(UAVOBJ_TARGETS))"
969 @
$(ECHO
) " [Packaging]"
970 @
$(ECHO
) " package - Build and package the OpenPilot platform-dependent package (no clean)"
971 @
$(ECHO
) " opfw_resource - Generate resources to embed firmware binaries into the GCS"
972 @
$(ECHO
) " dist - Generate source archive for distribution"
973 @
$(ECHO
) " install - Install GCS to \"DESTDIR\" with prefix \"prefix\" (Linux only)"
975 @
$(ECHO
) " [Code Formatting]"
976 @
$(ECHO
) " uncrustify_<source> - Reformat <source> code according to the project's standards"
977 @
$(ECHO
) " Supported sources are ($(UNCRUSTIFY_TARGETS))"
978 @
$(ECHO
) " uncrustify_all - Reformat all source code"
980 @
$(ECHO
) " [Code Documentation]"
981 @
$(ECHO
) " docs_<source> - Generate HTML documentation for <source>"
982 @
$(ECHO
) " Supported sources are ($(DOCS_TARGETS))"
983 @
$(ECHO
) " docs_all - Generate HTML documentation for all"
984 @
$(ECHO
) " docs_<source>_clean - Delete generated documentation for <source>"
985 @
$(ECHO
) " docs_all_clean - Delete all generated documentation"
987 @
$(ECHO
) " Hint: Add V=1 to your command line to see verbose build output."
989 @
$(ECHO
) " Notes: All tool distribution files will be downloaded into $(DL_DIR)"
990 @
$(ECHO
) " All tools will be installed into $(TOOLS_DIR)"
991 @
$(ECHO
) " All build output will be placed in $(BUILD_DIR)"
993 @
$(ECHO
) " Tool download and install directories can be changed using environment variables:"
994 @
$(ECHO
) " OPENPILOT_DL_DIR full path to downloads directory [downloads if not set]"
995 @
$(ECHO
) " OPENPILOT_TOOLS_DIR full path to installed tools directory [tools if not set]"
996 @
$(ECHO
) " More info: http://wiki.openpilot.org/display/Doc/OpenPilot+Build+System+Overview"