From ec2653144beb2be8b1e2e844d937a1a11c506af0 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 29 Mar 2001 23:58:49 +0000 Subject: Reimplemented "make install" target. I left the old one as-is, under the assumtion that someone will get confused if it suddenly changes. --- Makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Makefile b/Makefile index 8cdc757bd..fc2ced258 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,42 @@ $(patsubst %, _dir_%, $(DIRS)) : dummy $(patsubst %, _dirclean_%, $(DIRS) test) : dummy $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean +install_new: install_runtime install_dev + +# Installs shared library +install_runtime: +ifneq ($(DO_SHARED),) + install -d $(INSTALL_DIR)/lib + install -m 644 $(SHARED_NAME) $(INSTALL_DIR)/lib/ + (cd $(INSTALL_DIR)/lib;ln -sf $(SHARED_NAME) libuClibc.so) +# ldconfig is really not necessary, and impossible to cross +ifeq ($(INSTALL_DIR),) + /sbin/ldconfig -n $(INSTALL_DIR)/lib +endif +else + echo shared library not installed +endif + +# Installs development library and headers +# This is done with the assumption that it can blow away anything +# in $(INSTALL_DIR)/include. Probably true only if you're using +# a packaging system. +install_dev: + install -d $(INSTALL_DIR)/include + install -d $(INSTALL_DIR)/include/bits + rm -f $(INSTALL_DIR)/include/asm + rm -f $(INSTALL_DIR)/include/linux + ln -s $(KERNEL_SOURCE)/include/asm $(INSTALL_DIR)/include/asm + ln -s $(KERNEL_SOURCE)/include/linux $(INSTALL_DIR)/include/linux + find include/ -type f -depth -exec install -m 644 {} $(INSTALL_DIR)/include/ ';' + find include/bits/ -type f -depth -exec install -m 644 {} $(INSTALL_DIR)/include/bits/ ';' + install -d $(INSTALL_DIR)/lib + rm -f $(INSTALL_DIR)/lib/$(STATIC_NAME) + install -m 644 $(STATIC_NAME) $(INSTALL_DIR)/lib/ + @if [ -f crt0.o ] ; then install -m 644 crt0.o $(INSTALL_DIR)/lib/; fi + install: + echo Consider using 'make install_new' @if [ `id -u` -ne 0 ]; then \ echo "Aborting install -- You must be root."; \ /bin/false; \ -- cgit v1.2.3