SHELL = /bin/sh

top_srcdir = @top_srcdir@
topdir = @topdir@
prefix = @prefix@

INSTALL = @INSTALL@ -m 0755
INSTALL_DATA = @INSTALL@ -m 0644
INSTALL_DIR = @INSTALL@ -d -m 0755

BINDIR = @prefix@/bin
HTMLDIR = @kde_htmldir@/en
KDELNKDIR = @kde_appsdir@
ICONDIR = @kde_icondir@
LOCALEDIR = @kde_locale@
MIMEDIR = @kde_mimedir@ 

top_builddir = .

# Change this line to whatever needed
SUBDIRS =  kpackviewer

default: all

# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
#     (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.

@SET_MAKE@

clean-recursive:
	@for subdir in $(SUBDIRS); do \
	  target=`echo $@ | sed s/-recursive//`; \
	  echo "Making $$target in $$subdir"; \
	  (cd $$subdir && $(MAKE) $$target) \
	   || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
	done && test -z "$$fail"

clean:  clean-recursive

distclean: clean
	@rm -f config.status config.log config.cache config.h
	@rm -f libtool stamp-h
	@rm -f *~
	@find . -name Makefile -exec rm -f \{\} \;

all: Makefile apps

.PHONY: default apps 

Makefile: Makefile.in
	config.status

apps:
	@echo ""
	@echo -e "\\033[1;37;41m"
	@echo "***************************************************"
	@echo "* Please wait, this can take a little while...    *"
	@echo "***************************************************"
	@echo -e "\\033[0;37;40m"
	@for subdir in $(SUBDIRS); do \
          target=`echo $@ | sed s/-recursive//`; \
          echo "Making app in $$subdir"; \
          (cd $$subdir && $(MAKE) depend && $(MAKE) all) \
           || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
        done && test -z "$$fail"
	@echo ""
	@echo -e "\\033[1;37;44m"
	@echo "***************************************************"
	@echo "* Done! Enjoy KPV! I hope you think it's useful.  *"
	@echo "* Type make install to install KPV...             *"
	@echo -e "* Please report bugs to: \\033[0;33;40m hook@netrio.com.br \\033[1;37;44m     *"
	@echo "***************************************************"
	@echo -e "\\033[0;37;40m"

install:
	@echo ""
	@echo -e "\\033[1;37;41m Installing KPV... \\033[0;37;40m"
	@echo ""
	@for subdir in $(SUBDIRS); do \
	echo "Making install in $$subdir"; \
	(cd $$subdir && $(MAKE) install) \
	|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
	done && test -z "$$fail"
	@echo -e "\\033[1;37;44m"
	@echo "***************************************************"
	@echo "* Installed. Enjoy KPV!                           *"
	@echo -e "* Please report bugs to: \\033[0;33;40m hook@netrio.com.br \\033[1;37;44m     *"
	@echo "***************************************************"
	@echo -e "\\033[0;37;40m"

register:
	@echo ""
	@echo -e "\\033[1;37;41m Registering KPV... \\033[0;37;40m"
	@echo ""
	@for subdir in $(SUBDIRS); do \
	echo "Making register in $$subdir"; \
	(cd $$subdir && $(MAKE) register) \
	|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
	done && test -z "$$fail"
	@echo -e "\\033[1;37;44m"
	@echo "*****************************************************"
	@echo "* Registered. Enjoy KPV!                            *"
	@echo -e "* Please report bugs to: \\033[0;33;40m hook@netrio.com.br \\033[1;37;44m       *"
	@echo "*****************************************************"
	@echo -e "\\033[0;37;40m"

uninstall:
	@echo ""
	@echo -e "\\033[1;37;41m Removing KPV... \\033[0;37;40m"
	@echo ""
	@for subdir in $(SUBDIRS); do \
	echo "Making remove in $$subdir"; \
	(cd $$subdir && $(MAKE) uninstall) \
	|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
	done && test -z "$$fail"
	@echo -e "\\033[1;37;44m"
	@echo "***************************************************"
	@echo "* Removed! Thank you.                             *"
	@echo "***************************************************"
	@echo -e "\\033[0;37;40m"
