From 4eb485bdded399be0259ffd7fc7cba25973a14b2 Mon Sep 17 00:00:00 2001 From: Stacey Sheldon Date: Fri, 5 Oct 2012 16:23:42 -0400 Subject: [PATCH] package: auto-generate Qt resource file for OPFW images --- Makefile | 5 +++++ package/Makefile | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/Makefile b/Makefile index dd3522760..c2da9306e 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/package/Makefile b/package/Makefile index 13d12f83c..0354e22b5 100644 --- a/package/Makefile +++ b/package/Makefile @@ -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 := \ + \ + \ + $(foreach fw_file, $(OPFW_FILES), $(fw_file)) \ + \ + + +.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)