packvfs

diff Makefile @ 2:dc23ab0545a6

- fleshed out some more fucntions with the code for the case where file/dir are real - added install/uninstall targets to the makefile - added pvfsh (packvfs shell) test program
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 04 Nov 2013 03:50:55 +0200
parents df5e9ee65a50
children
line diff
     1.1 --- a/Makefile	Mon Nov 04 01:01:22 2013 +0200
     1.2 +++ b/Makefile	Mon Nov 04 03:50:55 2013 +0200
     1.3 @@ -24,6 +24,9 @@
     1.4  
     1.5  CFLAGS = -pedantic -Wall $(dbg) $(opt) $(pic)
     1.6  
     1.7 +.PHONY: all
     1.8 +all: $(lib_so) $(lib_a)
     1.9 +
    1.10  $(lib_so): $(obj)
    1.11  	$(CC) -o $@ $(shared) $(obj) $(LDFLAGS)
    1.12  
    1.13 @@ -35,3 +38,26 @@
    1.14  .PHONY: clean
    1.15  clean:
    1.16  	rm -f $(obj) $(lib_a)
    1.17 +
    1.18 +.PHONY: install
    1.19 +install: all
    1.20 +	mkdir -p $(INSTDIR)$(PREFIX)/include $(INSTDIR)$(PREFIX)/lib
    1.21 +	cp src/pvfs.h $(INSTDIR)$(PREFIX)/include/pvfs.h
    1.22 +	cp $(lib_a) $(INSTDIR)$(PREFIX)/lib/$(lib_a)
    1.23 +	cp $(lib_so) $(INSTDIR)$(PREFIX)/lib/$(lib_so)
    1.24 +	[ -n "$(devlink)" ] && \
    1.25 +		cd $(INSTDIR)$(PREFIX)/lib && \
    1.26 +		rm -f $(soname) $(devlink) && \
    1.27 +		ln -s $(lib_so) $(soname) && \
    1.28 +		ln -s $(soname) $(devlink) || \
    1.29 +		true
    1.30 +
    1.31 +.PHONY: uninstall
    1.32 +uninstall:
    1.33 +	rm -f $(INSTDIR)$(PREFIX)/include/pvfs.h
    1.34 +	rm -f $(INSTDIR)$(PREFIX)/lib/$(lib_a)
    1.35 +	rm -f $(INSTDIR)$(PREFIX)/lib/$(lib_so)
    1.36 +	[ -n "$(devlink)" ] && \
    1.37 +		rm -f $(INSTDIR)$(PREFIX)/lib/$(soname) && \
    1.38 +		rm -f $(INSTDIR)$(PREFIX)/lib/$(devlink) || \
    1.39 +		true