
SUBDIRS = bonds

AM_CPPFLAGS = -I${top_builddir} -I${top_srcdir}

this_includedir=${includedir}/${subdir}
this_include_HEADERS = \
    all.hpp \
    asianoption.hpp \
    assetswap.hpp \
    averagetype.hpp \
    barrieroption.hpp \
    barriertype.hpp \
    basketoption.hpp \
    bmaswap.hpp \
    bond.hpp \
    bondforward.hpp \
    callabilityschedule.hpp \
    capfloor.hpp \
    claim.hpp \
    cliquetoption.hpp \
    complexchooseroption.hpp \
    compositeinstrument.hpp \
    compoundoption.hpp \
    cpicapfloor.hpp \
    cpiswap.hpp \
    creditdefaultswap.hpp \
    dividendbarrieroption.hpp \
    dividendschedule.hpp \
    dividendvanillaoption.hpp \
    doublebarrieroption.hpp \
    doublebarriertype.hpp \
    equitytotalreturnswap.hpp \
    europeanoption.hpp \
    fixedratebondforward.hpp \
    fixedvsfloatingswap.hpp \
    floatfloatswap.hpp \
    floatfloatswaption.hpp \
    forward.hpp \
    forwardrateagreement.hpp \
    forwardvanillaoption.hpp \
    futures.hpp \
    holderextensibleoption.hpp \
    impliedvolatility.hpp \
    inflationcapfloor.hpp \
    lookbackoption.hpp \
    makecapfloor.hpp \
    makecds.hpp \
    makecms.hpp \
    makeois.hpp \
    makeswaption.hpp \
    makevanillaswap.hpp \
    makeyoyinflationcapfloor.hpp \
    margrabeoption.hpp \
    multiassetoption.hpp \
    nonstandardswap.hpp \
    nonstandardswaption.hpp \
    oneassetoption.hpp \
    overnightindexedswap.hpp \
    overnightindexfuture.hpp \
    partialtimebarrieroption.hpp \
    payoffs.hpp \
    quantobarrieroption.hpp \
    quantoforwardvanillaoption.hpp \
    quantovanillaoption.hpp \
    simplechooseroption.hpp \
    simplifynotificationgraph.hpp \
    stickyratchet.hpp \
    stock.hpp \
    swap.hpp \
    swaption.hpp \
    twoassetbarrieroption.hpp \
    twoassetcorrelationoption.hpp \
    vanillaoption.hpp \
    vanillastorageoption.hpp \
    vanillaswap.hpp \
    vanillaswingoption.hpp \
    varianceswap.hpp \
    writerextensibleoption.hpp \
    yearonyearinflationswap.hpp \
    zerocouponinflationswap.hpp \
    zerocouponswap.hpp

cpp_files = \
    asianoption.cpp \
    assetswap.cpp \
    averagetype.cpp \
    barrieroption.cpp \
    barriertype.cpp \
    basketoption.cpp \
    bmaswap.cpp \
    bond.cpp \
    bondforward.cpp \
    capfloor.cpp \
    claim.cpp \
    cliquetoption.cpp \
    complexchooseroption.cpp \
    compositeinstrument.cpp \
    compoundoption.cpp \
    cpicapfloor.cpp \
    cpiswap.cpp \
    creditdefaultswap.cpp \
    doublebarrieroption.cpp \
    doublebarriertype.cpp \
    equitytotalreturnswap.cpp \
    europeanoption.cpp \
    fixedvsfloatingswap.cpp \
    floatfloatswap.cpp \
    floatfloatswaption.cpp \
    forward.cpp \
    forwardrateagreement.cpp \
    forwardvanillaoption.cpp \
    futures.cpp \
    holderextensibleoption.cpp \
    impliedvolatility.cpp \
    inflationcapfloor.cpp \
    lookbackoption.cpp \
    makecapfloor.cpp \
    makecds.cpp \
    makecms.cpp \
    makeois.cpp \
    makeswaption.cpp \
    makevanillaswap.cpp \
    makeyoyinflationcapfloor.cpp \
    margrabeoption.cpp \
    multiassetoption.cpp \
    nonstandardswap.cpp \
    nonstandardswaption.cpp \
    oneassetoption.cpp \
    overnightindexedswap.cpp \
    overnightindexfuture.cpp \
    partialtimebarrieroption.cpp \
    payoffs.cpp \
    quantobarrieroption.cpp \
    quantoforwardvanillaoption.cpp \
    quantovanillaoption.cpp \
    simplechooseroption.cpp \
    simplifynotificationgraph.cpp \
    stickyratchet.cpp \
    stock.cpp \
    swap.cpp \
    swaption.cpp \
    twoassetbarrieroption.cpp \
    twoassetcorrelationoption.cpp \
    vanillaoption.cpp \
    vanillaswap.cpp \
    vanillaswingoption.cpp \
    varianceswap.cpp \
    writerextensibleoption.cpp \
    yearonyearinflationswap.cpp \
    zerocouponinflationswap.cpp \
    zerocouponswap.cpp

if UNITY_BUILD

nodist_libInstruments_la_SOURCES = unity.cpp

unity.cpp: Makefile.am
	echo "/* This file is automatically generated; do not edit.     */" > $@
	echo "/* Add the files to be included into Makefile.am instead. */" >> $@
	echo >> $@
	for i in $(cpp_files); do \
		echo "#include \"${subdir}/$$i\"" >> $@; \
	done

EXTRA_DIST = $(cpp_files)

else

libInstruments_la_SOURCES = $(cpp_files)

endif

libInstruments_la_LIBADD = \
    bonds/libBonds.la

noinst_LTLIBRARIES = libInstruments.la

all.hpp: Makefile.am
	echo "/* This file is automatically generated; do not edit.     */" > ${srcdir}/$@
	echo "/* Add the files to be included into Makefile.am instead. */" >> ${srcdir}/$@
	echo >> ${srcdir}/$@
	for i in $(filter-out all.hpp dividendbarrieroption.hpp dividendvanillaoption.hpp fixedratebondforward.hpp, $(this_include_HEADERS)); do \
		echo "#include <${subdir}/$$i>" >> ${srcdir}/$@; \
	done
	echo >> ${srcdir}/$@
	subdirs='$(SUBDIRS)'; for i in $$subdirs; do \
		echo "#include <${subdir}/$$i/all.hpp>" >> ${srcdir}/$@; \
	done

