.PHONY:	all clean realclean distclean distrib

executable := mime-tool
archive := mime-tool.tar.gz
components := GPL.txt Makefile mime.c $(executable).man \
	README.txt README.Topal.txt

include ../Buildflags.mk

all:	$(executable)

$(executable):	mime.c
		$(CC) $(default_CFLAGS) $(default_LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< -o $@

realclean distclean:	clean
	-$(RM) $(executable) $(archive)

clean:
	-$(RM) *~

distrib:	$(archive)

$(archive):	$(components)
	tar cvaf $@ $^

