#---------------------------------------------------------------------------
#  @(#) $Name: arts++-1-1-a12 $
#  @(#) $Id: Makefile.in,v 1.4 2005/05/10 17:58:43 kkeys Exp $
#---------------------------------------------------------------------------
top_builddir = ../..

OBJECTS = Arts.lo \
          ArtsHeader.lo \
	  ArtsAttribute.lo \
	  ArtsAttributeVector.lo \
	  ArtsIpPathEntry.lo \
	  ArtsIpPathData.lo \
	  ArtsIpPath.lo \
	  ArtsAsMatrixEntry.lo \
	  ArtsAsMatrixData.lo \
	  ArtsAsMatrix.lo \
	  ArtsAsMatrixAggregator.lo \
	  ArtsAsMatrixAggregatorMap.lo \
	  ArtsBgp4AggregatorAttribute.lo \
	  ArtsBgp4AsPathAttribute.lo \
	  ArtsBgp4AsPathSegment.lo \
	  ArtsBgp4Attribute.lo \
	  ArtsBgp4DPAttribute.lo \
	  ArtsBgp4Prefix.lo \
	  ArtsBgp4RouteEntry.lo \
	  ArtsBgp4RouteTableData.lo \
	  ArtsBgp4RouteTable.lo \
	  ArtsCflowdCustomData.lo \
	  ArtsBitString.lo \
	  ArtsDebug.lo \
	  ArtsFileUtil.lo \
	  ArtsIfIndexSelectionSet.lo \
	  ArtsInterfaceMatrixEntry.lo \
	  ArtsInterfaceMatrixData.lo \
	  ArtsInterfaceMatrix.lo \
	  ArtsInterfaceMatrixAggregator.lo \
	  ArtsInterfaceMatrixAggregatorMap.lo \
	  ArtsNetMatrixEntry.lo \
	  ArtsNetMatrixData.lo \
	  ArtsNetMatrix.lo \
	  ArtsNetMatrixAggregator.lo \
	  ArtsNetMatrixAggregatorMap.lo \
	  ArtsNextHopTableEntry.lo \
	  ArtsNextHopTableData.lo \
	  ArtsNextHopTable.lo \
	  ArtsNextHopTableAggregator.lo \
	  ArtsNextHopTableAggregatorMap.lo \
	  ArtsObjectTypeSelectionSet.lo \
	  ArtsPackageVersion.lo \
	  ArtsPortChoice.lo \
	  ArtsPortChooser.lo \
	  ArtsPortMatrixAggregator.lo \
	  ArtsPortMatrixAggregatorMap.lo \
	  ArtsPortMatrixEntry.lo \
	  ArtsPortMatrixData.lo \
	  ArtsPortMatrix.lo \
	  ArtsPortTableEntry.lo \
	  ArtsPortTableData.lo \
	  ArtsPortTable.lo \
	  ArtsPortTableAggregator.lo \
	  ArtsProtocolTableEntry.lo \
	  ArtsProtocolTableData.lo \
	  ArtsProtocolTable.lo \
	  ArtsProtocolTableAggregator.lo \
	  ArtsProtocolTableAggregatorMap.lo \
	  ArtsPrimitive.lo \
	  ArtsRttTimeSeriesTableData.lo \
	  ArtsRttTimeSeriesTable.lo \
	  ArtsSelectedPortTableData.lo \
	  ArtsSelectedPortTable.lo \
	  ArtsTimeIntervalSelectionSet.lo \
	  ArtsTosTableData.lo \
	  ArtsTosTable.lo \
	  ArtsTosTableAggregator.lo \
	  ArtsTosTableAggregatorMap.lo

CXX = @CXX@
C_R_A = @C_R_A@

############################################################################
#  Useful CXXFLAGS:
#
#    -DNDEBUG    will cause constructor/destructor calls to
#                not be counted.  Normally they are counted 
#		 by default, and a report of the number of
#                undestroyed objects can be seen by calling
#                ShowArtsObjectsNotFreed().  If you use
#		 -DNDEBUG, this code will not be compiled.
#
#    -DARTS_DEBUG_DO_ASSERTIONS   will enable several assertions that 
#                                 can aid in troubleshooting applications
#                                 and the library itself.
############################################################################
CXXFLAGS  = @CXXFLAGS@

LIBTOOL = @ /bin/sh $(top_builddir)/libtool
MKDEPINCL = -I../include -I../../include

.SUFFIXES: .cc .c .o .lo .a .la

../lib/libArts.la: ${OBJECTS}
	${LIBTOOL} ${CXX} -o ../lib/libArts.la ${OBJECTS} -rpath @libdir@ -version-info ${C_R_A}

.cc.o:
	${LIBTOOL} ${CXX} -c ${CXXFLAGS} -I../include $<

.cc.lo:
	${LIBTOOL} ${CXX} -c ${CXXFLAGS} -I../include $<


ArtsIfIndexSelectionSet.cc: ArtsIfIndexSelectionSet.lex
	flex -+ -PIfIndex -o$@ -t $*.lex | sed -ffixflex.sed >$@

ArtsObjectTypeSelectionSet.cc: ArtsObjectTypeSelectionSet.lex
	flex -+ -PObjectType -o$@ -t $*.lex | sed -ffixflex.sed >$@

ArtsPortChooser.cc: ArtsPortChooser.lex
	flex -+ -PPortChooser -o$@ -t $*.lex | sed -ffixflex.sed >$@

ArtsPrimitive.o: ArtsPrimitive.cc ../include/ArtsPrimitive.hh \
			../../include/aclocal.h ../include/caida_t.h
	${CXX} ${CXXFLAGS} -c ArtsPrimitive.cc -I../../include -I../include

ArtsPrimitive.lo: ArtsPrimitive.cc ../include/ArtsPrimitive.hh \
			../../include/aclocal.h ../include/caida_t.h
	${LIBTOOL} ${CXX} ${CXXFLAGS} -I../../include -I../include -c ArtsPrimitive.cc

ArtsTimeIntervalSelectionSet.cc: ArtsTimeIntervalSelectionSet.lex
	flex -+ -PTimeInterval -o$@ -t $*.lex | sed -ffixflex.sed >$@

clean::
	rm -f *.o *.lo ArtsPortChooser.cc ../lib/libArts.a ../lib/libArts.la
	rm -Rf .libs ../lib/.libs

install: ../lib/libArts.la
	if [ ! -d @prefix@ ]; then \
	  mkdir @prefix@ ; \
	fi
	if [ ! -d @libdir@ ]; then \
	  mkdir @libdir@ ; \
	fi
	@${LIBTOOL} ../../install-sh -c -m 644 ../lib/libArts.la @libdir@/libArts.la

tarball::
	-if [ -f @libdir@/libArts.a ]; then \
	  @TAR@ -rvf ../../@PKG_VERSION@_@OSNAME@.tar @libdir@/libArts.a ; \
	fi
	-if [ -f @libdir@/libArts.la ]; then \
	  . @libdir@/libArts.la ; \
	  for libfile in $$library_names ; do \
	    @TAR@ -uvf ../../@PKG_VERSION@_@OSNAME@.tar @libdir@/$$libfile ; \
	  done ; \
	fi




