diff options
author | David Schleef <ds@schleef.org> | 2001-03-29 23:58:49 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2001-03-29 23:58:49 +0000 |
commit | ec2653144beb2be8b1e2e844d937a1a11c506af0 (patch) | |
tree | 0a2553a1fcc4430cae1a4a79a42f2d221c5df16d | |
parent | 8625fbfe454b90a1a6f24e365cb0fff672414cff (diff) |
Reimplemented "make install" target. I left the old one as-is,
under the assumtion that someone will get confused if it suddenly
changes.
-rw-r--r-- | Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -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; \ |