2013-02-21 01:12:59 -04:00
|
|
|
#
|
|
|
|
# Path and tool setup
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Some useful paths.
|
|
|
|
#
|
2013-02-23 16:23:34 -04:00
|
|
|
# Note that in general we always keep directory paths with the separator
|
|
|
|
# at the end, and join paths without explicit separators. This reduces
|
|
|
|
# the number of duplicate slashes we have lying around in paths,
|
|
|
|
# and is consistent with joining the results of $(dir) and $(notdir).
|
|
|
|
#
|
|
|
|
export PX4_MODULE_SRC = $(abspath $(PX4_BASE)/src/modules)/
|
|
|
|
export PX4_MK_DIR = $(abspath $(PX4_BASE)/makefiles)/
|
|
|
|
export NUTTX_SRC = $(abspath $(PX4_BASE)/nuttx)/
|
|
|
|
export NUTTX_APP_SRC = $(abspath $(PX4_BASE)/apps)/
|
|
|
|
export MAVLINK_SRC = $(abspath $(PX4_BASE)/mavlink)/
|
|
|
|
export ROMFS_SRC = $(abspath $(PX4_BASE)/ROMFS)/
|
|
|
|
export IMAGE_DIR = $(abspath $(PX4_BASE)/Images)/
|
|
|
|
export BUILD_DIR = $(abspath $(PX4_BASE)/Build)/
|
|
|
|
export ARCHIVE_DIR = $(abspath $(PX4_BASE)/Archives)/
|
2013-02-21 01:12:59 -04:00
|
|
|
|
|
|
|
#
|
|
|
|
# Tools
|
|
|
|
#
|
|
|
|
MKFW = $(PX4_BASE)/Tools/px_mkfw.py
|
|
|
|
UPLOADER = $(PX4_BASE)/Tools/px_uploader.py
|
|
|
|
COPY = cp
|
|
|
|
REMOVE = rm -f
|
|
|
|
RMDIR = rm -rf
|
|
|
|
GENROMFS = genromfs
|
2013-02-23 18:33:53 -04:00
|
|
|
TOUCH = touch
|
|
|
|
MKDIR = mkdir
|
|
|
|
ECHO = echo
|
|
|
|
UNZIP = unzip
|
2013-02-21 01:12:59 -04:00
|
|
|
|
|
|
|
#
|
|
|
|
# Host-specific paths, hacks and fixups
|
|
|
|
#
|
|
|
|
SYSTYPE := $(shell uname -s)
|
|
|
|
|
|
|
|
ifeq ($(SYSTYPE),Darwin)
|
|
|
|
# Eclipse may not have the toolchain on its path.
|
|
|
|
export PATH := $(PATH):/usr/local/bin
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Makefile debugging.
|
|
|
|
#
|
2013-02-23 03:27:24 -04:00
|
|
|
export Q := $(if $(V),,@)
|