[git commit prelink 1/1] buildsys: add make {,install_}startfiles

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Sun Nov 28 19:50:38 UTC 2010


commit: http://git.uclibc.org/uClibc/commit/?id=673f444013915fe2cfd30019b27bf3b8d1d34a4e
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/prelink

This builds and installs the crt files.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 Makefile.help |    2 ++
 Makefile.in   |   10 ++++++++--
 Makerules     |    3 ++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/Makefile.help b/Makefile.help
index ccb32ca..1c2c96e 100644
--- a/Makefile.help
+++ b/Makefile.help
@@ -14,6 +14,7 @@ help:
 	@echo 'Build:'
 	@echo '  all			- libraries and generated headers'
 	@echo '  pregen		- generate headers'
+	@echo '  startfiles		- build startfiles (crt)'
 	@echo '  utils			- build target utilities'
 	@echo '			  (ldd, ldconfig, locale, iconv)'
 	@echo '  hostutils		- build host utilities (see utils)'
@@ -32,6 +33,7 @@ help:
 	@echo '  install		- install both the runtime and the headers'
 	@echo '  install_runtime	- install the libraries'
 	@echo '  install_dev		- install all headers and static libs'
+	@echo '  install_startfiles	- install startfiles (crt)'
 	@echo '  install_headers	- install headers excluding generated ones'
 	@echo '  install_utils		- install target utilities'
 	@echo '  install_hostutils	- install host utilities'
diff --git a/Makefile.in b/Makefile.in
index 227ddb4..b199293 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -195,6 +195,8 @@ install: install_runtime install_dev
 
 RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)$(MULTILIB_DIR) $(RUNTIME_PREFIX)$(MULTILIB_DIR))
 
+startfiles: $(crt-y)
+
 $(top_builddir)extra/scripts/unifdef: |$(top_builddir)extra/scripts
 $(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c
 	$(hcompile.u)
@@ -297,9 +299,13 @@ else
 	$(Q)cd $(PREFIX)$(DEVEL_PREFIX)include && $(RM) -f wchar-stub.h
 endif
 
+# Installs startfiles
+install_startfiles: startfiles | $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)
+	-$(INSTALL) -m 644 $(startfiles) $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
+
 # Installs development library links.
-install_dev: install_headers install_runtime | $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)
-	-$(INSTALL) -m 644 $(top_builddir)lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
+install_dev: install_headers install_runtime install_startfiles | $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)
+	-$(INSTALL) -m 644 $(top_builddir)lib/*.a $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
 ifeq ($(HAVE_SHARED),y)
 	for i in `cd $(top_builddir) && find lib/ -type l -name 'lib[a-zA-Z]*.so' | \
 	$(SED) -e 's/lib\///'` ; do \
diff --git a/Makerules b/Makerules
index 2e9ca05..84eeaea 100644
--- a/Makerules
+++ b/Makerules
@@ -437,7 +437,8 @@ endif
 CRTS_COMPAT :=
 #endif
 
-$(crt-y): $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC)
+startfiles = $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC)
+$(crt-y): $(startfiles)
 $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC): | headers
 $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC) $(LINK_FLAT_CRTS) $(SHARED_START_FILES) $(SHARED_END_FILES) : | $(top_builddir)lib
 
-- 
1.7.2.2



More information about the uClibc-cvs mailing list