#!/bin/sh

case $# in
  0)
    echo "Usage:  build  plugin"
    echo "  Compile a GKrellM demo plugin.c to a .so file,"
	echo "  where plugin is any of the .c demo files in this directory."
    echo "  After creating the .so file, check it out by running:"
    echo "      gkrellm -p plugin.so"
	echo ""
        exit 1 ;;
esac


gcc -Wall -fPIC -Wall `pkg-config --cflags gtk+-2.0` -I ../../include/ -c $1.c
gcc -shared -Wl -o $1.so $1.o
rm $1.o
