diff options
author | David Sidrane <david_s5@nscdg.com> | 2014-12-25 06:34:23 -1000 |
---|---|---|
committer | David Sidrane <david_s5@nscdg.com> | 2014-12-25 06:34:23 -1000 |
commit | 78f413b2bf258ce7d735440fbf4ac6ec4eaf4c6a (patch) | |
tree | 81b22faa5a5dd849fe85d8bd21133379c987680e /Makefile | |
parent | 6f53c602022d69b03a722f39871fe86e4cd3b26c (diff) | |
download | px4-firmware-78f413b2bf258ce7d735440fbf4ac6ec4eaf4c6a.tar.gz px4-firmware-78f413b2bf258ce7d735440fbf4ac6ec4eaf4c6a.tar.bz2 px4-firmware-78f413b2bf258ce7d735440fbf4ac6ec4eaf4c6a.zip |
Added the ability to apply PX4 specific patches to Nuttx
At the moment this entails adding NuttX/nuttx/arch/arm/include/math.h
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 25 insertions, 2 deletions
@@ -161,7 +161,7 @@ $(foreach config,$(FMU_CONFIGS),$(eval $(call FMU_DEP,$(config)))) # NUTTX_ARCHIVES = $(foreach board,$(BOARDS),$(ARCHIVE_DIR)$(board).export) .PHONY: archives -archives: $(NUTTX_ARCHIVES) +archives: nuttxpatches $(NUTTX_ARCHIVES) # We cannot build these parallel; note that we also force -j1 for the # sub-make invocations. @@ -183,6 +183,29 @@ $(NUTTX_ARCHIVES): $(ARCHIVE_DIR)%.export: $(NUTTX_SRC) $(Q) $(COPY) $(NUTTX_SRC)nuttx-export.zip $@ $(Q) (cd $(NUTTX_SRC)/configs && $(RMDIR) $(board)) +NUTTX_PATCHES := $(wildcard $(PX4_NUTTX_PATCH_DIR)*.patch) +NUTTX_PATCHED = $(NUTTX_SRC).patchedpx4common + +.PHONY: nuttxpatches +nuttxpatches: + $(Q) if [ ! -f $(NUTTX_PATCHED) ]; then \ + for patch in $(NUTTX_PATCHES); \ + do \ + $(PATCH) -p0 -N < $$patch; \ + done \ + fi + $(Q) $(TOUCH) $(NUTTX_PATCHED) + +.PHONY: cleannuttxpatches +cleannuttxpatches: + $(Q) if [ ! -f $(NUTTX_PATCHED) ]; then \ + for patch in $(NUTTX_PATCHES); \ + do \ + $(PATCH) -p0 -N -R < $$patch; \ + done \ + fi + $(Q) $(TOUCH) $(NUTTX_PATCHED) + # # The user can run the NuttX 'menuconfig' tool for a single board configuration with # make BOARDS=<boardname> menuconfig @@ -249,7 +272,7 @@ clean: $(Q) $(REMOVE) $(IMAGE_DIR)*.px4 > /dev/null .PHONY: distclean -distclean: clean +distclean: clean cleannuttxpatches $(Q) $(REMOVE) $(ARCHIVE_DIR)*.export > /dev/null $(Q) $(MAKE) -C $(NUTTX_SRC) -r $(MQUIET) distclean > /dev/null $(Q) (cd $(NUTTX_SRC)/configs && $(FIND) . -maxdepth 1 -type l -delete) > /dev/null |