# Note: Typing 'make' from this level will rebuild xpat2 from scratch.
#       Afterwards, type 'make install' (as root) to install the game
#	in default directories. A manual is in the doc subdirectory.
#
#       You may change src/Imakefile for different configurations.
#       But then, you're on your own...
#
#       Should you add / improve translations, please send a copy to
#       m.bischoff@tu-bs.de for inclusion in future releases.

all:
	(cd src && xmkmf && $(MAKE) && strip xpat2)
	(cd doc && $(MAKE) xpat2.ps)

doc:
	(cd doc && $(MAKE) xpat2.ps)

# different install targets: imake default, local, Linux FSSTND
install:
	(cd src && $(MAKE) install)
	@echo "You have to copy the manual doc/xpat2.dvi manually ;-)"

install.local:
	(cd src && $(MAKE) install.local)
	@echo "You have to copy the manual doc/xpat2.dvi manually ;-)"

install.fsstnd:
	(cd src && $(MAKE) install.fsstnd)
	@echo "You have to copy the manual doc/xpat2.dvi manually ;-)"


clean:
	(cd src && xmkmf && $(MAKE) clean)
	(cd doc && $(MAKE) clean)
	rm -f src/Makefile
	find . -name "*~" -exec rm \{\} \;

distrib:
	$(MAKE) clean
	(cd ..; tar cvfz xpat2-1.00.tar.gz xpat2-1.00)
