MAKE         = @MAKE@
RM           = @RM@
SHELL        = @SHELL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@

all:	
	cd src && $(MAKE)

install:
	@if [ -n "$(PREFIX)" ] ; then \
	     ./sbin/install-package -prefix=$(PREFIX) ; \
	 else \
	     ./sbin/install-package ; \
	 fi

uninstall:
	@-./sbin/uninstall-viewer

clean:
	-cd src && $(MAKE) clean

rmprog:
	@-for file in bin/* sbin/* ; do \
	      suffix="`echo $$file|sed -e 's%\.% %'|awk '{print $$NF}' -`" ; \
	      if [ "X$$suffix" != "Xin" ] ; then \
	          $(RM) $$file ; \
	      fi ; \
	  done

distclean: rmprog
	@-cd src && $(MAKE) distclean
	@-$(RM) sbin/install-package
	@-$(RM) Makefile libtool
	@-$(RM) trace_impl.h
	@-$(RM) config.log config.status
	@-$(RM) -r autom4te*.cache

maintainer-clean: distclean
	@-$(RM) trace_impl.h.in

owner-clean: maintainer-clean
	@-$(RM) configure

libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status --recheck

