This commit enables arbitrary instrumentation points at the last instruction
[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.46 2003/03/02 22:03:12 schendel Exp $
7 #
8
9 SUITE_NAME      = Dyninst
10 RELEASE_NUM     = 3.0
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 TARGET          = libdyninstAPI.a
32
33 ifdef USES_LIBDYNINST_SO
34 TARGET3_SO      = libdyninstAPI.so
35 LDFLAGS     += $(LIBDIR)
36 ifndef USES_NATIVE_CC
37 LD              = $(GXX)
38 LDFLAGS         += -shared
39 CFLAGS          += -fPIC
40 CXXFLAGS        += -fPIC
41 else
42 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
43 LDFLAGS         += -G
44 endif
45 ifeq (irix,$(findstring irix,$(PLATFORM)))
46 LDFLAGS         += -shared
47 endif
48 endif
49 # VG(8/3/2): This is needed so templates get the same debug flags as all other
50 TFLAGS          += $(filter -g%, $(CFLAGS)) -fPIC
51 endif
52
53 VPATH        += ../../dyninstAPI/src:../dyninstAPI/h:\
54                 ../../common/src:../../paradyn/h
55
56 SRCS         += ../src/BPatch.C \
57                 ../src/BPatch_image.C \
58                 ../src/BPatch_function.C \
59                 ../src/BPatch_snippet.C \
60                 ../src/BPatch_thread.C \
61                 ../src/BPatch_type.C \
62                 ../src/BPatch_init.C \
63                 ../src/BPatch_module.C \
64                 ../src/BPatch_point.C \
65                 ../src/BPatch_collections.C \
66                 ../src/BPatch_sourceBlock.C \
67                 ../src/BPatch_basicBlock.C \
68                 ../src/BPatch_basicBlockLoop.C \
69                 ../src/BPatch_flowGraph.C \
70                 ../src/Object.C \
71                 ../src/MemoryAccess.C \
72                 ../src/dummy.C \
73                 ../src/api_showerror.C \
74                 ../src/ast.C \
75                 ../src/inst.C \
76                 ../src/dyn_thread.C \
77                 ../src/process.C \
78                 ../src/dyn_lwp.C \
79       ../src/rpcMgr.C \
80                 ../src/installed_miniTramps_list.C \
81                 ../src/stats.C \
82                 ../src/symtab.C \
83                 ../src/util.C \
84                 ../src/sharedobject.C \
85                 ../src/LineInformation.C \
86                 ../../common/src/Dictionary.C \
87                 ../../common/src/Ident.C \
88                 ../../common/src/String.C \
89                 ../../common/src/Timer.C \
90                 ../../common/src/Types.C \
91                 ../../common/src/debugOstream.C \
92                 ../../common/src/lprintf.C \
93                 ../../common/src/pathName.C \
94                 ../../common/src/vectorSet.C \
95                 ../../common/src/Time.C \
96                 ../../common/src/fraction.C \
97                 ../../common/src/timing.C \
98
99 ifndef AUTO_TEMPLATES
100 SRCS         += ../src/BPatch_templates.C \
101                 ../src/templates0.C \
102                 ../src/templates1.C \
103                 ../src/templates2.C \
104
105 endif
106
107 #IGEN_GEN_SRCS = 
108
109 #IGEN_ISRCS    = 
110
111 ifndef USES_NATIVE_CC
112 ifdef CROSSCOMPILER
113 SYSLIBS         += -liberty -lg++ -lstdc++ -lm
114 else
115 SYSLIBS         += -liberty
116 endif
117 else
118 SYSLIBS         += -ldemangle
119 endif
120
121 IFLAGS       += -I../$(PLATFORM) -I../src -I../h
122
123 ifdef USES_LIBDYNINST_SO
124 all: $(TARGET3_SO)
125 else
126 all: $(TARGET)
127 endif
128
129 BPatch_templates.o: ../src/BPatch_templates.C
130         $(CXX) $(TFLAGS) -c ../src/BPatch_templates.C
131
132 templates0.o: ../src/templates0.C
133         $(CXX) $(TFLAGS) -c ../src/templates0.C
134
135 templates1.o: ../src/templates1.C
136         $(CXX) $(TFLAGS) -c ../src/templates1.C
137
138 templates2.o: ../src/templates2.C
139         $(CXX) $(TFLAGS) -c ../src/templates2.C