#
# Makefile for meter, SUNOS version
#

SRC=		../../src/meter
SINCLUDE= 	../../src/snmplib/include
MINCLUDE=	../../src/meter/include

SNMPH = $(SINCLUDE)/ausnmp.h \
	$(SINCLUDE)/asn1.h $(SINCLUDE)/mib.h \
	$(SINCLUDE)/snmp.h $(SINCLUDE)/snmpimpl.h

METERH = $(MINCLUDE)/flowhash.h $(MINCLUDE)/met_vars.h \
	$(MINCLUDE)/decnet.h $(MINCLUDE)/pktsnap.h

TARG=	NeTraMet

LIBS=	../apps/snmpagnt.o ../snmplib/libsnmp.a

CFLAGS=	-g -I$(MINCLUDE) -I$(SINCLUDE) -DSUNOS -DCLNS -DUSE_NIT
SCC=	cc   #  Sun K&R compiler
#CC=	acc  #  Sun ANSII compiler
CC=	/usr/local/bin/gcc  #  GNU C compiler

all: $(TARG)


meter_ux.o:  $(SNMPH) $(METERH) $(SRC)/meter_ux.c
	${CC} $(CFLAGS) -c $(SRC)/meter_ux.c

ether_ux.o:  $(SNMPH) $(METERH) $(SRC)/ether_ux.c
	${SCC} $(CFLAGS) -c $(SRC)/ether_ux.c

flowhash.o:	$(SNMPH) $(METERH) $(SRC)/flowhash.c
	${CC} $(CFLAGS) -c $(SRC)/flowhash.c

met_vars.o:	$(SNMPH) $(METERH) $(SRC)/met_vars.c
	${CC} $(CFLAGS) -c $(SRC)/met_vars.c


NeTraMet:	flowhash.o met_vars.o meter_ux.o ether_ux.o ${LIBS}
	${CC} -o $@ meter_ux.o ether_ux.o flowhash.o met_vars.o ${LIBS}


  
clean:
	rm -f *.o ${TARG}

install:
	cp ${TARG} ../bin




