diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-09-06 08:13:45 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-09-06 08:13:45 -0600 |
commit | 2b733b9165d1407c63d4a6997d51edd14bbf44d4 (patch) | |
tree | 03736e541a33733ec9aef82e0286b15f0bf39c5c | |
parent | 53f35d753e96a72380a6162bc2ee925eb45a457b (diff) | |
download | px4-nuttx-2b733b9165d1407c63d4a6997d51edd14bbf44d4.tar.gz px4-nuttx-2b733b9165d1407c63d4a6997d51edd14bbf44d4.tar.bz2 px4-nuttx-2b733b9165d1407c63d4a6997d51edd14bbf44d4.zip |
Add support for an installation directory:
-rw-r--r-- | apps/.gitignore | 1 | ||||
-rw-r--r-- | apps/Makefile | 17 |
2 files changed, 13 insertions, 5 deletions
diff --git a/apps/.gitignore b/apps/.gitignore index 53befbf70..bcc844033 100644 --- a/apps/.gitignore +++ b/apps/.gitignore @@ -1,3 +1,4 @@ +/bin /external /.context /.config diff --git a/apps/Makefile b/apps/Makefile index 3ed1f3f87..3a8e2f07a 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -103,6 +103,10 @@ SUBDIRS += $(EXTERNAL_DIR) LIBPATH ?= $(TOPDIR)/libs +# The install path + +INSTALL_DIR = $(APPDIR)/bin + # The final build target BIN = libapps$(LIBEXT) @@ -114,12 +118,9 @@ all: $(BIN) define SDIR_template $(1)_$(2): - $(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" + $(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" INSTALL_DIR="$(INSTALL_DIR)" endef -$(INSTALLED_APPS): - $(Q) $(MAKE) -C $@ TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" - $(foreach SDIR, $(INSTALLED_APPS), $(eval $(call SDIR_template,$(SDIR),all))) $(foreach SDIR, $(INSTALLED_APPS), $(eval $(call SDIR_template,$(SDIR),install))) $(foreach SDIR, $(INSTALLED_APPS), $(eval $(call SDIR_template,$(SDIR),context))) @@ -129,7 +130,12 @@ $(foreach SDIR, $(INSTALLED_APPS), $(eval $(call SDIR_template,$(SDIR),distclean $(BIN): $(foreach SDIR, $(INSTALLED_APPS), $(SDIR)_all) -install: $(foreach SDIR, $(INSTALLED_APPS), $(SDIR)_install) +.install: $(foreach SDIR, $(INSTALLED_APPS), $(SDIR)_install) + +$(INSTALL_DIR): + mkdir -p $(INSTALL_DIR) + +install: $(INSTALL_DIR) .install .import: $(BIN) install @@ -165,5 +171,6 @@ else ) endif $(call DELFILE, .depend) + $(call DELDIR, bin) |