1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

OP-483: add some platform-specific hooks for ground packaging

This commit is contained in:
Oleg Semyonov 2011-05-13 16:55:18 +03:00
parent c9fdbd580b
commit 405cac36ad
4 changed files with 55 additions and 3 deletions

View File

@ -1,6 +1,16 @@
# Set up a default goal
.DEFAULT_GOAL := help
# Tried the best to support parallel (-j) builds. But since this Makefile
# uses other Makefiles to build few targets which in turn have similar
# dependencies on uavobjects and other generated files, it is difficult
# to support parallel builds perfectly.
#
# Looks like it works for -j8, but fails for -j (unlimited jobs).
# So probably not a bad idea is to build release in single thread.
#
#.NOTPARALLEL:
# Locate the root of the tree
WHEREAMI := $(dir $(lastword $(MAKEFILE_LIST)))
ROOT_DIR := $(realpath $(WHEREAMI)/../)
@ -37,8 +47,7 @@ help:
@echo " - release packages will be placed in $(RELEASE_DIR)"
@echo
# Clean and create release directories
# Use dependence on uavobjects to make sure the build directory exists
# Clean and build uavobjects since all parts depend on them
uavobjects: all_clean
$(V1) $(MAKE) -C $(ROOT_DIR) $@
@ -91,7 +100,7 @@ release_fw: | fw_common fw_pwm fw_spektrum # fw_ppm
release_blupd: | $(BLUPD_TARGETS)
release_ground:
release_ground: | ground_package
.PHONY: help uavobjects all_clean release release_flight release_fw release_blupd release_ground
@ -110,3 +119,15 @@ endif
ifneq ($(V),1)
MAKEFLAGS += --no-print-directory
endif
# Platform-dependent stuff
PLATFORM := win32
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
PLATFORM := linux
endif
ifeq ($(UNAME), Darwin)
PLATFORM := osx
endif
include $(WHEREAMI)/Makefile.$(PLATFORM)

10
release/Makefile.linux Normal file
View File

@ -0,0 +1,10 @@
#
# Linux-specific packaging
#
gcs: uavobjects
$(V1) $(MAKE) -C $(ROOT_DIR) GCS_BUILD_CONF=release $@
ground_package: | gcs
.PHONY: gcs ground_package

10
release/Makefile.osx Normal file
View File

@ -0,0 +1,10 @@
#
# MacOSX-specific packaging
#
gcs: uavobjects
$(V1) $(MAKE) -C $(ROOT_DIR) GCS_BUILD_CONF=release $@
ground_package: | gcs
.PHONY: gcs ground_package

11
release/Makefile.win32 Normal file
View File

@ -0,0 +1,11 @@
#
# Windows-specific packaging
#
# Generate GCS installer
gcs_installer: uavobjects
$(V1) $(MAKE) -C $(ROOT_DIR) GCS_BUILD_CONF=release $@
ground_package: | gcs_installer
.PHONY: gcs_installer ground_package