summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/.gitignore1
-rw-r--r--apps/Makefile17
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)