PREFIX	 = /usr/local

all: src
	cd goodies; gmake
	cd src; gmake

install: 
	cd goodies; gmake install
	cd src; gmake install
	install scriptdir/* $(PREFIX)/bin
	test -d $(PREFIX)/lib/X11/alloywm-icons || mkdir -p -m a+rx $(PREFIX)/lib/X11/alloywm-icons
	cp alloywm-icons/* $(PREFIX)/lib/X11/alloywm-icons
	chmod a+r $(PREFIX)/lib/X11/alloywm-icons/*

uninstall: 
	cd goodies; gmake uninstall
	cd src; gmake uninstall
	rm -rf $(PREFIX)/lib/X11/alloywm-icons
	rm -f $(PREFIX)/bin/*alloywm*
	rm -f $(PREFIX)/bin/icedock
	
clean:
	cd goodies; gmake clean
	cd src; gmake clean

distclean:
	test ! -f scriptdir/mu2-alloywm || rm -f scriptdir/mu2-alloywm
	test ! -f scriptdir/x-panel || rm -f scriptdir/x-panel
	test ! -f scriptdir/alloywm-toolbar ||  rm -f scriptdir/alloywm-toolbar
	test ! -f config.log || rm -f config.log
	test ! -f config.cache || rm -f config.cache
	
