libpsys

changeset 10:0f83e882fd04

install target
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 29 Aug 2012 03:16:58 +0300
parents 9c24273f211b
children 23d4c50616ff
files Makefile.in
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/Makefile.in	Wed Sep 28 03:42:01 2011 +0300
     1.2 +++ b/Makefile.in	Wed Aug 29 03:16:58 2012 +0300
     1.3 @@ -2,6 +2,7 @@
     1.4  obj = $(src:.c=.o)
     1.5  dep = $(obj:.o=.d)
     1.6  lib_a = libpsys.a
     1.7 +hdr = $(wildcard src/*.h)
     1.8  
     1.9  ifeq ($(shell uname -s), Darwin)
    1.10  	lib_so = psys.dylib
    1.11 @@ -11,7 +12,7 @@
    1.12  	sominor = 1
    1.13  	soname = libpsys.so.$(somajor)
    1.14  	lib_so = $(soname).$(sominor)
    1.15 -	solink = libpsys.so
    1.16 +	devlink = libpsys.so
    1.17  	shared = -shared -Wl,-soname,$(soname)
    1.18  endif
    1.19  
    1.20 @@ -38,7 +39,16 @@
    1.21  
    1.22  .PHONY: install
    1.23  install: $(lib_a) $(lib_so)
    1.24 -	@echo TODO
    1.25 +	mkdir -p $(DESTDIR)$(PREFIX)/include/psys
    1.26 +	cp $(hdr) $(DESTDIR)$(PREFIX)/include/psys/
    1.27 +	cp $(lib_a) $(DESTDIR)$(PREFIX)/lib/$(lib_a)
    1.28 +	cp $(lib_so) $(DESTDIR)$(PREFIX)/lib/$(lib_so)
    1.29 +	[ -n "$(soname)" ] \
    1.30 +		&& cd $(DESTDIR)$(PREFIX)/lib \
    1.31 +		&& rm -f $(soname) $(devlink) \
    1.32 +		&& ln -s $(lib_so) $(soname) \
    1.33 +		&& ln -s $(soname) $(devlink) \
    1.34 +		|| true
    1.35  
    1.36  .PHONY: uninstall
    1.37  uninstall: