GTK_INCLUDE = `$(GTK_CONFIG) --cflags` GTK_LIB = `$(GTK_CONFIG) --libs` IMLIB_INCLUDE = `$(IMLIB_CONFIG) --cflags-gdk` IMLIB_LIB = `$(IMLIB_CONFIG) --libs-gdk` THREAD_LIB = INSTALLDIR = /usr/local/share/gkrellm/plugins ZIPVER= FLAGS = -fPIC $(GTK_INCLUDE) $(IMLIB_INCLUDE) LIBS = $(GTK_LIB) $(IMLIB_LIB) $(THREAD_LIB) LFLAGS = -shared CC += $(CFLAGS) $(FLAGS) OBJS = gkrellsun.o CalcEphem.o all: gkrellsun.so gkrellsun.so: $(OBJS) $(CC) $(OBJS) -o gkrellsun.so $(LFLAGS) $(LIBS) clean: rm -f *.o core *.so* *.bak *~ gkrellsun.o: gkrellsun.c sun.xpm # %.o: %.c install: gkrellsun.so install -c -s -m 644 gkrellsun.so $(INSTALLDIR) zip: rm -rf /tmp/gkrellsun-$(ZIPVER) rm -f /tmp/tar.exclude rm -f /tmp/gkrellsun-$(ZIPVER).tar.gz rm -f /tmp/gkrellsun-$(ZIPVER).zip mkdir /tmp/gkrellsun-$(ZIPVER) touch /tmp/tar.exclude find . -print | grep /CVS$$ | cut -c3- >> /tmp/tar.exclude find . -print | grep /CVS/ | cut -c3- >> /tmp/tar.exclude find . -print | grep .classes | cut -c3- >> /tmp/tar.exclude find . -type f -name "*~" | cut -c3- >> /tmp/tar.exclude find . -type f -name "*.o" | cut -c3- >> /tmp/tar.exclude find . -type f -name "*.so" | cut -c3- >> /tmp/tar.exclude find . -type f -name "#*" | cut -c3- >> /tmp/tar.exclude tar cf - * --exclude-from /tmp/tar.exclude | (cd /tmp/gkrellsun-$(ZIPVER); tar xf -) cd /tmp && tar cf - gkrellsun-$(ZIPVER) | gzip > gkrellsun-$(ZIPVER).tar.gz cd /tmp && zip -rpD gkrellsun-$(ZIPVER).zip gkrellsun-$(ZIPVER) rm -f tar.exclude