# Makefile for snmptrapfmt
#

TARGETS=	snmptrapfmthdlr snmptrapfmt
CONFFILES=	snmptrapfmt.conf
DEFS=		-I /usr/include/ucd-snmp -DSTDC_HEADERS -DDEBUG

# Compilation parameters:

CFLAGS= -O2 -g -Wall $(DEFS)
LIBS=	#-lsnmp -lieee -lnsl

# You should not need to change anything below this line.

all: $(TARGETS)

package: clean
	dpkg-buildpackage -us -uc

deb: clean
	debuild binary
  
snmptrapfmt:    snmptrapfmt.o log.o
	${CC} -g -o $@ snmptrapfmt.o log.o ${LIBS}

snmptrapfmthdlr:    snmptrapfmthdlr.o log.o
	${CC} -g -o $@ snmptrapfmthdlr.o log.o ${LIBS}

clean:
	rm -f core *.o *.bak ${TARGETS}

clobber: clean
	rm -f $(TARGETS)

install:
	make
	cp ${TARGETS} ${DESTDIR}/usr/sbin
	cp $(CONFFILES) $(DESTDIR)/etc/snmp
