# !/usr/bin/make -f
# -*- makefile -*-
# This Makefile is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
package?=dune

dune:
	cd src && make

configure: configure.in
	autoconf

clean:
	rm -f config.cache config.log config.status confdefs.h nohup.out
	rm -rf autom4te.cache
	rm -f test/dune_selftest bin/dune 
	rm -f src/swt/lib/libswt.a src/swt/rc/rc
	rm -f desktop/macosx/Droplet-Applet/build/Droplet-Applet.build/Droplet-Applet.build/Objects-normal/ppc/main.o
	-make -C src clean
	-find . -name snap.rgb -type f -print | xargs rm -f
	-find . -name core -type f -print | xargs rm -f
	-find . -name dune.core -type f -print | xargs rm -f

GENERATED_FILES?=\
 config.log src/config.h src/Makefile \
 src/swt/motif/Makefile  src/swt/rc/y.tab.h src/swt/tests/Makefile \
 src/SDLjoystick/Makefile \
 desktop/macosx/white_dune.app/Contents/MacOS/dune \
 bin/dune \
 # GENERATED_FILES

distclean realclean: clean
	-make -C src realclean
	-make -C docs/developer_docs realclean 
	-make -C test realclean
	-find . -name 'Makefile.bak' -print | xargs rm -f
	-find . -name '.dune_preview_*.wrl' -print | xargs rm -f
	-find . -name '.dune_textedit_*' -print | xargs rm -f
	-find . -name '.dune_ecmascript_*' -print | xargs rm -f
	-find . -name '.dune_upload_*' -print | xargs rm -f
	-find . -name '.gdb_history' -print | xargs rm -f
	-find . -name '.xvpics' -print | xargs rm -rf
	-rm -f ${GENERATED_FILES}

tar.gz:
	sh batch/mktargz.sh

documentation:
	cd docs/developer_docs && make 

selftest:
	cd test && make 

INSTALLDIR?=${DESTDIR}/usr/

install: bin/dune
	mkdir -p ${INSTALLDIR}/bin
	install -s $< ${INSTALLDIR}/bin/${package}

# DO NOT DELETE

#eof "$Id: whitedune/Makefile -- rzr@users.sf.net $"
