Compile in StackVisitor
[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      = Dyninst
10 RELEASE_NUM     = 6.1
11 #BUILD_MARK should be (re-)defined in core/make.config.local rather than here!
12
13 CFLAGS               += $(USEFULWARNINGS) -I$(TO_CORE)/../include
14 CXXFLAGS             += $(USEFULWARNINGS) -I$(TO_CORE)/../include
15
16 LDFLAGS += -lcommon -lsymtabAPI
17
18 LDFLAGS     += $(LIBDIR)
19 ifndef USES_NATIVE_CC
20 LD              = $(GXX)
21 LDFLAGS         += -shared $(G_PTHREAD_LD)
22 CFLAGS          += -fPIC
23 CXXFLAGS        += -fPIC $(G_PTHREAD)
24 else
25 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
26 LDFLAGS         += -G
27 endif #sparc
28 endif #USES_NATIVE
29
30 ifneq ($(findstring cap_instruction_api,$(CAP_DEF)),)
31     LDFLAGS += -linstructionAPI
32 endif
33
34 TO_INC   = ../h
35
36 PUBLIC_H = \
37     CFGFactory.h\
38     CFG.h\
39     CodeObject.h\
40     CodeSource.h\
41     InstructionAdapter.h\
42     InstructionSource.h\
43     ParseCallback.h\
44     ParseContainers.h
45
46 SRCS += ../src/ParserDetails.C \
47         ../src/Parser.C \
48         ../src/CFGFactory.C \
49         ../src/Function.C \
50         ../src/Block.C \
51                 ../src/CodeObject.C \
52                 ../src/debug_parse.C \
53         ../src/SymtabCodeSource.C \
54         ../src/ParseData.C\
55         ../src/InstructionAdapter.C\
56         ../src/Parser-speculative.C
57         
58 ifneq ($(findstring cap_instruction_api,$(CAP_DEF)),)
59 SRCS += ../../dataflowAPI/src/Absloc.C \
60         ../../dataflowAPI/src/AbslocInterface.C \
61         ../../dataflowAPI/src/convertOpcodes.C \
62         ../../dataflowAPI/src/debug_dataflow.C \
63         ../../dataflowAPI/src/ExpressionConversionVisitor.C \
64         ../../dataflowAPI/src/RoseImpl.C \
65         ../../dataflowAPI/src/RoseInsnFactory.C \
66         ../../dataflowAPI/src/slicing.C \
67         ../../dataflowAPI/src/stackanalysis.C \
68         ../../dataflowAPI/src/SymbolicExpansion.C \
69         ../../dataflowAPI/src/SymEval.C \
70         ../../dataflowAPI/src/SymEvalPolicy.C \
71         ../../dataflowAPI/src/templates.C \
72         ../../dataflowAPI/src/Visitors.C \
73         ../src/StackTamperVisitor.C
74
75 VPATH += ../../dataflowAPI/src
76 VPATH += ../../dataflowAPI/h
77
78 PUBLIC_H += Absloc.h \
79          AbslocInterface.h \
80          slicing.h \
81          SymEval.h \
82          stackanalysis.h
83 endif
84
85 ifndef USES_NATIVE_CC
86 ifdef CROSSCOMPILER
87 SYSLIBS         += -liberty -lg++ -lstdc++ -lm
88 else
89 SYSLIBS         += -liberty
90 endif
91 else
92 SYSLIBS         += -ldemangle
93 endif
94
95
96 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
97
98
99 # All that, and we finally get a target...
100 all: $(TARGET) $(EXTRA_LIBS)
101