#
# Warning: you may need more libraries than are included here on the
# build line.  The agent frequently needs various libraries in order
# to compile pieces of it, but is OS dependent and we can't list all
# the combinations here.  Instead, look at the libraries that were
# used when linking the snmpd master agent and copy those to this
# file.
#

CC=gcc


OBJS2=netSnmpPrvTable_subagent.o netSnmpPrvTable.o

TARGETS=netSnmpPrvTable_subagent

CFLAGS=-I. `net-snmp-config --cflags`
BUILDLIBS=`net-snmp-config --libs`
BUILDAGENTLIBS=`net-snmp-config --agent-libs`

# shared library flags (assumes gcc)
DLFLAGS=-fPIC -shared

all: $(TARGETS)


netSnmpPrvTable_subagent: $(OBJS2)
	$(CC) -o netSnmpPrvTable_subagent $(OBJS2)  $(BUILDAGENTLIBS)

clean:
	rm $(OBJS2) $(OBJS2) $(TARGETS)

netSnmpPrvTable.so: netSnmpPrvTable.c Makefile
	$(CC) $(CFLAGS) $(DLFLAGS) -c -o netSnmpPrvTable.o netSnmpPrvTable.c
	$(CC) $(CFLAGS) $(DLFLAGS) -o netSnmpPrvTable.so netSnmpPrvTable.o

