1SHELL=/bin/sh 2 3# Makefile for WordNet 2.0 libraries 4 5WN_ROOT = /usr/local/WordNet-2.0 6WN_INSTALLDIR = $(WN_ROOT)/lib 7 8WN_FILES = libwn.a 9 10all: $(WN_FILES) 11 12install: $(WN_FILES) 13 @echo "Installing library in $(WN_INSTALLDIR)" 14 @if [ ! -d $(WN_INSTALLDIR) ] ; then \ 15 echo "Making directory $(WN_INSTALLDIR)" ; \ 16 mkdir -p $(WN_INSTALLDIR) ; \ 17 chmod 755 $(WN_INSTALLDIR) ; \ 18 fi ; 19 @for file in $(WN_FILES) ; \ 20 do \ 21 filename=$(WN_INSTALLDIR)/$$file ; \ 22 if [ -f $$filename ] ; then \ 23 echo "Cannot install $$filename: file exists" ; \ 24 else \ 25 echo "Installing $$filename" ; \ 26 cp -p $$file $$filename ; \ 27 fi ; \ 28 done ; 29 @echo "Done installing library in $(WN_INSTALLDIR)" 30 31uninstall: 32 @echo "Uninstalling library from $(WN_INSTALLDIR)" 33 @ ( cd $(PLATFORM) ; \ 34 for file in $(WN_FILES) ; \ 35 do \ 36 filename=$(WN_INSTALLDIR)/$$file ; \ 37 if [ ! -f $$filename ] ; then \ 38 echo "Cannot uninstall $$filename: not present" ; \ 39 else \ 40 echo "Uninstalling $$filename" ; \ 41 rm -f $$filename ; \ 42 fi ; \ 43 done ) 44 @echo "Done uninstalling library from $(WN_INSTALLDIR)" 45 46clean: 47 @rm -f *~ "#"* 48