GCLIBTGZ=gc5.0alpha3.tar.gz

all: XXMakefile
	make -f XXMakefile 

install: XXMakefile
	make -f XXMakefile install

uninstall: XXMakefile
	make -f XXMakefile uninstall

proto: XXMakefile
	make -f XXMakefile proto

clean: XXMakefile
	make -f XXMakefile clean

sweep: XXMakefile
	make -f XXMakefile sweep

veryclean: clean sweep
	rm XXMakefile
	(cd gc; make clean)
	rm -f config.param
	rm -f */*~

prepare:
	rm -rf gc
	gzip -dc ../$(GCLIBTGZ) | tar xvf -
	cp XMakefile.dist XMakefile

dist:
	cd ..; tar cvfz w3m.tar.gz w3m

bindist:
	cd ..; tar cvfz w3m-binary.tar.gz w3m/w3m* w3m/doc* w3m/Bonus* w3m/README w3m/scripts 

XXMakefile: XMakefile config.h
	awk '/^#ifdef makefile_parameter/,/^#else/' config.h | cat - XMakefile > XXMakefile
