#! /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, os.path

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

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

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

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

process(cxx = cxx,
        link = link)
