
include_directories(${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )


########### next target ###############

set(attachMetrics_SRCS attachMetrics.cc)

kde4_add_executable(attachMetrics ${attachMetrics_SRCS})

target_link_libraries(attachMetrics ${KDE4_KDECORE_LIBS})


########### install files ###############

install(FILES  profiled.out  	is-static.tex command-line.tex  	profiled-p93.pdf DESTINATION )



#original Makefile.am contents follow:

##==========================================================================
## ROSE-HPCT tutorial example.
#
#include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
#
#LDADD = $(LIBS_WITH_RPATH) $(WAVE_LDFLAGS) $(ROSE_SEPARATE_LIBS) 
#
## HPCToolkit-generated files.
#HPCT_FILES = PAPI_FP_OPS.xml \
#	     PAPI_TOT_CYC.xml \
#	     PAPI_L1_DCA.xml \
#	     PAPI_L1_DCM.xml \
#	     PAPI_L2_TCM.xml
#
## Extra files that need to be included in a distribution tarball.
#EXTRA_DIST = $(HPCT_FILES) \
#	profiled.c profiled-save.out profiled-p93-save.pdf \
#	command-line-static.tex static.tex
#
## Data files generated by running the demo.
#noinst_DATA = profiled.out \
#	is-static.tex command-line.tex \
#	profiled-p93.pdf
#
## Split source listings for inclusion in the chapter.
#noinst_DATA += profiled.c.aa profiled.c.ab \
#	PAPI_TOT_CYC.xml.aa PAPI_TOT_CYC.xml.ab PAPI_FP_OPS.xml.aa \
#	PAPI_FP_OPS.xml.ab
#
#profiled.c.ab : profiled.c.aa
#
## This needs to be fixed to have a single lhs entry so that parallel make will work.
## profiled.c.aa profiled.c.ab: $(srcdir)/profiled.c
#profiled.c.aa : $(srcdir)/profiled.c
#	split -65 $(srcdir)/profiled.c profiled.c.
#	test -f profiled.c.aa
#	test -f profiled.c.ab
#
#PAPI_TOT_CYC.xml.ab: PAPI_TOT_CYC.xml.aa
#
## This needs to be fixed to have a single lhs entry so that parallel make will work.
## PAPI_TOT_CYC.xml.aa PAPI_TOT_CYC.xml.ab: $(srcdir)/PAPI_TOT_CYC.xml
#PAPI_TOT_CYC.xml.aa : $(srcdir)/PAPI_TOT_CYC.xml
#	split -61 $(srcdir)/PAPI_TOT_CYC.xml PAPI_TOT_CYC.xml.
#
#PAPI_FP_OPS.xml.ab: PAPI_FP_OPS.xml.aa
#
## This needs to be fixed to have a single lhs entry so that parallel make will work.
## PAPI_FP_OPS.xml.aa PAPI_FP_OPS.xml.ab: $(srcdir)/PAPI_FP_OPS.xml
#PAPI_FP_OPS.xml.aa : $(srcdir)/PAPI_FP_OPS.xml
#	split -61 $(srcdir)/PAPI_FP_OPS.xml PAPI_FP_OPS.xml.
#
##==========================================================================
#if ROSE_BUILD_ROSEHPCT # (--enable-rosehpct)
##==========================================================================
#
## DQ (3/21/2009): These fail to compile under Cygwin.
#if !ROSE_BUILD_OS_IS_CYGWIN
#
## Build demo program
#noinst_PROGRAMS = attachMetrics
#attachMetrics_SOURCES = attachMetrics.cc
#attachMetrics_LDFLAGS = \
#	$(ROSE_ROSEHPCT_LIBS_WITH_PATH) \
#	$(ROSE_LIBS_WITH_PATH) \
#	$(ROSEHPCT_DEP_LIBS) \
#	$(RT_LIBS)
#INCLUDES = $(ROSE_INCLUDES) $(ROSE_ROSEHPCT_INCLUDES) $(ROSEHPCT_DEP_INCLUDES)
#
## Extra data generated that needs to be cleaned up
#noinst_DATA += profiled.c.pdf
#
#profiled.c.pdf command-line.tex: profiled.out
#
## Run demo program
## This needs to be fixed to have a single lhs entry so that parallel make will work.
## profiled.out profiled.c.pdf command-line.tex: attachMetrics $(HPCT_FILES) $(srcdir)/profiled.c
#profiled.out: attachMetrics $(HPCT_FILES) $(srcdir)/profiled.c
#	cmdline="./attachMetrics -rose:hpct:prof $(srcdir)/PAPI_TOT_CYC.xml -rose:hpct:prof $(srcdir)/PAPI_FP_OPS.xml -rose:hpct:eqpath .=`cd $(srcdir) && pwd` -c $(srcdir)/profiled.c" ; \
#	echo $$cmdline \
#	  | sed 's,-rose:hpct:,\\\n  -rose:hpct,g' \
#	  | sed 's, -c ,\\\n  -c ,g' \
#	  > command-line.tex ; \
#	$$cmdline > profiled.out
#
## Liao, 5/9/2008. the page number has been changed to 67 in recent snapshot, pdf dump is much more thorough than before for unknown reasons to me.
#profiled-p93.pdf: profiled.c.pdf
#	if ! gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$@ \
#	    -dFirstPage=67 -dLastPage=67 profiled.c.pdf ; then \
#	  cp $(srcdir)/profiled-p93-save.pdf $@ ; \
#	fi
#
## Generate additional file for tutorial chapter.
#is-static.tex:
#	rm -f $@
#	touch $@
#
#else
#
## DQ (3/21/2009): Copy the required files (just as for the case of --disable-rosehpct)
#profiled.out: $(srcdir)/profiled-save.out
#	cp $(srcdir)/profiled-save.out $@
#
#profiled-p93.pdf: $(srcdir)/profiled-p93-save.pdf
#	cp $(srcdir)/profiled-p93-save.pdf $@
#
#is-static.tex: $(srcdir)/static.tex
#	cp $(srcdir)/static.tex $@
#
#command-line.tex: $(srcdir)/command-line-static.tex
#	cp $(srcdir)/command-line-static.tex $@
#
#endif
#
##==========================================================================
#else # !ROSE_BUILD_ROSEHPCT (--disable-rosehpct)
##==========================================================================
#
## ROSE-HPCT not enabled, so just use pre-generated data.
#
#profiled.out: $(srcdir)/profiled-save.out
#	cp $(srcdir)/profiled-save.out $@
#
#profiled-p93.pdf: $(srcdir)/profiled-p93-save.pdf
#	cp $(srcdir)/profiled-p93-save.pdf $@
#
#is-static.tex: $(srcdir)/static.tex
#	cp $(srcdir)/static.tex $@
#
#command-line.tex: $(srcdir)/command-line-static.tex
#	cp $(srcdir)/command-line-static.tex $@
#
#endif # ROSE_BUILD_ROSEHPCT
#
##==========================================================================
## Miscellaneous
#
#clean-local:
#	rm -rf $(CXX_TEMPLATE_OBJECTS) Templates.DB ii_files ti_files
#	rm -f $(noinst_DATA) rose_profiled.c
#
#distclean-local:
#	rm -rf Templates.DB
#	rm -f $(noinst_DATA)
#
## DQ (5/27/2007): Added docs rule
#docs: $(noinst_PROGRAMS) $(noinst_DATA)
#	@echo ""
#	@echo "***************************************************************************"
#	@echo "Generated required documentation for tutorial/roseHPCT (make docs rule) ..."
#	@echo "***************************************************************************"
#
## eof
