Changes to work towards compatability with IBM's version of dyninst.
[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.29 2001/06/12 15:43:27 hollings Exp $
7 #
8
9 SUITE_NAME      = Dyninst
10 RELEASE_NUM     = 2.3
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 # This may cause problems on Alpha
22 # GCC has a new mangled name squisher (-fsquangle) which can be 
23 # set to "on" by default. This causes linker problems, so we
24 # default to "off".
25
26 CFLAGS          += -fno-squangle
27 CXXFLAGS        += -fno-squangle
28 TFLAGS          += -fno-squangle
29
30 TARGET          = libdyninstAPI.a
31
32 ifdef USES_LIBDYNINST_SO
33 TARGET3_SO      = libdyninstAPI.so
34 ### TODO: why can this only be linked with "gcc"?
35 LD              = gcc
36 LDFLAGS         = -shared
37 LDFLAGS         += $(LIBDIR)
38 CFLAGS          += -fPIC
39 CXXFLAGS        += -fPIC
40 TFLAGS          += -fPIC
41 endif
42
43 VPATH        += ../../dyninstAPI/src:../dyninstAPI/h:\
44                 ../../common/src:../../paradyn/h
45
46 SRCS         += ../src/BPatch.C \
47                 ../src/BPatch_image.C \
48                 ../src/BPatch_function.C \
49                 ../src/BPatch_snippet.C \
50                 ../src/BPatch_thread.C \
51                 ../src/BPatch_type.C \
52                 ../src/BPatch_init.C \
53                 ../src/BPatch_module.C \
54                 ../src/BPatch_point.C \
55                 ../src/BPatch_collections.C \
56                 ../src/BPatch_sourceBlock.C \
57                 ../src/BPatch_basicBlock.C \
58                 ../src/BPatch_basicBlockLoop.C \
59                 ../src/BPatch_flowGraph.C \
60                 ../src/Object.C \
61                 ../src/dummy.C \
62                 ../src/api_showerror.C \
63                 ../src/ast.C \
64                 ../src/inst.C \
65                 ../src/process.C \
66                 ../src/stats.C \
67                 ../src/symtab.C \
68                 ../src/util.C \
69                 ../src/sharedobject.C \
70                 ../src/LineInformation.C \
71                 ../../common/src/Dictionary.C \
72                 ../../common/src/Ident.C \
73                 ../../common/src/String.C \
74                 ../../common/src/Timer.C \
75                 ../../common/src/Types.C \
76                 ../../common/src/debugOstream.C \
77                 ../../common/src/lprintf.C \
78                 ../../common/src/pathName.C \
79                 ../../common/src/vectorSet.C \
80                 ../../common/src/Time.C \
81                 ../../common/src/fraction.C \
82                 ../../common/src/timing.C \
83
84 ifndef AUTO_TEMPLATES
85 SRCS         += ../src/BPatch_templates.C \
86                 ../src/templates0.C \
87                 ../src/templates05.C \
88                 ../src/templates1.C \
89                 ../src/templates2.C \
90
91 endif
92
93 #IGEN_GEN_SRCS = 
94
95 #IGEN_ISRCS    = 
96
97 ifdef CROSSCOMPILER
98 SYSLIBS         += -liberty -lg++ -lstdc++ -lm
99 else
100 SYSLIBS         += -liberty
101 endif
102
103 IFLAGS       += -I../$(PLATFORM) -I../src -I../h
104
105 ifdef USES_LIBDYNINST_SO
106 all: $(TARGET3_SO)
107 else
108 all: $(TARGET)
109 endif
110
111 BPatch_templates.o: ../src/BPatch_templates.C
112         $(CXX) $(TFLAGS) -c ../src/BPatch_templates.C
113
114 templates0.o: ../src/templates0.C
115         $(CXX) $(TFLAGS) -c ../src/templates0.C
116
117 templates05.o: ../src/templates05.C
118         $(CXX) $(TFLAGS) -c ../src/templates05.C
119
120 templates1.o: ../src/templates1.C
121         $(CXX) $(TFLAGS) -c ../src/templates1.C
122
123 templates2.o: ../src/templates2.C
124         $(CXX) $(TFLAGS) -c ../src/templates2.C