# GNU Makefile -- Makefile
# 2009 Reto Zingg

CC = gcc
DBG = gdb
STD = _GNU_SOURCE
CFLAGS = `pkg-config hildon-1 --cflags` -I/usr/include/dbus-1.0/ -I/usr/lib/dbus-1.0/include/
LFLAGS =  -shared `pkg-config hildon-1 --libs`

MAIN_OBJ = mancala-ui-plugin.o



#'$<' is filename of input, '$@' is filename of output
.c.o:
	$(CC) -c -g$(DBG) -Wall $(CFLAGS) -D$(STD) $<
.h.o:
	$(CC) -c -g$(DBG) -Wall $(CFLAGS) -D$(STD) $<

all:	$(MAIN_OBJ)
	$(CC) $(LFLAGS) $(MAIN_OBJ) -o mancala-ui-plugin.so

install:	all
	mkdir -p $(DESTDIR)/home/opt/mancala/plugin/
	cp mancala-ui-plugin.so $(DESTDIR)/home/opt/mancala/plugin/

clean:
	rm -f *.o *.core *.swp *~ *.log

clobber:	clean
	rm -f mancala-ui-plugin.so



