#! /usr/bin/env python

from Synopsis import config
from Synopsis.process import process
from Synopsis.Processor import *
from Synopsis.Processors import *
from Synopsis.Parsers import Cxx

from distutils import sysconfig
import sys, os.path

topdir = '@topdir@'
srcdir = '@srcdir@'

cppflags = ['-I.',
            '-I%s'%(topdir + '/Cxx-API/include'),
            '-I%s'%(srcdir),
            '-I%s'%(sysconfig.get_python_inc())]

cxx = Cxx.Parser(base_path = topdir + '/',
                 cppflags = cppflags,
                 syntax_prefix = 'links',
                 xref_prefix = 'xref')

link = Linker(Comments.Translator(filter = Comments.SSDFilter()))

process(cxx = cxx,
        link = link)
