CC = @CC@
LD = @LD@

.SUFFIXES:
.SUFFIXES: .ec .c .o .so

libdir = @libdir@

plugindir = $(libdir)/gxsnmp/plugins

libinformix_backend.so: informix_backend.o
	$(LD) -shared -o libinformix_backend.so -rpath $(plugindir) informix_backend.o `esql -static -libs` /usr/lib/libc.a /usr/lib/libcrypt.a @GLIB_LIBS@

informix_backend.o: informix_backend.c
	$(CC) -c -I`echo $$INFORMIXDIR`/incl/esql @GLIB_CFLAGS@ informix_backend.c -I../../app -I../../lib

informix_backend.c: informix_backend.ec
	esql -e informix_backend.ec

clean: 
	-rm *.so *.o informix_backend.c core
