Add new indirect control flow analysis code. The code is still using ParseAPI level...
[dyninst.git] / parseAPI / CMakeLists.txt
1 # CMake configuration for parseAPI directory
2
3 include_directories (
4     ${PROJECT_SOURCE_DIR}/parseAPI/src
5   )
6
7
8 set (SRC_LIST
9         src/ParserDetails.C 
10         src/Parser.C 
11         src/CFGFactory.C 
12         src/Function.C 
13         src/Block.C 
14         src/CodeObject.C 
15         src/debug_parse.C 
16         src/CodeSource.C 
17         src/ParseData.C
18         src/InstructionAdapter.C
19         src/Parser-speculative.C
20         src/ParseCallback.C 
21         src/IA_IAPI.C
22         src/IA_x86Details.C 
23         src/IA_powerDetails.C 
24         src/IA_platformDetailsFactory.C 
25         src/CFGModifier.C
26         src/StackTamperVisitor.C
27         src/BackwardSlicing.C
28         src/BoundFactCalculator.C
29         src/BoundFactData.C
30         src/IndirectAnalyzer.C
31         src/IndirectASTVisitor.C
32         src/TableGuardData.C
33         ../dataflowAPI/src/ABI.C 
34         ../dataflowAPI/src/Absloc.C 
35         ../dataflowAPI/src/AbslocInterface.C 
36         ../dataflowAPI/src/convertOpcodes.C 
37         ../dataflowAPI/src/debug_dataflow.C 
38         ../dataflowAPI/src/ExpressionConversionVisitor.C 
39         ../dataflowAPI/src/InstructionCache.C 
40         ../dataflowAPI/src/liveness.C 
41         ../dataflowAPI/src/RegisterMap.C 
42         ../dataflowAPI/src/RoseImpl.C 
43         ../dataflowAPI/src/RoseInsnFactory.C 
44         ../dataflowAPI/src/slicing.C 
45         ../dataflowAPI/src/stackanalysis.C 
46         ../dataflowAPI/src/SymbolicExpansion.C 
47         ../dataflowAPI/src/SymEval.C 
48         ../dataflowAPI/src/SymEvalPolicy.C 
49         ../dataflowAPI/src/templates.C 
50         ../dataflowAPI/src/Visitors.C 
51     )
52
53 if (LIGHTWEIGHT_SYMTAB)
54 set (SRC_LIST ${SRC_LIST}
55     src/SymLiteCodeSource.C
56 )
57 else()
58 set (SRC_LIST ${SRC_LIST}
59     src/SymtabCodeSource.C
60 )
61 endif()
62
63 if (PLATFORM MATCHES amd64 OR PLATFORM MATCHES i386 OR PLATFORM
64 MATCHES x86_64)
65 set (SRC_LIST ${SRC_LIST}
66      src/InstructionSource-x86.C
67      src/IA_x86.C
68 )
69 elseif (PLATFORM MATCHES ppc)
70 set (SRC_LIST ${SRC_LIST}
71      src/InstructionSource-power.C
72      src/IA_power.C
73 )
74 endif()
75
76 if (ENABLE_PARSE_API_GRAPHS)
77 set (SRC_LIST ${SRC_LIST}
78      src/GraphAdapter.C
79     )
80 endif()
81
82 SET_SOURCE_FILES_PROPERTIES(${SRC_LIST} PROPERTIES LANGUAGE CXX)
83
84 ADD_DEFINITIONS(-DPARSER_LIB)
85 ADD_DEFINITIONS(-DDATAFLOW_LIB)
86
87 add_library (parseAPI ${SRC_LIST})
88 add_library (parseAPI_static STATIC ${SRC_LIST})
89 target_link_private_libraries(parseAPI common)
90 target_link_private_libraries(parseAPI instructionAPI)
91
92 if (LIGHTWEIGHT_SYMTAB)
93 target_link_private_libraries(parseAPI symLite)
94 else()
95 target_link_private_libraries(parseAPI symtabAPI)
96 endif()
97
98 FILE (GLOB headers "h/*.h")
99 FILE (GLOB dataflowheaders "../dataflowAPI/h/*.h")
100 set_target_properties (parseAPI parseAPI_static PROPERTIES PUBLIC_HEADER "${headers};${dataflowheaders}")
101
102
103 INSTALL (TARGETS parseAPI parseAPI_static
104         EXPORT DyninstTargets
105         RUNTIME DESTINATION ${INSTALL_LIB_DIR}
106         LIBRARY DESTINATION ${INSTALL_LIB_DIR}
107         ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
108         PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})