
googlizer: googlizer.o
	gcc `gnome-config --libs gnomeui gnome gtk glib` $< -o $@

googlizer.o: googlizer.c
	gcc `gnome-config --cflags gnomeui gnome gtk glib` -c $<

clean:
	rm -f *.o *~ googlizer

tar:	clean
	(cd ..; tar cvfz googlizer.tar.gz googlizer)

install: googlizer
	install -o root -g root -m 755 -d $(DESTDIR)`gnome-config --bindir`/
	install -o root -g root -m 755 googlizer $(DESTDIR)`gnome-config --bindir`/
	install -o root -g root -m 755 -d $(DESTDIR)`gnome-config --mandir`/man1/
	install -o root -g root -m 644 googlizer.1 $(DESTDIR)`gnome-config --mandir`/man1/
	install -o root -g root -m 755 -d $(DESTDIR)`gnome-config --datadir`/gnome/apps/Internet/
	install -o root -g root -m 644 googlizer.desktop $(DESTDIR)`gnome-config --datadir`/gnome/apps/Internet/
	install -o root -g root -m 755 -d $(DESTDIR)`gnome-config --datadir`/pixmaps/
	install -o root -g root -m 644 googlizer.png $(DESTDIR)`gnome-config --datadir`/pixmaps/

uninstall:
	rm -f $(DESTDIR)`gnome-config --bindir`/googlizer
	rm -f $(DESTDIR)`gnome-config --mandir`/man1/googlizer.1
	rm -f $(DESTDIR)`gnome-config --datadir`/gnome/apps/Internet/googlizer.desktop
	rm -f $(DESTDIR)`gnome-config --datadir`/pixmaps/googlizer.png
	rmdir -p --ignore-fail-on-non-empty $(DESTDIR)`gnome-config --bindir`/
	rmdir -p --ignore-fail-on-non-empty $(DESTDIR)`gnome-config --mandir`/man1/
	rmdir -p --ignore-fail-on-non-empty $(DESTDIR)`gnome-config --datadir`/gnome/apps/Internet/
	rmdir -p --ignore-fail-on-non-empty $(DESTDIR)`gnome-config --datadir`/pixmaps/
