summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Voltz2008-03-10 16:22:43 +0100
committerJohn Voltz2008-03-10 16:22:43 +0100
commitbc67ca29d3668dd7439e1e5ce3964eb7b6ee2721 (patch)
tree9658e27c6468208c945a7c1db0d506ad776140e0
parentchanged to use sourceforge variable (diff)
downloadbuildroot-bc67ca29d3668dd7439e1e5ce3964eb7b6ee2721.tar.gz
buildroot-bc67ca29d3668dd7439e1e5ce3964eb7b6ee2721.tar.xz
buildroot-bc67ca29d3668dd7439e1e5ce3964eb7b6ee2721.zip
added dev files in target option
-rw-r--r--Config.in7
-rw-r--r--Makefile17
-rw-r--r--package/Makefile.autotools.in4
3 files changed, 23 insertions, 5 deletions
diff --git a/Config.in b/Config.in
index 5bc4e3615..17b1d503e 100644
--- a/Config.in
+++ b/Config.in
@@ -239,6 +239,13 @@ config BR2_HAVE_INFOPAGES
If you say n here, your target will not contain any
infopage.
+config BR2_TARGET_DEV_FILES
+ bool "Development files in target filesystem"
+ default n
+ help
+ Install headers and static libraries in the
+ target filesystem
+
source package/gnuconfig/Config.in
endmenu
diff --git a/Makefile b/Makefile
index 9a08d718f..5e57f1625 100644
--- a/Makefile
+++ b/Makefile
@@ -245,7 +245,7 @@ include package/*/*.mk
# target stuff is last so it can override anything else
include target/Makefile.in
-TARGETS+=erase-fakeroots
+TARGETS+=erase-fakeroots target-devfiles
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS))
@@ -317,6 +317,21 @@ $(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root
erase-fakeroots:
rm -f $(PROJECT_BUILD_DIR)/.fakeroot*
+target-devfiles:
+ifeq ($(strip $(BR2_TARGET_DEV_FILES)),y)
+ cp -a $(STAGING_DIR)/usr/include $(TARGET_DIR)/usr
+ cp $(STAGING_DIR)/usr/lib/*.a $(TARGET_DIR)/usr/lib
+ cp $(STAGING_DIR)/lib/*.a $(TARGET_DIR)/lib
+ cp $(STAGING_DIR)/usr/lib/*.la $(TARGET_DIR)/usr/lib
+ cp $(STAGING_DIR)/lib/*.la $(TARGET_DIR)/lib
+else
+ rm -rf $(TARGET_DIR)/usr/include
+ find $(TARGET_DIR)/usr/lib -name '*.a' -delete
+ find $(TARGET_DIR)/lib -name '*.a' -delete
+ find $(TARGET_DIR)/usr/lib -name '*.la' -delete
+ find $(TARGET_DIR)/lib -name '*.la' -delete
+endif
+
source: $(TARGETS_SOURCE) $(HOST_SOURCE)
_source-check:
diff --git a/package/Makefile.autotools.in b/package/Makefile.autotools.in
index 358e71613..7b08be1a5 100644
--- a/package/Makefile.autotools.in
+++ b/package/Makefile.autotools.in
@@ -230,10 +230,6 @@ $(BUILD_DIR)/%/.stamp_target_installed:
$(if $(BR2_HAVE_INCLUDES),,for d in include; do \
rm -rf $(TARGET_DIR)/$$d $(TARGET_DIR)/usr/$$d; \
done)
- find $(TARGET_DIR) -name '*.la' -delete
- find $(TARGET_DIR)/lib -name '*.a' -delete
- find $(TARGET_DIR)/usr/lib -name '*.a' -delete
-
touch $@
$(BUILD_DIR)/%/.stamp_cleaned: