LDFLAGS += -pthread `pkg-config --libs glib-2.0 gstreamer-0.10 gstreamer-plugins-base-0.10` -lgstvideo-0.10
CFLAGS += -pthread `pkg-config --cflags glib-2.0 gstreamer-0.10 gstreamer-plugins-base-0.10`

all: libgstredgreen.la

libgstredgreen.la: gstredgreen.lo
	libtool --tag=CC --tag=disable-static --mode=link $(CC) -ggdb -module -avoid-version gstredgreen.lo $(LDFLAGS) -o $@ -rpath /usr/local/lib 

%.lo: %.c
	libtool --mode=compile --tag=CC $(CC) -fPIC -DPIC -ggdb  -c $< $(CFLAGS) -o $@

clean:
	@rm -rf *.o *.so *.lo *.la .libs
