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

package: auto-generate Qt resource file for OPFW images

This commit is contained in:
Stacey Sheldon 2012-10-05 16:23:42 -04:00
parent 4edf78d1cd
commit 4eb485bdde
2 changed files with 20 additions and 0 deletions

View File

@ -750,6 +750,11 @@ sim_win32_%: uavobjects_flight
# Packaging components
#
##############################
.PHONY: package
package:
$(V1) cd $@ && $(MAKE) --no-print-directory $@
.PHONY: package_resources
package_resources:
$(V1) cd package && $(MAKE) --no-print-directory opfw_resource

View File

@ -129,4 +129,19 @@ ifeq ($(UNAME), Darwin)
PLATFORM := osx
endif
toprel = $(subst $(realpath $(ROOT_DIR))/,,$(abspath $(1)))
OPFW_FILES := $(foreach fw_targ, $(FW_TARGETS), $(call toprel, $(BUILD_DIR)/$(fw_targ)/$(fw_targ).opfw))
OPFW_CONTENTS := \
<!DOCTYPE RCC><RCC version="1.0"> \
<qresource> \
$(foreach fw_file, $(OPFW_FILES), <file>$(fw_file)</file>) \
</qresource> \
</RCC>
.PHONY: opfw_resource
opfw_resource:
@echo Generating OPFW resource file $(call toprel, $(BUILD_DIR)/ground/$@)
$(V1) mkdir -p $(BUILD_DIR)/ground/$@
$(V1) echo '$(OPFW_CONTENTS)' > $(BUILD_DIR)/ground/$@/opfw_resource.qrc
include $(WHEREAMI)/Makefile.$(PLATFORM)