#
# Top-level Unix makefile for the GIFLIB package
# Should work for all Unix versions
# (Note: this is not presently used, there's an autoconf build.)
#
VERSION=3.0

all:
	cd lib; make static shared
	cd util; make all

install:
	cd lib; make install-lib
	cd util; make install-all

uninstall:
	cd lib; make uninstall-lib
	cd util; make uninstall-all

clean:
	cd lib; make clean
	cd util; make clean
	rm -f giflib-$(VERSION)-1.i386.rpm giflib-$(VERSION)-1.src.rpm \
		giflib-$(VERSION).tar.gz core giflib.lsm

giflib-$(VERSION).tar:
	(cd ..; tar cvf giflib-$(VERSION)/giflib-$(VERSION).tar `cat giflib-$(VERSION)/MANIFEST | sed "/\(^\| \)/s// giflib-$(VERSION)\//g"`)
giflib-$(VERSION).tar.gz: giflib-$(VERSION).tar
	gzip -f giflib-$(VERSION).tar

dist: Makefile
	make giflib-$(VERSION).tar.gz
	lsmgen.sh $(VERSION) `wc -c giflib-$(VERSION).tar.gz` >giflib.lsm
	make giflib-$(VERSION).tar.gz
	ls -l giflib-$(VERSION).tar.gz
	@echo "Don't forget to build RPMs from root!"

