Merge branch 'pc_bgq' into dyninst_proccontrol
[dyninst.git] / parseAPI / make.module.tmpl
1
2 # Common makefile template for the dyninstAPI library.  This file is not
3 # intended to be a useful Makefile in isolation; instead, it should be
4 # included from within an architecture-specific Makefile.
5 #
6 # $Id: make.module.tmpl,v 1.4 2008/09/15 17:38:17 jaw Exp $
7 #
8
9 SUITE_NAME      = ParseAPI
10 RELEASE_MAJOR   = 7
11 RELEASE_MINOR = 0
12 #BUILD_MARK should be (re-)defined in core/make.config.local rather than here!
13
14 ifndef TARGET
15 ifdef STATIC_COMPS
16 STATIC_LIBRARY = true
17 TARGET = libparseAPI.a
18 else
19 TARGET = libparseAPI.so
20 endif
21 endif
22
23 ifndef STATIC_COMPS
24 CFLAGS += -fPIC
25 CXXFLAGS += -fPIC
26 endif
27
28 CFLAGS               += $(USEFULWARNINGS) -I$(TO_CORE)/../include
29 CXXFLAGS             += $(USEFULWARNINGS) -I$(TO_CORE)/../include
30
31 LDFLAGS += -L../../common/$(PLATFORM) -L../../symtabAPI/$(PLATFORM) -lcommon -lsymtabAPI
32
33 LDFLAGS     += $(LIBDIR)
34 ifndef USES_NATIVE_CC
35 LD              = $(GXX)
36 LDFLAGS         += -shared $(G_PTHREAD_LD)
37 CXXFLAGS        += $(G_PTHREAD)
38 else
39 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
40 LDFLAGS         += -G
41 endif #sparc
42 endif #USES_NATIVE
43
44 ifneq ($(findstring cap_instruction_api,$(CAP_DEF)),)
45     LDFLAGS += -L../../instructionAPI/$(PLATFORM) -linstructionAPI
46 endif
47
48 TO_INC   = ../h
49
50 PUBLIC_H = \
51     CFGFactory.h\
52     CFGModifier.h \
53     CFG.h\
54     CodeObject.h\
55     CodeSource.h\
56     Location.h\
57     InstructionAdapter.h\
58     InstructionSource.h\
59     ParseCallback.h\
60     ParseContainers.h
61
62 SRCS += ../src/ParserDetails.C \
63         ../src/Parser.C \
64         ../src/CFGFactory.C \
65         ../src/Function.C \
66         ../src/Block.C \
67                 ../src/CodeObject.C \
68                 ../src/debug_parse.C \
69         ../src/SymtabCodeSource.C \
70         ../src/ParseData.C\
71         ../src/InstructionAdapter.C\
72         ../src/Parser-speculative.C\
73         ../src/ParseCallback.C \
74         ../src/IA_x86Details.C \
75         ../src/IA_powerDetails.C \
76         ../src/IA_platformDetailsFactory.C \
77         ../src/CFGModifier.C
78
79 ifneq ($(findstring cap_instruction_api,$(CAP_DEF)),)
80 SRCS += ../../dataflowAPI/src/ABI.C \
81         ../../dataflowAPI/src/Absloc.C \
82         ../../dataflowAPI/src/AbslocInterface.C \
83         ../../dataflowAPI/src/convertOpcodes.C \
84         ../../dataflowAPI/src/debug_dataflow.C \
85         ../../dataflowAPI/src/ExpressionConversionVisitor.C \
86         ../../dataflowAPI/src/InstructionCache.C \
87         ../../dataflowAPI/src/liveness.C \
88         ../../dataflowAPI/src/RegisterMap.C \
89         ../../dataflowAPI/src/RoseImpl.C \
90         ../../dataflowAPI/src/RoseInsnFactory.C \
91         ../../dataflowAPI/src/slicing.C \
92         ../../dataflowAPI/src/stackanalysis.C \
93         ../../dataflowAPI/src/SymbolicExpansion.C \
94         ../../dataflowAPI/src/SymEval.C \
95         ../../dataflowAPI/src/SymEvalPolicy.C \
96         ../../dataflowAPI/src/templates.C \
97         ../../dataflowAPI/src/Visitors.C \
98         ../src/StackTamperVisitor.C
99
100 VPATH += ../../dataflowAPI/src
101 VPATH += ../../dataflowAPI/h
102
103 PUBLIC_H += Absloc.h \
104          AbslocInterface.h \
105          slicing.h \
106          SymEval.h \
107          stackanalysis.h \
108          liveness.h \
109          ABI.h \
110          bitArray.h \
111          InstructionCache.h      
112 endif
113
114 IFLAGS       += -I../$(PLATFORM) -I../src -I../../dataflowAPI/src -I../../dataflowAPI/h -I../h -I../../dynutil/h -I../../symtabAPI/h -I../../common/h -I../../instructionAPI/h
115
116