GTK2_CFLAGS=`pkg-config gtk+-2.0 --cflags` GTK2_LIBS=`pkg-config gtk+-2.0 --libs` OBJS=gtkhirad.o eggtrayicon.o PREFIX?= $(prefix) all: $(OBJS) cc -o gtkhirad $(GTK2_LIBS) $(OBJS) gtkhirad.o: gtkhirad.c cc -c -DPREFIX=\"$(PREFIX)\" $(GTK2_CFLAGS) gtkhirad.c >/dev/null 2>&1 eggtrayicon.o: eggtrayicon.c eggtrayicon.h cc -c $(GTK2_CFLAGS) -DEGG_COMPILATION eggtrayicon.c clean: rm -f gtkhirad rm -f *.o install: all install -d $(PREFIX)/bin install -s gtkhirad $(PREFIX)/bin/gtkhirad install -d $(PREFIX)/share/applications install gtkhirad.desktop $(PREFIX)/share/applications/gtkhirad.desktop install -d $(PREFIX)/share/pixmaps install gtkhirad.png $(PREFIX)/share/pixmaps/gtkhirad.png install -d $(PREFIX)/lib/gtkhirad install play.pl $(PREFIX)/lib/gtkhirad/play.pl install update_menu.pl $(PREFIX)/lib/gtkhirad/update_menu.pl uninstall: rm $(PREFIX)/bin/gtkhirad rm -rf $(PREFIX)/lib/gtkhirad/* rm $(PREFIX)/share/pixmaps/gtkhirad.png rm $(PREFIX)/share/applications/gtkhirad.desktop dist: rm -rf gtkhirad-0.2 mkdir gtkhirad-0.2 cp *.c *.h *.pl *.desktop *.png README COPYING Makefile gtkhirad-0.2 tar --bzip2 -cf gtkhirad.tar.bz2 gtkhirad-0.2 rm -rf gtkhirad-0.2