ADDINCL(${PYTHON_SRC_DIR})
ADDINCL(${PYTHON_SRC_DIR}/Include)
ADDINCL(${PYTHON_SRC_DIR}/Python)

IF (WIN32)
    ADDINCL(${PYTHON_SRC_DIR}/PC)
ENDIF ()

SRCDIR(${PYTHON_SRC_DIR})

SRCS(
    Parser/acceler.c
    Parser/grammar1.c
    Parser/listnode.c
    Parser/node.c
    Parser/parser.c
    Parser/parsetok.c
    Parser/bitset.c
    Parser/metagrammar.c
    Parser/firstsets.c
    Parser/grammar.c
    Parser/pgen.c
    Parser/myreadline.c
    Parser/tokenizer.c
    Objects/unicodeobject.c
    Objects/unicodectype.c
    Objects/abstract.c
    Objects/boolobject.c
    Objects/bufferobject.c
    Objects/bytes_methods.c
    Objects/bytearrayobject.c
    Objects/capsule.c
    Objects/cellobject.c
    Objects/classobject.c
    Objects/cobject.c
    Objects/codeobject.c
    Objects/complexobject.c
    Objects/descrobject.c
    Objects/enumobject.c
    Objects/exceptions.c
    Objects/genobject.c
    Objects/fileobject.c
    Objects/floatobject.c
    Objects/frameobject.c
    Objects/funcobject.c
    Objects/intobject.c
    Objects/iterobject.c
    Objects/listobject.c
    Objects/longobject.c
    Objects/dictobject.c
    Objects/memoryobject.c
    Objects/methodobject.c
    Objects/moduleobject.c
    Objects/object.c
    Objects/obmalloc.c
    Objects/rangeobject.c
    Objects/setobject.c
    Objects/sliceobject.c
    Objects/stringobject.c
    Objects/structseq.c
    Objects/tupleobject.c
    Objects/typeobject.c
    Objects/weakrefobject.c
    Python/thread.c
    Python/_warnings.c
    Python/Python-ast.c
    Python/asdl.c
    Python/ast.c
    Python/bltinmodule.c
    Python/ceval.c
    Python/compile.c
    Python/codecs.c
    Python/errors.c
    Python/future.c
    Python/getargs.c
    Python/getcompiler.c
    Python/getcopyright.c
    Python/getplatform.c
    Python/getversion.c
    Python/graminit.c
    Python/import.c
    Python/importdl.c
    Python/marshal.c
    Python/modsupport.c
    Python/mystrtoul.c
    Python/mysnprintf.c
    Python/peephole.c
    Python/pyarena.c
    Python/pyctype.c
    Python/pyfpe.c
    Python/pymath.c
    Python/pystate.c
    Python/pythonrun.c
    Python/random.c
    Python/structmember.c
    Python/symtable.c
    Python/sysmodule.c
    Python/traceback.c
    Python/getopt.c
    Python/pystrcmp.c
    Python/pystrtod.c
    Python/dtoa.c
    Python/formatter_unicode.c
    Python/formatter_string.c
    Modules/config.c
    Modules/main.c
    Modules/gcmodule.c
    Modules/threadmodule.c
    Modules/signalmodule.c
    Modules/errnomodule.c
    Modules/_sre.c
    Modules/_codecsmodule.c
    Modules/_weakref.c
    Modules/zipimport.c
    Modules/symtablemodule.c
    Modules/xxsubtype.c
    Modules/getbuildinfo.c
)

IF (UNIX)
    SRCS(
        Modules/getpath.c
        Python/dynload_shlib.c
    )
ELSEIF (WIN32)
    SRCS(
        PC/dl_nt.c
        PC/getpathp.c
        PC/import_nt.c
        PC/msvcrtmodule.c
        PC/_subprocess.c
        PC/_winreg.c
        Python/dynload_win.c
    )
ENDIF ()

CFLAGS(
    ${PYTHON_FLAGS}
)

INCLUDE(CMakeModules.inc)