Adding BPatch_dependenceGraphNode and -Edge to represent graphs used in slicing
[dyninst.git] / dyninstAPI / 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.90 2007/09/12 20:57:01 bernat Exp $
7 #
8
9 SUITE_NAME      = Dyninst
10 RELEASE_NUM     = 5.0b1
11 #BUILD_MARK should be (re-)defined in core/make.config.local rather than here!
12
13 DEFINES              += -UMT_THREAD \
14                         -DBPATCH_LIBRARY -DBPATCH_SET_MUTATIONS_ACTIVE \
15                         -DBPATCH_LIBRARY_F -DNEW_TIME_TYPES
16
17 CFLAGS               += $(USEFULWARNINGS) $(DEFINES)
18 CXXFLAGS             += $(USEFULWARNINGS) $(DEFINES)
19 TFLAGS               += $(TCLFRIENDLYWARNINGS) $(DEFINES)
20
21 ifdef GCC_2_95
22 # This may cause problems on Alpha
23 # GCC has a new mangled name squisher (-fsquangle) which can be 
24 # set to "on" by default. This causes linker problems, so we
25 # default to "off".
26 CFLAGS          += -fno-squangle
27 CXXFLAGS        += -fno-squangle
28 TFLAGS          += -fno-squangle
29 endif
30
31 ifndef TARGET
32 TARGET          = libdyninstAPI.so
33 endif
34
35 LDFLAGS += -lpthread -lsymtabAPI -lcommon
36
37 LDFLAGS     += $(LIBDIR)
38 ifndef USES_NATIVE_CC
39 LD              = $(GXX)
40 LDFLAGS         += -shared $(G_PTHREAD_LD)
41 CFLAGS          += -fPIC
42 CXXFLAGS        += -fPIC $(G_PTHREAD)
43 else
44 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
45 LDFLAGS         += -G
46 endif #sparc
47 endif #USES_NATIVE
48 TFLAGS          += -fPIC
49
50 VPATH        += ../../dyninstAPI/src:../dyninstAPI/h:\
51                 ../../common/src:../../paradyn/h
52
53 ifndef AUTO_TEMPLATES
54 SRCS         += ../src/BPatch_templates.C \
55                 ../src/templates0.C \
56                 ../src/templates1.C \
57                 ../src/templates2.C \
58
59 endif
60
61 SRCS         += ../src/BPatch.C \
62                 ../src/BPatch_image.C \
63                 ../src/BPatch_function.C \
64                 ../src/BPatch_snippet.C \
65                 ../src/BPatch_thread.C \
66               ../src/BPatch_process.C \
67                 ../src/BPatch_type.C \
68                 ../src/BPatch_module.C \
69                 ../src/BPatch_point.C \
70                 ../src/BPatch_collections.C \
71                 ../src/BPatch_sourceBlock.C \
72                 ../src/BPatch_basicBlock.C \
73                 ../src/BPatch_basicBlockLoop.C \
74                 ../src/BPatch_edge.C \
75                 ../src/BPatch_loopTreeNode.C \
76                 ../src/BPatch_flowGraph.C \
77                 ../src/BPatch_frame.C \
78                 ../src/BPatch_parRegion.C \
79                 ../src/BPatch_statement.C \
80                 ../src/MemoryAccess.C \
81                 ../src/dummy.C \
82                 ../src/debug.C \
83                 ../src/ast.C \
84                 ../src/registerSpace.C \
85                 ../src/arch.C \
86                 ../src/inst.C \
87                 ../src/instPoint.C \
88                 ../src/multiTramp.C \
89                 ../src/baseTramp.C \
90                 ../src/miniTramp.C \
91                 ../src/replacedInstruction.C \
92                 ../src/InstrucIter-xplat.C \
93                 ../src/dyn_thread.C \
94                 ../src/addressSpace.C \
95                 ../src/process.C \
96                 ../src/binaryEdit.C \
97                 ../src/infHeap.C \
98                 ../src/dyn_lwp.C \
99                 ../src/frame.C \
100                 ../src/signalhandler.C \
101                 ../src/signalgenerator.C \
102                                 ../src/eventgate.C \
103                 ../src/callbacks.C \
104                 ../src/mailbox.C \
105                 ../src/EventHandler.C \
106                 ../src/rpcMgr.C \
107                 ../src/rpcMgr-lwp.C \
108                 ../src/rpcMgr-thr.C \
109                 ../src/codeRange.C \
110                 ../src/stats.C \
111                 ../src/symtab.C \
112         ../src/image-flowGraph.C \
113                 ../src/dominator.C \
114                 ../src/image-func.C \
115                 ../src/mapped_object.C \
116                 ../src/mapped_module.C \
117                 ../src/function.C \
118                 ../src/reloc-func.C \
119                 ../src/variable.C \
120                 ../src/util.C \
121                 ../src/LineInformation.C \
122                 ../src/BPatch_instruction.C \
123                 ../src/BPatch_asyncEventHandler.C \
124                 ../src/BPatch_eventLock.C \
125                 ../src/BPatch_annotatable.C \
126                 ../src/parRegion.C \
127                 ../src/bitArray.C
128
129 #IGEN_GEN_SRCS = 
130
131 #IGEN_ISRCS    = 
132
133 ifndef USES_NATIVE_CC
134 ifdef CROSSCOMPILER
135 SYSLIBS         += -liberty -lg++ -lstdc++ -lm
136 else
137 SYSLIBS         += -liberty
138 endif
139 else
140 SYSLIBS         += -ldemangle
141 endif
142
143
144 IFLAGS       += -I../$(PLATFORM) -I../src -I../h
145
146 # All that, and we finally get a target...
147 all: $(TARGET) $(EXTRA_LIBS)
148
149
150 # I couldn't figure out how to explicitly instantiate a templated
151 # function whose template arguments are protected members of
152 # LineInformation, but apparently the compiler can.  Since the
153 # function is only used internally by LineInformation, the
154 # templates won't be duplicated.
155 LineInformation.o : ../../dyninstAPI/src/LineInformation.C
156         $(CXX) -g $(TFLAGS) -c $<
157     
158 BPatch_templates.o: ../src/BPatch_templates.C
159         $(CXX) $(TFLAGS) -c ../src/BPatch_templates.C
160
161 templates0.o: ../src/templates0.C
162         $(CXX) $(TFLAGS) -c ../src/templates0.C
163
164 templates1.o: ../src/templates1.C
165         $(CXX) $(TFLAGS) -c ../src/templates1.C
166
167 templates2.o: ../src/templates2.C
168         $(CXX) $(TFLAGS) -c ../src/templates2.C