2013-03-11 20:54:36 +01:00
|
|
|
#
|
2015-08-12 14:02:29 +02:00
|
|
|
# Top level Makefile for the LibrePilot Project build system.
|
2015-07-31 11:20:09 +02:00
|
|
|
# Copyright (c) 2015, The LibrePilot Project, http://www.librepilot.org
|
2013-03-11 20:54:36 +01:00
|
|
|
# Copyright (c) 2010-2013, The OpenPilot Team, http://www.openpilot.org
|
2013-04-10 00:04:03 +02:00
|
|
|
# Use 'make help' for instructions.
|
2013-03-11 20:54:36 +01:00
|
|
|
#
|
|
|
|
# This program 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.
|
|
|
|
#
|
|
|
|
# This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#
|
|
|
|
|
2013-03-11 22:36:26 +01:00
|
|
|
# This top level Makefile passes down some variables to sub-makes through
|
|
|
|
# the environment. They are explicitly exported using the export keyword.
|
|
|
|
# Lower level makefiles assume that these variables are defined. To ensure
|
|
|
|
# that a special magic variable is exported here. It must be checked for
|
|
|
|
# existance by each sub-make.
|
2015-07-13 17:12:10 +02:00
|
|
|
export TOP_LEVEL_MAKEFILE := TRUE
|
2013-03-11 22:36:26 +01:00
|
|
|
|
2015-07-31 00:37:38 +02:00
|
|
|
# The root directory that this makefile resides in
|
|
|
|
export ROOT_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
|
|
|
|
|
|
|
|
# Include some helper functions
|
|
|
|
include $(ROOT_DIR)/make/functions.mk
|
|
|
|
|
2015-07-31 00:50:31 +02:00
|
|
|
# This file can be used to override default options using the "override" keyword
|
|
|
|
CONFIG_FILE := config
|
|
|
|
-include $(CONFIG_FILE)
|
|
|
|
|
|
|
|
##############################
|
2015-07-30 11:29:02 +02:00
|
|
|
# It is possible to set DL_DIR and/or TOOLS_DIR environment
|
2013-04-04 22:57:43 +02:00
|
|
|
# variables to override local tools download and installation directorys. So the
|
|
|
|
# same toolchains can be used for all working copies. Particularly useful for CI
|
|
|
|
# server build agents, but also for local installations.
|
2015-07-30 11:29:02 +02:00
|
|
|
override DL_DIR := $(if $(DL_DIR),$(call slashfix,$(DL_DIR)),$(ROOT_DIR)/downloads)
|
|
|
|
override TOOLS_DIR := $(if $(TOOLS_DIR),$(call slashfix,$(TOOLS_DIR)),$(ROOT_DIR)/tools)
|
|
|
|
export DL_DIR
|
|
|
|
export TOOLS_DIR
|
2013-03-11 20:54:36 +01:00
|
|
|
|
2015-07-31 00:50:31 +02:00
|
|
|
# Set up some macros for common directories within the tree
|
2015-08-02 17:01:14 +02:00
|
|
|
export BUILD_DIR := $(CURDIR)/build
|
|
|
|
export PACKAGE_DIR := $(BUILD_DIR)/package
|
|
|
|
export DIST_DIR := $(BUILD_DIR)/dist
|
|
|
|
export OPGCSSYNTHDIR := $(BUILD_DIR)/gcs-synthetics
|
2015-07-31 00:50:31 +02:00
|
|
|
|
2015-08-02 17:01:14 +02:00
|
|
|
DIRS := $(DL_DIR) $(TOOLS_DIR) $(BUILD_DIR) $(PACKAGE_DIR) $(DIST_DIR) $(OPGCSSYNTHDIR)
|
2015-04-01 04:06:04 +02:00
|
|
|
|
2015-05-18 19:03:11 +02:00
|
|
|
# Naming for binaries and packaging etc,.
|
2015-08-15 10:41:05 +02:00
|
|
|
export ORG_BIG_NAME := LibrePilot
|
2015-10-04 23:32:29 +02:00
|
|
|
GCS_LABEL := GCS
|
|
|
|
GCS_BIG_NAME := $(ORG_BIG_NAME) $(GCS_LABEL)
|
2015-05-18 19:03:11 +02:00
|
|
|
# These should be lowercase with no spaces
|
2015-08-15 10:41:05 +02:00
|
|
|
export ORG_SMALL_NAME := $(call smallify,$(ORG_BIG_NAME))
|
2015-07-31 00:50:31 +02:00
|
|
|
GCS_SMALL_NAME := $(call smallify,$(GCS_BIG_NAME))
|
2015-05-18 19:03:11 +02:00
|
|
|
|
2015-10-08 23:33:16 +02:00
|
|
|
WEBSITE_URL := http://librepilot.org
|
|
|
|
GIT_URL := https://bitbucket.org/librepilot/librepilot.git
|
|
|
|
GITWEB_URL := https://bitbucket.org/librepilot/librepilot
|
|
|
|
# Change this once the DNS is set to http://wiki.librepilot.org/
|
|
|
|
WIKI_URL_ROOT := https://librepilot.atlassian.net/wiki/display/LPDOC/
|
2015-09-18 07:46:36 +02:00
|
|
|
USAGETRACKER_URL := https://usagetracker.librepilot.org/
|
2015-09-16 22:59:42 +02:00
|
|
|
|
2015-10-08 23:33:16 +02:00
|
|
|
PACKAGING_EMAIL_ADDRESS := packaging@librepilot.org
|
|
|
|
|
|
|
|
define DESCRIPTION_SHORT :=
|
|
|
|
A ground control station and firmware for UAV flight controllers
|
|
|
|
endef
|
|
|
|
|
|
|
|
define DESCRIPTION_LONG :=
|
|
|
|
The LibrePilot open source project was founded in July 2015.
|
|
|
|
It focuses on research and development of software and hardware to be used in a variety of applications including vehicle control and stabilization, unmanned autonomous vehicles and robotics.
|
2016-04-01 23:23:21 +02:00
|
|
|
One of the project's primary goals is to provide an open and collaborative environment making it the ideal home for development of innovative ideas.
|
2015-10-08 23:33:16 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
2011-04-25 00:21:26 +02:00
|
|
|
# Clean out undesirable variables from the environment and command-line
|
|
|
|
# to remove the chance that they will cause problems with our build
|
|
|
|
define SANITIZE_VAR
|
|
|
|
$(if $(filter-out undefined,$(origin $(1))),
|
2013-03-31 16:57:25 +02:00
|
|
|
$(info $(EMPTY) NOTE Sanitized $(2) variable '$(1)' from $(origin $(1)))
|
2013-03-11 20:54:36 +01:00
|
|
|
MAKEOVERRIDES = $(filter-out $(1)=%,$(MAKEOVERRIDES))
|
|
|
|
override $(1) :=
|
|
|
|
unexport $(1)
|
2011-04-25 00:21:26 +02:00
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
2014-10-29 04:20:48 +01:00
|
|
|
# These specific variables can influence compilation in unexpected (and undesirable) ways
|
|
|
|
# gcc flags
|
2011-04-25 00:21:26 +02:00
|
|
|
SANITIZE_GCC_VARS := TMPDIR GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH
|
2014-10-29 04:20:48 +01:00
|
|
|
# preprocessor flags
|
|
|
|
SANITIZE_GCC_VARS += CPATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH OBJC_INCLUDE_PATH DEPENDENCIES_OUTPUT
|
|
|
|
# make flags
|
2014-10-29 06:11:13 +01:00
|
|
|
SANITIZE_GCC_VARS += CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LDLIBS
|
2011-04-25 00:21:26 +02:00
|
|
|
$(foreach var, $(SANITIZE_GCC_VARS), $(eval $(call SANITIZE_VAR,$(var),disallowed)))
|
|
|
|
|
|
|
|
# These specific variables used to be valid but now they make no sense
|
2013-04-12 16:03:32 +02:00
|
|
|
SANITIZE_DEPRECATED_VARS := USE_BOOTLOADER CLEAN_BUILD
|
2011-04-25 00:21:26 +02:00
|
|
|
$(foreach var, $(SANITIZE_DEPRECATED_VARS), $(eval $(call SANITIZE_VAR,$(var),deprecated)))
|
|
|
|
|
2012-11-28 04:43:02 +01:00
|
|
|
# Decide on a verbosity level based on the V= parameter
|
|
|
|
export AT := @
|
|
|
|
ifndef V
|
2013-03-11 20:54:36 +01:00
|
|
|
export V0 :=
|
|
|
|
export V1 := $(AT)
|
2012-11-28 04:43:02 +01:00
|
|
|
else ifeq ($(V), 0)
|
2013-03-11 20:54:36 +01:00
|
|
|
export V0 := $(AT)
|
|
|
|
export V1 := $(AT)
|
2012-11-28 04:43:02 +01:00
|
|
|
else ifeq ($(V), 1)
|
|
|
|
endif
|
|
|
|
|
2015-11-25 17:06:17 +01:00
|
|
|
ARCH := $(call get_arch)
|
|
|
|
|
2013-03-11 20:54:36 +01:00
|
|
|
# Include tools installers
|
2012-11-28 04:43:02 +01:00
|
|
|
include $(ROOT_DIR)/make/tools.mk
|
|
|
|
|
2015-04-09 21:11:15 +02:00
|
|
|
# Include third party builders if available
|
|
|
|
-include $(ROOT_DIR)/make/3rdparty/3rdparty.mk
|
2015-04-05 18:51:56 +02:00
|
|
|
|
2013-03-11 20:54:36 +01:00
|
|
|
# We almost need to consider autoconf/automake instead of this
|
|
|
|
ifeq ($(UNAME), Linux)
|
2015-07-31 00:50:31 +02:00
|
|
|
UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator
|
2013-03-11 20:54:36 +01:00
|
|
|
else ifeq ($(UNAME), Darwin)
|
2015-07-31 00:50:31 +02:00
|
|
|
UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator
|
2013-04-10 00:04:03 +02:00
|
|
|
else ifeq ($(UNAME), Windows)
|
2015-07-31 00:50:31 +02:00
|
|
|
UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator.exe
|
2013-03-11 20:54:36 +01:00
|
|
|
endif
|
|
|
|
|
2015-08-02 17:01:14 +02:00
|
|
|
export UAVOBJGENERATOR
|
|
|
|
|
2016-01-16 00:41:09 +01:00
|
|
|
# Set up default build configurations (debug | release)
|
|
|
|
GCS_BUILD_CONF := release
|
|
|
|
|
2016-01-27 08:54:45 +01:00
|
|
|
# Set extra configuration
|
|
|
|
GCS_EXTRA_CONF += osg copy_osg
|
2016-03-20 18:11:20 +01:00
|
|
|
ifeq ($(UNAME), Windows)
|
|
|
|
GCS_EXTRA_CONF += osgearth
|
|
|
|
endif
|
2016-01-16 00:41:09 +01:00
|
|
|
|
2015-08-02 17:01:14 +02:00
|
|
|
##############################
|
2013-03-11 20:54:36 +01:00
|
|
|
#
|
|
|
|
# All targets
|
|
|
|
#
|
|
|
|
##############################
|
2011-02-23 05:18:56 +01:00
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: uavobjects all_ground all_flight
|
|
|
|
|
|
|
|
.PHONY: all_clean
|
|
|
|
all_clean:
|
2013-04-29 11:11:32 +02:00
|
|
|
@$(ECHO) " CLEAN $(call toprel, $(BUILD_DIR))"
|
|
|
|
$(V1) [ ! -d "$(BUILD_DIR)" ] || $(RM) -rf "$(BUILD_DIR)"
|
2011-02-23 05:18:56 +01:00
|
|
|
|
2015-07-25 09:14:43 +02:00
|
|
|
.PHONY: clean
|
2015-01-29 21:42:07 +01:00
|
|
|
clean: all_clean
|
|
|
|
|
2015-01-30 22:56:17 +01:00
|
|
|
|
2011-02-23 05:18:56 +01:00
|
|
|
##############################
|
|
|
|
#
|
2013-03-11 20:54:36 +01:00
|
|
|
# UAVObjects
|
2011-02-23 05:18:56 +01:00
|
|
|
#
|
|
|
|
##############################
|
|
|
|
|
2015-07-31 00:50:31 +02:00
|
|
|
UAVOBJGENERATOR_DIR := $(BUILD_DIR)/uavobjgenerator
|
2015-04-01 04:06:04 +02:00
|
|
|
DIRS += $(UAVOBJGENERATOR_DIR)
|
|
|
|
|
2013-03-11 20:54:36 +01:00
|
|
|
.PHONY: uavobjgenerator
|
2015-09-30 18:51:40 +02:00
|
|
|
uavobjgenerator: $(UAVOBJGENERATOR)
|
|
|
|
|
|
|
|
$(UAVOBJGENERATOR): | $(UAVOBJGENERATOR_DIR)
|
2015-04-20 23:20:13 +02:00
|
|
|
$(V1) cd $(UAVOBJGENERATOR_DIR) && \
|
2015-05-10 11:25:50 +02:00
|
|
|
( [ -f Makefile ] || $(QMAKE) $(ROOT_DIR)/ground/uavobjgenerator/uavobjgenerator.pro \
|
2016-01-16 00:12:26 +01:00
|
|
|
CONFIG+='$(GCS_BUILD_CONF) $(GCS_EXTRA_CONF)' ) && \
|
2015-04-20 23:20:13 +02:00
|
|
|
$(MAKE) --no-print-directory -w
|
2011-02-23 05:18:56 +01:00
|
|
|
|
2013-03-11 20:54:36 +01:00
|
|
|
UAVOBJ_TARGETS := gcs flight python matlab java wireshark
|
2011-02-23 05:18:56 +01:00
|
|
|
|
2013-03-11 20:54:36 +01:00
|
|
|
.PHONY: uavobjects
|
|
|
|
uavobjects: $(addprefix uavobjects_, $(UAVOBJ_TARGETS))
|
|
|
|
|
|
|
|
UAVOBJ_XML_DIR := $(ROOT_DIR)/shared/uavobjectdefinition
|
|
|
|
UAVOBJ_OUT_DIR := $(BUILD_DIR)/uavobject-synthetics
|
|
|
|
|
2015-09-30 18:51:40 +02:00
|
|
|
uavobjects_%: $(UAVOBJGENERATOR)
|
2015-04-24 06:18:24 +02:00
|
|
|
@$(MKDIR) -p $(UAVOBJ_OUT_DIR)/$*
|
|
|
|
$(V1) ( cd $(UAVOBJ_OUT_DIR)/$* && \
|
2013-03-11 20:54:36 +01:00
|
|
|
$(UAVOBJGENERATOR) -$* $(UAVOBJ_XML_DIR) $(ROOT_DIR) ; \
|
|
|
|
)
|
|
|
|
|
2015-09-30 18:51:40 +02:00
|
|
|
uavobjects_test: $(UAVOBJGENERATOR)
|
2015-04-24 06:18:24 +02:00
|
|
|
$(V1) $(UAVOBJGENERATOR) -v $(UAVOBJ_XML_DIR) $(ROOT_DIR)
|
2013-03-11 20:54:36 +01:00
|
|
|
|
|
|
|
uavobjects_clean:
|
2013-04-29 11:11:32 +02:00
|
|
|
@$(ECHO) " CLEAN $(call toprel, $(UAVOBJ_OUT_DIR))"
|
2013-03-11 20:54:36 +01:00
|
|
|
$(V1) [ ! -d "$(UAVOBJ_OUT_DIR)" ] || $(RM) -r "$(UAVOBJ_OUT_DIR)"
|
2012-10-06 00:47:10 +02:00
|
|
|
|
2011-02-23 05:18:56 +01:00
|
|
|
##############################
|
|
|
|
#
|
|
|
|
# Flight related components
|
|
|
|
#
|
|
|
|
##############################
|
|
|
|
|
2013-03-18 19:24:50 +01:00
|
|
|
|
|
|
|
# When building any of the "all_*" targets, tell all sub makefiles to display
|
|
|
|
# additional details on each line of output to describe which build and target
|
2013-03-21 20:28:44 +01:00
|
|
|
# that each line applies to. The same applies also to all, opfw_resource,
|
2015-01-29 21:47:48 +01:00
|
|
|
# package targets
|
|
|
|
ifneq ($(strip $(filter all_% all opfw_resource package,$(MAKECMDGOALS))),)
|
2013-03-18 19:24:50 +01:00
|
|
|
export ENABLE_MSG_EXTRA := yes
|
|
|
|
endif
|
|
|
|
|
|
|
|
# When building more than one goal in a single make invocation, also
|
|
|
|
# enable the extra context for each output line
|
|
|
|
ifneq ($(word 2,$(MAKECMDGOALS)),)
|
|
|
|
export ENABLE_MSG_EXTRA := yes
|
|
|
|
endif
|
|
|
|
|
2015-08-02 17:01:14 +02:00
|
|
|
FLIGHT_OUT_DIR := $(BUILD_DIR)/firmware
|
|
|
|
DIRS += $(FLIGHT_OUT_DIR)
|
2011-02-23 05:19:02 +01:00
|
|
|
|
2016-05-07 11:05:34 +02:00
|
|
|
# Might not be here in source package
|
|
|
|
-include $(ROOT_DIR)/flight/Makefile
|
2012-12-14 06:25:02 +01:00
|
|
|
|
2013-03-18 19:24:50 +01:00
|
|
|
##############################
|
|
|
|
#
|
|
|
|
# GCS related components
|
|
|
|
#
|
|
|
|
##############################
|
|
|
|
|
|
|
|
.PHONY: all_ground
|
2015-08-02 20:20:02 +02:00
|
|
|
all_ground: gcs uploader
|
2013-03-18 19:24:50 +01:00
|
|
|
|
2016-01-16 00:12:26 +01:00
|
|
|
ifneq ($(V), 1)
|
|
|
|
GCS_EXTRA_CONF += silent
|
2013-03-18 19:24:50 +01:00
|
|
|
endif
|
|
|
|
|
2015-08-02 20:20:02 +02:00
|
|
|
GCS_DIR := $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)
|
|
|
|
DIRS += $(GCS_DIR)
|
2015-04-01 04:06:04 +02:00
|
|
|
|
2015-08-02 20:20:02 +02:00
|
|
|
GCS_MAKEFILE := $(GCS_DIR)/Makefile
|
2015-04-01 22:26:37 +02:00
|
|
|
|
2015-08-02 20:20:02 +02:00
|
|
|
.PHONY: gcs_qmake
|
|
|
|
gcs_qmake $(GCS_MAKEFILE): | $(GCS_DIR)
|
|
|
|
$(V1) cd $(GCS_DIR) && \
|
|
|
|
$(QMAKE) $(ROOT_DIR)/ground/gcs/gcs.pro \
|
2016-01-16 00:12:26 +01:00
|
|
|
-r CONFIG+='$(GCS_BUILD_CONF) $(GCS_EXTRA_CONF)' \
|
2015-07-12 18:23:18 +02:00
|
|
|
'GCS_BIG_NAME="$(GCS_BIG_NAME)"' GCS_SMALL_NAME=$(GCS_SMALL_NAME) \
|
|
|
|
'ORG_BIG_NAME="$(ORG_BIG_NAME)"' ORG_SMALL_NAME=$(ORG_SMALL_NAME) \
|
2015-08-20 07:04:10 +02:00
|
|
|
'WIKI_URL_ROOT="$(WIKI_URL_ROOT)"' \
|
2015-09-18 07:46:36 +02:00
|
|
|
'USAGETRACKER_URL="$(USAGETRACKER_URL)"' \
|
2015-07-26 22:30:41 +02:00
|
|
|
'GCS_LIBRARY_BASENAME=$(libbasename)' \
|
2015-07-12 18:23:18 +02:00
|
|
|
$(GCS_QMAKE_OPTS)
|
2014-02-17 22:29:16 +01:00
|
|
|
|
2015-08-02 20:20:02 +02:00
|
|
|
.PHONY: gcs
|
2015-09-30 18:51:40 +02:00
|
|
|
gcs: $(UAVOBJGENERATOR) $(GCS_MAKEFILE)
|
2015-08-02 20:20:02 +02:00
|
|
|
$(V1) $(MAKE) -w -C $(GCS_DIR)/$(MAKE_DIR);
|
2013-03-18 19:24:50 +01:00
|
|
|
|
2015-08-02 20:20:02 +02:00
|
|
|
.PHONY: gcs_clean
|
|
|
|
gcs_clean:
|
|
|
|
@$(ECHO) " CLEAN $(call toprel, $(GCS_DIR))"
|
|
|
|
$(V1) [ ! -d "$(GCS_DIR)" ] || $(RM) -r "$(GCS_DIR)"
|
2013-03-18 19:24:50 +01:00
|
|
|
|
2015-04-05 18:51:56 +02:00
|
|
|
|
|
|
|
|
2014-09-07 23:01:20 +02:00
|
|
|
################################
|
|
|
|
#
|
|
|
|
# Serial Uploader tool
|
|
|
|
#
|
|
|
|
################################
|
|
|
|
|
2015-04-01 04:06:04 +02:00
|
|
|
UPLOADER_DIR := $(BUILD_DIR)/uploader_$(GCS_BUILD_CONF)
|
|
|
|
DIRS += $(UPLOADER_DIR)
|
|
|
|
|
2015-04-01 22:26:37 +02:00
|
|
|
UPLOADER_MAKEFILE := $(UPLOADER_DIR)/Makefile
|
|
|
|
|
2014-09-07 23:01:20 +02:00
|
|
|
.PHONY: uploader_qmake
|
2015-04-01 22:26:37 +02:00
|
|
|
uploader_qmake $(UPLOADER_MAKEFILE): | $(UPLOADER_DIR)
|
2015-04-20 23:20:13 +02:00
|
|
|
$(V1) cd $(UPLOADER_DIR) && \
|
2015-08-02 20:20:02 +02:00
|
|
|
$(QMAKE) $(ROOT_DIR)/ground/gcs/src/experimental/USB_UPLOAD_TOOL/upload.pro \
|
2016-01-16 00:12:26 +01:00
|
|
|
-r CONFIG+='$(GCS_BUILD_CONF) $(GCS_EXTRA_CONF)' $(GCS_QMAKE_OPTS)
|
2014-09-07 23:01:20 +02:00
|
|
|
|
2015-04-01 22:26:37 +02:00
|
|
|
.PHONY: uploader
|
|
|
|
uploader: $(UPLOADER_MAKEFILE)
|
2015-04-01 04:06:04 +02:00
|
|
|
$(V1) $(MAKE) -w -C $(UPLOADER_DIR)
|
2014-09-07 23:01:20 +02:00
|
|
|
|
|
|
|
.PHONY: uploader_clean
|
|
|
|
uploader_clean:
|
2015-04-01 04:06:04 +02:00
|
|
|
@$(ECHO) " CLEAN $(call toprel, $(UPLOADER_DIR))"
|
|
|
|
$(V1) [ ! -d "$(UPLOADER_DIR)" ] || $(RM) -r "$(UPLOADER_DIR)"
|
2014-09-07 23:01:20 +02:00
|
|
|
|
|
|
|
|
2013-03-18 19:24:50 +01:00
|
|
|
|
2011-05-19 00:57:35 +02:00
|
|
|
##############################
|
|
|
|
#
|
2011-05-28 02:14:51 +02:00
|
|
|
# Packaging components
|
2011-05-19 00:57:35 +02:00
|
|
|
#
|
|
|
|
##############################
|
2013-03-23 22:24:15 +01:00
|
|
|
# Firmware files to package
|
2015-09-18 09:33:06 +02:00
|
|
|
PACKAGE_FW_TARGETS := fw_coptercontrol fw_oplinkmini fw_revolution fw_osd fw_revoproto fw_gpsplatinum fw_revonano fw_sparky2
|
2013-03-23 22:24:15 +01:00
|
|
|
|
2013-03-19 16:52:24 +01:00
|
|
|
# Rules to generate GCS resources used to embed firmware binaries into the GCS.
|
|
|
|
# They are used later by the vehicle setup wizard to update board firmware.
|
|
|
|
# To open a firmware image use ":/firmware/fw_coptercontrol.opfw"
|
2013-03-30 16:33:38 +01:00
|
|
|
OPFW_RESOURCE := $(OPGCSSYNTHDIR)/opfw_resource.qrc
|
2015-08-20 01:15:07 +02:00
|
|
|
|
|
|
|
ifeq ($(WITH_PREBUILT_FW),)
|
|
|
|
FIRMWARE_DIR := $(FLIGHT_OUT_DIR)
|
|
|
|
# We need to build the FW targets
|
|
|
|
$(OPFW_RESOURCE): $(PACKAGE_FW_TARGETS)
|
|
|
|
else
|
|
|
|
FIRMWARE_DIR := $(WITH_PREBUILT_FW)
|
|
|
|
endif
|
|
|
|
|
|
|
|
OPFW_FILES := $(foreach fw_targ, $(PACKAGE_FW_TARGETS), $(FIRMWARE_DIR)/$(fw_targ)/$(fw_targ).opfw)
|
2013-03-19 16:52:24 +01:00
|
|
|
OPFW_CONTENTS := \
|
|
|
|
<!DOCTYPE RCC><RCC version="1.0"> \
|
|
|
|
<qresource prefix="/firmware"> \
|
2016-01-10 19:15:41 +01:00
|
|
|
$(foreach fw_file, $(OPFW_FILES), <file alias="$(notdir $(fw_file))">$(call system_path,$(fw_file))</file>) \
|
2013-03-19 16:52:24 +01:00
|
|
|
</qresource> \
|
|
|
|
</RCC>
|
|
|
|
|
|
|
|
.PHONY: opfw_resource
|
|
|
|
opfw_resource: $(OPFW_RESOURCE)
|
|
|
|
|
2015-08-20 01:15:07 +02:00
|
|
|
$(OPFW_RESOURCE): | $(OPGCSSYNTHDIR)
|
2013-03-19 16:52:24 +01:00
|
|
|
@$(ECHO) Generating OPFW resource file $(call toprel, $@)
|
|
|
|
$(V1) $(ECHO) $(QUOTE)$(OPFW_CONTENTS)$(QUOTE) > $@
|
|
|
|
|
2013-04-10 09:01:03 +02:00
|
|
|
# If opfw_resource or all firmware are requested, GCS should depend on the resource
|
2015-01-30 22:14:46 +01:00
|
|
|
ifneq ($(strip $(filter opfw_resource all all_fw all_flight package,$(MAKECMDGOALS))),)
|
2015-08-02 20:20:02 +02:00
|
|
|
$(GCS_MAKEFILE): $(OPFW_RESOURCE)
|
2013-03-21 22:11:30 +01:00
|
|
|
endif
|
|
|
|
|
2015-01-29 21:47:48 +01:00
|
|
|
# Packaging targets: package
|
2013-03-21 20:28:44 +01:00
|
|
|
# - builds all firmware, opfw_resource, gcs
|
|
|
|
# - copies firmware into a package directory
|
|
|
|
# - calls paltform-specific packaging script
|
|
|
|
|
2015-01-30 22:14:46 +01:00
|
|
|
# Define some variables
|
2015-02-10 06:37:35 +01:00
|
|
|
PACKAGE_LBL := $(shell $(VERSION_INFO) --format=\$${LABEL})
|
2015-07-12 18:15:53 +02:00
|
|
|
PACKAGE_NAME := $(subst $(SPACE),,$(ORG_BIG_NAME))
|
2015-02-10 06:37:35 +01:00
|
|
|
PACKAGE_SEP := -
|
|
|
|
PACKAGE_FULL_NAME := $(PACKAGE_NAME)$(PACKAGE_SEP)$(PACKAGE_LBL)
|
|
|
|
|
2015-03-17 22:18:04 +01:00
|
|
|
# Source distribution is never dirty because it uses git archive
|
2015-08-18 23:58:48 +02:00
|
|
|
DIST_LBL := $(subst -dirty,,$(PACKAGE_LBL))
|
|
|
|
DIST_NAME := $(PACKAGE_NAME)$(PACKAGE_SEP)$(DIST_LBL)
|
|
|
|
DIST_TAR := $(DIST_DIR)/$(DIST_NAME).tar
|
|
|
|
DIST_TAR_GZ := $(DIST_TAR).gz
|
|
|
|
FW_DIST_NAME := $(DIST_NAME)_firmware
|
|
|
|
FW_DIST_TAR := $(DIST_DIR)/$(FW_DIST_NAME).tar
|
|
|
|
FW_DIST_TAR_GZ := $(FW_DIST_TAR).gz
|
|
|
|
DIST_VER_INFO := $(DIST_DIR)/version-info.json
|
2013-02-04 14:56:11 +01:00
|
|
|
|
2015-06-25 18:30:01 +02:00
|
|
|
include $(ROOT_DIR)/package/$(UNAME).mk
|
|
|
|
|
2015-07-29 20:55:47 +02:00
|
|
|
##############################
|
|
|
|
#
|
|
|
|
# Source for distribution
|
|
|
|
#
|
|
|
|
##############################
|
2016-05-14 19:25:22 +02:00
|
|
|
FORCE:
|
|
|
|
|
|
|
|
$(DIST_VER_INFO): FORCE | $(DIST_DIR)
|
2015-07-29 20:55:47 +02:00
|
|
|
$(V1) $(VERSION_INFO) --jsonpath="$(DIST_DIR)"
|
|
|
|
|
2016-05-14 19:25:22 +02:00
|
|
|
$(DIST_TAR): $(DIST_VER_INFO) | $(DIST_DIR)
|
2015-07-29 20:55:47 +02:00
|
|
|
@$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_TAR))"
|
|
|
|
$(V1) git archive --prefix="$(PACKAGE_NAME)/" -o "$(DIST_TAR)" HEAD
|
|
|
|
$(V1) tar --append --file="$(DIST_TAR)" \
|
2016-04-27 22:15:33 +02:00
|
|
|
--owner=root --group=root --mtime="`git show -s --format=%ci`" \
|
2015-07-29 20:55:47 +02:00
|
|
|
--transform='s,.*version-info.json,$(PACKAGE_NAME)/version-info.json,' \
|
|
|
|
$(call toprel, "$(DIST_VER_INFO)")
|
|
|
|
|
|
|
|
$(DIST_TAR_GZ): $(DIST_TAR)
|
|
|
|
@$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_TAR_GZ))"
|
2016-04-27 22:15:33 +02:00
|
|
|
$(V1) gzip -knf "$(DIST_TAR)"
|
2015-07-29 20:55:47 +02:00
|
|
|
|
|
|
|
.PHONY: dist_tar_gz
|
|
|
|
dist_tar_gz: $(DIST_TAR_GZ)
|
|
|
|
|
|
|
|
.PHONY: dist
|
|
|
|
dist: dist_tar_gz
|
|
|
|
|
|
|
|
|
2015-08-18 23:58:48 +02:00
|
|
|
$(FW_DIST_TAR): $(PACKAGE_FW_TARGETS) | $(DIST_DIR)
|
|
|
|
@$(ECHO) " FIRMWARE FOR DISTRIBUTION $(call toprel, $(FW_DIST_TAR))"
|
2015-08-20 01:15:07 +02:00
|
|
|
$(V1) tar -c --file="$(FW_DIST_TAR)" --directory=$(FLIGHT_OUT_DIR) \
|
2016-04-27 22:15:33 +02:00
|
|
|
--owner=root --group=root --mtime="`git show -s --format=%ci`" \
|
2015-08-18 23:58:48 +02:00
|
|
|
--transform='s,^,firmware/,' \
|
|
|
|
$(foreach fw_targ,$(PACKAGE_FW_TARGETS),$(fw_targ)/$(fw_targ).opfw)
|
|
|
|
|
|
|
|
$(FW_DIST_TAR_GZ): $(FW_DIST_TAR)
|
|
|
|
@$(ECHO) " FIRMWARE FOR DISTRIBUTION $(call toprel, $(FW_DIST_TAR_GZ))"
|
2016-04-27 22:15:33 +02:00
|
|
|
$(V1) gzip -knf "$(FW_DIST_TAR)"
|
2015-08-18 23:58:48 +02:00
|
|
|
|
|
|
|
.PHONY: fw_dist_tar_gz
|
|
|
|
fw_dist_tar_gz: $(FW_DIST_TAR_GZ)
|
|
|
|
|
|
|
|
.PHONY: fw_dist
|
|
|
|
fw_dist: fw_dist_tar_gz
|
|
|
|
|
|
|
|
|
2013-04-22 01:43:53 +02:00
|
|
|
##############################
|
|
|
|
#
|
|
|
|
# Source code formatting
|
|
|
|
#
|
|
|
|
##############################
|
|
|
|
|
2013-04-29 10:51:39 +02:00
|
|
|
UNCRUSTIFY_TARGETS := flight ground
|
|
|
|
|
2013-04-22 01:43:53 +02:00
|
|
|
# $(1) = Uncrustify target (e.g flight or ground)
|
|
|
|
# $(2) = Target root directory
|
|
|
|
define UNCRUSTIFY_TEMPLATE
|
|
|
|
|
|
|
|
.PHONY: uncrustify_$(1)
|
|
|
|
uncrustify_$(1):
|
|
|
|
@$(ECHO) "Auto-formatting $(1) source code"
|
2013-04-24 21:49:17 +02:00
|
|
|
$(V1) UNCRUSTIFY_CONFIG="$(ROOT_DIR)/make/uncrustify/uncrustify.cfg" $(SHELL) make/scripts/uncrustify.sh $(call toprel, $(2))
|
2013-04-22 01:43:53 +02:00
|
|
|
endef
|
|
|
|
|
2013-04-29 10:51:39 +02:00
|
|
|
$(foreach uncrustify_targ, $(UNCRUSTIFY_TARGETS), $(eval $(call UNCRUSTIFY_TEMPLATE,$(uncrustify_targ),$(ROOT_DIR)/$(uncrustify_targ))))
|
2013-04-22 01:43:53 +02:00
|
|
|
|
|
|
|
.PHONY: uncrustify_all
|
2013-04-29 10:51:39 +02:00
|
|
|
uncrustify_all: $(addprefix uncrustify_,$(UNCRUSTIFY_TARGETS))
|
2013-04-22 01:43:53 +02:00
|
|
|
|
2013-04-29 02:02:29 +02:00
|
|
|
##############################
|
|
|
|
#
|
|
|
|
# Doxygen documentation
|
|
|
|
#
|
|
|
|
# Each target should have own Doxyfile.$(target) with build directory build/docs/$(target),
|
|
|
|
# proper source directory (e.g. $(target)) and appropriate other doxygen options.
|
|
|
|
#
|
|
|
|
##############################
|
|
|
|
|
2013-04-29 10:51:39 +02:00
|
|
|
DOCS_TARGETS := flight ground uavobjects
|
|
|
|
|
2013-04-29 02:02:29 +02:00
|
|
|
# $(1) = Doxygen target (e.g flight or ground)
|
|
|
|
define DOXYGEN_TEMPLATE
|
|
|
|
|
|
|
|
.PHONY: docs_$(1)
|
|
|
|
docs_$(1): docs_$(1)_clean
|
|
|
|
@$(ECHO) "Generating $(1) documentation"
|
|
|
|
$(V1) $(MKDIR) -p $(BUILD_DIR)/docs/$(1)
|
|
|
|
$(V1) $(DOXYGEN) $(ROOT_DIR)/make/doxygen/Doxyfile.$(1)
|
|
|
|
|
|
|
|
.PHONY: docs_$(1)_clean
|
|
|
|
docs_$(1)_clean:
|
|
|
|
@$(ECHO) " CLEAN $(call toprel, $(BUILD_DIR)/docs/$(1))"
|
|
|
|
$(V1) [ ! -d "$(BUILD_DIR)/docs/$(1)" ] || $(RM) -r "$(BUILD_DIR)/docs/$(1)"
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2013-04-29 10:51:39 +02:00
|
|
|
$(foreach docs_targ, $(DOCS_TARGETS), $(eval $(call DOXYGEN_TEMPLATE,$(docs_targ))))
|
2013-04-29 02:02:29 +02:00
|
|
|
|
|
|
|
.PHONY: docs_all
|
2013-04-29 10:51:39 +02:00
|
|
|
docs_all: $(addprefix docs_,$(DOCS_TARGETS))
|
2013-04-29 02:02:29 +02:00
|
|
|
|
|
|
|
.PHONY: docs_all_clean
|
2013-04-29 10:51:39 +02:00
|
|
|
docs_all_clean:
|
2013-04-29 11:11:32 +02:00
|
|
|
@$(ECHO) " CLEAN $(call toprel, $(BUILD_DIR)/docs)"
|
|
|
|
$(V1) [ ! -d "$(BUILD_DIR)/docs" ] || $(RM) -rf "$(BUILD_DIR)/docs"
|
2013-04-29 02:02:29 +02:00
|
|
|
|
2013-03-11 20:54:36 +01:00
|
|
|
##############################
|
|
|
|
#
|
|
|
|
# Build info
|
|
|
|
#
|
|
|
|
##############################
|
|
|
|
|
2013-02-04 14:56:11 +01:00
|
|
|
.PHONY: build-info
|
2015-04-01 04:06:04 +02:00
|
|
|
build-info: | $(BUILD_DIR)
|
2013-04-30 22:23:57 +02:00
|
|
|
@$(ECHO) " BUILD-INFO $(call toprel, $(BUILD_DIR)/$@.txt)"
|
2013-03-11 20:54:36 +01:00
|
|
|
$(V1) $(VERSION_INFO) \
|
2013-02-04 14:56:11 +01:00
|
|
|
--uavodir=$(ROOT_DIR)/shared/uavobjectdefinition \
|
|
|
|
--template="make/templates/$@.txt" \
|
|
|
|
--outfile="$(BUILD_DIR)/$@.txt"
|
2013-03-11 20:54:36 +01:00
|
|
|
|
2015-07-18 16:22:58 +02:00
|
|
|
##############################
|
|
|
|
#
|
|
|
|
# Config
|
|
|
|
#
|
|
|
|
##############################
|
|
|
|
|
2016-05-06 23:30:23 +02:00
|
|
|
CONFIG_OPTS := $(subst \$(SPACE),%SPACE_PLACEHOLDER%,$(MAKEOVERRIDES))
|
|
|
|
CONFIG_OPTS := $(addprefix override%SPACE_PLACEHOLDER%,$(CONFIG_OPTS))
|
|
|
|
CONFIG_OPTS := $(subst $(SPACE),\n,$(CONFIG_OPTS))\n
|
|
|
|
CONFIG_OPTS := $(subst %SPACE_PLACEHOLDER%,$(SPACE),$(CONFIG_OPTS))
|
2015-07-18 16:22:58 +02:00
|
|
|
|
|
|
|
.PHONY: config_new
|
|
|
|
config_new:
|
2015-07-31 00:50:31 +02:00
|
|
|
@printf '$(CONFIG_OPTS)' > $(CONFIG_FILE)
|
2015-07-18 16:22:58 +02:00
|
|
|
|
|
|
|
.PHONY: config_append
|
|
|
|
config_append:
|
2015-07-31 00:50:31 +02:00
|
|
|
@printf '$(CONFIG_OPTS)' >> $(CONFIG_FILE)
|
2015-07-18 16:22:58 +02:00
|
|
|
|
2015-07-22 00:21:21 +02:00
|
|
|
.PHONY: config_show
|
|
|
|
config_show:
|
|
|
|
@cat $(CONFIG_FILE)
|
|
|
|
|
2015-07-18 16:22:58 +02:00
|
|
|
.PHONY: config_clean
|
|
|
|
config_clean:
|
|
|
|
rm -f $(CONFIG_FILE)
|
|
|
|
|
|
|
|
|
2015-04-01 04:06:04 +02:00
|
|
|
##############################
|
|
|
|
#
|
|
|
|
# Directories
|
|
|
|
#
|
|
|
|
##############################
|
|
|
|
|
|
|
|
$(DIRS):
|
|
|
|
$(V1) $(MKDIR) -p $@
|
|
|
|
|
|
|
|
|
2013-03-11 20:54:36 +01:00
|
|
|
##############################
|
|
|
|
#
|
|
|
|
# Help message, the default Makefile goal
|
|
|
|
#
|
|
|
|
##############################
|
|
|
|
|
2013-04-04 23:42:56 +02:00
|
|
|
.DEFAULT_GOAL := help
|
|
|
|
|
2013-03-11 20:54:36 +01:00
|
|
|
.PHONY: help
|
|
|
|
help:
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " This Makefile is known to work on Linux and Mac in a standard shell environment."
|
2013-05-01 21:44:11 +02:00
|
|
|
@$(ECHO) " It also works on Windows by following the instructions given on this wiki page:"
|
2015-10-02 21:08:13 +02:00
|
|
|
@$(ECHO) " $(WIKI_ROOT_URL)Windows+Building+and+Packaging"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " Here is a summary of the available targets:"
|
|
|
|
@$(ECHO)
|
2014-01-13 12:24:23 +01:00
|
|
|
@$(ECHO) " [Source tree preparation]"
|
2014-01-15 11:19:35 +01:00
|
|
|
@$(ECHO) " prepare - Install GIT commit message template"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " [Tool Installers]"
|
|
|
|
@$(ECHO) " arm_sdk_install - Install the GNU ARM gcc toolchain"
|
2013-04-10 00:04:03 +02:00
|
|
|
@$(ECHO) " qt_sdk_install - Install the QT development tools"
|
2013-05-01 21:44:11 +02:00
|
|
|
@$(ECHO) " nsis_install - Install the NSIS Unicode (Windows only)"
|
2014-07-04 17:21:39 +02:00
|
|
|
@$(ECHO) " mesawin_install - Install the OpenGL32 DLL (Windows only)"
|
2013-04-22 01:43:53 +02:00
|
|
|
@$(ECHO) " uncrustify_install - Install the Uncrustify source code beautifier"
|
2013-05-01 21:44:11 +02:00
|
|
|
@$(ECHO) " doxygen_install - Install the Doxygen documentation generator"
|
2013-05-03 12:39:33 +02:00
|
|
|
@$(ECHO) " gtest_install - Install the GoogleTest framework"
|
2015-07-28 07:30:45 +02:00
|
|
|
@$(ECHO) " ccache_install - Install ccache"
|
2013-05-01 21:44:11 +02:00
|
|
|
@$(ECHO) " These targets are not updated yet and are probably broken:"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " openocd_install - Install the OpenOCD JTAG daemon"
|
2013-03-19 17:20:09 +01:00
|
|
|
@$(ECHO) " stm32flash_install - Install the stm32flash tool for unbricking F1-based boards"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " dfuutil_install - Install the dfu-util tool for unbricking F4-based boards"
|
2013-05-01 21:44:11 +02:00
|
|
|
@$(ECHO) " Install all available tools:"
|
2013-04-04 17:26:59 +02:00
|
|
|
@$(ECHO) " all_sdk_install - Install all of above (platform-dependent)"
|
2013-05-03 12:39:33 +02:00
|
|
|
@$(ECHO) " build_sdk_install - Install only essential for build tools (platform-dependent)"
|
2013-04-04 17:26:59 +02:00
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " Other tool options are:"
|
|
|
|
@$(ECHO) " <tool>_version - Display <tool> version"
|
|
|
|
@$(ECHO) " <tool>_clean - Remove installed <tool>"
|
|
|
|
@$(ECHO) " <tool>_distclean - Remove downloaded <tool> distribution file(s)"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " [Big Hammer]"
|
2015-10-02 21:08:13 +02:00
|
|
|
@$(ECHO) " all - Generate UAVObjects, build $(ORG_BIG_NAME) firmware and gcs"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " all_flight - Build all firmware, bootloaders and bootloader updaters"
|
|
|
|
@$(ECHO) " all_fw - Build only firmware for all boards"
|
|
|
|
@$(ECHO) " all_bl - Build only bootloaders for all boards"
|
|
|
|
@$(ECHO) " all_bu - Build only bootloader updaters for all boards"
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " all_clean - Remove your build directory ($(BUILD_DIR))"
|
|
|
|
@$(ECHO) " all_flight_clean - Remove all firmware, bootloaders and bootloader updaters"
|
|
|
|
@$(ECHO) " all_fw_clean - Remove firmware for all boards"
|
2013-04-04 17:26:59 +02:00
|
|
|
@$(ECHO) " all_bl_clean - Remove bootloaders for all boards"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " all_bu_clean - Remove bootloader updaters for all boards"
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " all_<board> - Build all available images for <board>"
|
|
|
|
@$(ECHO) " all_<board>_clean - Remove all available images for <board>"
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " all_ut - Build all unit tests"
|
|
|
|
@$(ECHO) " all_ut_tap - Run all unit tests and capture all TAP output to files"
|
|
|
|
@$(ECHO) " all_ut_run - Run all unit tests and dump TAP output to console"
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " [Firmware]"
|
|
|
|
@$(ECHO) " <board> - Build firmware for <board>"
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " Supported boards are ($(ALL_BOARDS))"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " fw_<board> - Build firmware for <board>"
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " Supported boards are ($(FW_BOARDS))"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " fw_<board>_clean - Remove firmware for <board>"
|
|
|
|
@$(ECHO) " fw_<board>_program - Use OpenOCD + JTAG to write firmware to <board>"
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " [Bootloader]"
|
|
|
|
@$(ECHO) " bl_<board> - Build bootloader for <board>"
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " Supported boards are ($(BL_BOARDS))"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " bl_<board>_clean - Remove bootloader for <board>"
|
|
|
|
@$(ECHO) " bl_<board>_program - Use OpenOCD + JTAG to write bootloader to <board>"
|
|
|
|
@$(ECHO)
|
2013-03-19 17:20:09 +01:00
|
|
|
@$(ECHO) " [Entire Flash]"
|
|
|
|
@$(ECHO) " ef_<board> - Build entire flash image for <board>"
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " Supported boards are ($(EF_BOARDS))"
|
2013-03-19 17:20:09 +01:00
|
|
|
@$(ECHO) " ef_<board>_clean - Remove entire flash image for <board>"
|
|
|
|
@$(ECHO) " ef_<board>_program - Use OpenOCD + JTAG to write entire flash image to <board>"
|
|
|
|
@$(ECHO)
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " [Bootloader Updater]"
|
|
|
|
@$(ECHO) " bu_<board> - Build bootloader updater for <board>"
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " Supported boards are ($(BU_BOARDS))"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " bu_<board>_clean - Remove bootloader updater for <board>"
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " [Unbrick a board]"
|
|
|
|
@$(ECHO) " unbrick_<board> - Use the STM32's built in boot ROM to write a bootloader to <board>"
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " Supported boards are ($(BL_BOARDS))"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " [Unittests]"
|
|
|
|
@$(ECHO) " ut_<test> - Build unit test <test>"
|
2013-03-19 17:20:09 +01:00
|
|
|
@$(ECHO) " ut_<test>_xml - Run test and capture XML output into a file"
|
|
|
|
@$(ECHO) " ut_<test>_run - Run test and dump output to console"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " [Simulation]"
|
2015-10-02 21:08:13 +02:00
|
|
|
@$(ECHO) " sim_osx - Build $(ORG_BIG_NAME) simulation firmware for OSX"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " sim_osx_clean - Delete all build output for the osx simulation"
|
2015-10-02 21:08:13 +02:00
|
|
|
@$(ECHO) " sim_win32 - Build $(ORG_BIG_NAME) simulation firmware for Windows"
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " using mingw and msys"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " sim_win32_clean - Delete all build output for the win32 simulation"
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " [GCS]"
|
2013-03-19 23:48:02 +01:00
|
|
|
@$(ECHO) " gcs - Build the Ground Control System (GCS) application (debug|release)"
|
2014-03-22 15:25:01 +01:00
|
|
|
@$(ECHO) " Compile specific directory: MAKE_DIR=<dir>"
|
2015-04-01 22:26:37 +02:00
|
|
|
@$(ECHO) " Example: make gcs MAKE_DIR=src/plugins/coreplugin"
|
|
|
|
@$(ECHO) " gcs_qmake - Run qmake for the Ground Control System (GCS) application (debug|release)"
|
2013-03-19 23:48:02 +01:00
|
|
|
@$(ECHO) " gcs_clean - Remove the Ground Control System (GCS) application (debug|release)"
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " Supported build configurations: GCS_BUILD_CONF=debug|release (default is $(GCS_BUILD_CONF))"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO)
|
2014-09-17 15:43:45 +02:00
|
|
|
@$(ECHO) " [Uploader Tool]"
|
2014-09-07 23:01:20 +02:00
|
|
|
@$(ECHO) " uploader - Build the serial uploader tool (debug|release)"
|
2015-04-01 22:26:37 +02:00
|
|
|
@$(ECHO) " uploader_qmake - Run qmake for the serial uploader tool (debug|release)"
|
2014-09-07 23:01:20 +02:00
|
|
|
@$(ECHO) " uploader_clean - Remove the serial uploader tool (debug|release)"
|
|
|
|
@$(ECHO) " Supported build configurations: GCS_BUILD_CONF=debug|release (default is $(GCS_BUILD_CONF))"
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO)
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " [UAVObjects]"
|
|
|
|
@$(ECHO) " uavobjects - Generate source files from the UAVObject definition XML files"
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " uavobjects_test - Parse xml-files - check for valid, duplicate ObjId's, ..."
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " uavobjects_<group> - Generate source files from a subset of the UAVObject definition XML files"
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " Supported groups are ($(UAVOBJ_TARGETS))"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO)
|
2013-03-19 17:20:09 +01:00
|
|
|
@$(ECHO) " [Packaging]"
|
2015-10-02 21:08:13 +02:00
|
|
|
@$(ECHO) " package - Build and package the platform-dependent package (no clean)"
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " opfw_resource - Generate resources to embed firmware binaries into the GCS"
|
2014-12-04 09:32:05 +01:00
|
|
|
@$(ECHO) " dist - Generate source archive for distribution"
|
2015-08-18 23:58:48 +02:00
|
|
|
@$(ECHO) " fw_dist - Generate archive of firmware"
|
2014-12-09 22:51:29 +01:00
|
|
|
@$(ECHO) " install - Install GCS to \"DESTDIR\" with prefix \"prefix\" (Linux only)"
|
2013-03-19 17:20:09 +01:00
|
|
|
@$(ECHO)
|
2013-04-22 01:43:53 +02:00
|
|
|
@$(ECHO) " [Code Formatting]"
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " uncrustify_<source> - Reformat <source> code according to the project's standards"
|
|
|
|
@$(ECHO) " Supported sources are ($(UNCRUSTIFY_TARGETS))"
|
2013-04-22 01:43:53 +02:00
|
|
|
@$(ECHO) " uncrustify_all - Reformat all source code"
|
|
|
|
@$(ECHO)
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " [Code Documentation]"
|
|
|
|
@$(ECHO) " docs_<source> - Generate HTML documentation for <source>"
|
|
|
|
@$(ECHO) " Supported sources are ($(DOCS_TARGETS))"
|
|
|
|
@$(ECHO) " docs_all - Generate HTML documentation for all"
|
|
|
|
@$(ECHO) " docs_<source>_clean - Delete generated documentation for <source>"
|
|
|
|
@$(ECHO) " docs_all_clean - Delete all generated documentation"
|
|
|
|
@$(ECHO)
|
2015-07-18 16:22:58 +02:00
|
|
|
@$(ECHO) " [Configuration]"
|
|
|
|
@$(ECHO) " config_new - Place your make arguments in the config file"
|
|
|
|
@$(ECHO) " config_append - Place your make arguments in the config file but append"
|
|
|
|
@$(ECHO) " config_clean - Removes the config file"
|
|
|
|
@$(ECHO)
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO) " Hint: Add V=1 to your command line to see verbose build output."
|
|
|
|
@$(ECHO)
|
2013-05-03 10:54:25 +02:00
|
|
|
@$(ECHO) " Notes: All tool distribution files will be downloaded into $(DL_DIR)"
|
|
|
|
@$(ECHO) " All tools will be installed into $(TOOLS_DIR)"
|
|
|
|
@$(ECHO) " All build output will be placed in $(BUILD_DIR)"
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " Tool download and install directories can be changed using environment variables:"
|
2015-07-30 11:29:02 +02:00
|
|
|
@$(ECHO) " DL_DIR full path to downloads directory [downloads if not set]"
|
|
|
|
@$(ECHO) " TOOLS_DIR full path to installed tools directory [tools if not set]"
|
2015-10-02 21:08:13 +02:00
|
|
|
@$(ECHO) " More info: $(WIKI_URL_ROOT)LibrePilot+Build+System+Overview"
|
2013-03-11 20:54:36 +01:00
|
|
|
@$(ECHO)
|