ARTSPPINC = -I@artspp@/include
ARTSPPLIB = -L@artspp@/lib -lArts
SNMPPINC  = -I../../snmp++/classes/include
SNMPPPLIB = ../../snmp++/classes/lib/libsnmp++.la
CFDINC    = -I../../classes/include -I../../include -I.
CFDLIB    = ../../classes/lib/libCfd.la
OBJECTS   = CflowdRawFlowClientList.o cflowdmux.o
CXX       = @CXX@
CXXFLAGS  = @CXXFLAGS@
top_builddir = ../..
LIBTOOL = @ /bin/sh $(top_builddir)/libtool

all: cflowdmux

cflowdmux: ${OBJECTS} ${CFDLIB}
	${LIBTOOL} ${CXX} ${CXXFLAGS} ${OBJECTS} ${CFDLIB} ${ARTSPPLIB} \
	  ${SNMPPPLIB} @FLEXLIB@ @LIBS@ -o cflowdmux -rpath @artspp@/lib

cflowdmux.o: cflowdmux.cc
	${CXX} ${CXXFLAGS} -c cflowdmux.cc ${ARTSPPINC} ${CFDINC} ${SNMPPINC}

CflowdRawFlowClientList.o: CflowdRawFlowClientList.cc \
			   CflowdRawFlowClientList.hh
	${CXX} ${CXXFLAGS} -c CflowdRawFlowClientList.cc ${CFDINC} ${ARTSPPINC}

lex.yy.cc: config.lex
	flex -+ config.lex

lex.yy.o: lex.yy.cc
	${CXX} ${CXXFLAGS} -c lex.yy.cc @FLEXINC@ ${CFDINC} ${ARTSPPINC}

strip: all
	@ -if [ -f .libs/cflowdmux ]; then \
	  strip .libs/cflowdmux ; \
	else \
	  strip cflowdmux ; \
	fi

clean::
	rm -f ${OBJECTS} cflowdmux lex.yy.cc
	rm -Rf .libs

install: all
	${LIBTOOL} ../../install-sh -c -m 555 cflowdmux @sbindir@/cflowdmux

tarball::
	@TAR@ -uvf ../../@PKG_VERSION@_@OSNAME@.tar @sbindir@/cflowdmux


