I have done a commit that fixes the "irpc-trap" bug. This bug occurs
[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.20 2000/03/14 22:33:53 tikir Exp $
7 #
8
9 SUITE_NAME      = Dyninst
10 RELEASE_NUM     = 2.0beta
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
16
17 CFLAGS               += $(USEFULWARNINGS) $(DEFINES)
18 CXXFLAGS             += $(USEFULWARNINGS) $(DEFINES)
19 TFLAGS               += $(TCLFRIENDLYWARNINGS) $(DEFINES)
20
21
22 TARGET          = libdyninstAPI.a
23
24 ifdef USES_LIBDYNINST_SO
25 TARGET3_SO      = libdyninstAPI.so
26 ### TODO: why can this only be linked with "gcc"?
27 LD              = gcc
28 LDFLAGS         = -shared
29 LDFLAGS         += $(LIBDIR)
30 CFLAGS          += -fPIC
31 CXXFLAGS        += -fPIC
32 TFLAGS          += -fPIC
33 endif
34
35 VPATH        += ../../dyninstAPI/src:../dyninstAPI/h:\
36                 ../../paradynd/src:../../paradyn/h
37
38 SRCS         += ../src/BPatch.C \
39                 ../src/BPatch_image.C \
40                 ../src/BPatch_function.C \
41                 ../src/BPatch_snippet.C \
42                 ../src/BPatch_templates.C \
43                 ../src/BPatch_thread.C \
44                 ../src/BPatch_type.C \
45                 ../src/BPatch_init.C \
46                 ../src/BPatch_module.C \
47                 ../src/BPatch_point.C \
48                 ../src/BPatch_collections.C \
49                 ../src/Object.C \
50                 ../src/dummy.C \
51                 ../src/api_showerror.C \
52                 ../src/ast.C \
53                 ../src/inst.C \
54                 ../src/process.C \
55                 ../src/stats.C \
56                 ../src/symtab.C \
57                 ../src/util.C \
58                 ../src/sharedobject.C \
59                 ../src/LineInformation.C \
60                 ../src/templates0.C \
61                 ../src/templates05.C \
62                 ../src/templates1.C
63
64 ifdef USES_MT_THREAD
65 SRCS            += ../../dyninstAPI/src/pdThread.C \
66                    ../../paradynd/src/hashTable.C
67 endif
68
69 ifdef USES_SHM_SAMPLING
70 SRCS            += ../../paradynd/src/fastInferiorHeap.C \
71                    ../../paradynd/src/fastInferiorHeapHKs.C \
72                    ../../paradynd/src/fastInferiorHeapMgr.C
73 CXXFLAGS        += -DSHM_SAMPLING
74 TFLAGS          += -DSHM_SAMPLING
75 CFLAGS          += -DSHM_SAMPLING
76 endif
77
78 #IGEN_GEN_SRCS = 
79
80 #IGEN_ISRCS    = 
81
82 LIBS            += -lpdutil
83
84 ifdef CROSSCOMPILER
85 SYSLIBS         += -liberty -lg++ -lstdc++ -lm
86 else
87 SYSLIBS         += -liberty
88 endif
89
90 IFLAGS       += -I../$(PLATFORM) -I../src -I../h -I../../paradynd/src
91
92 ifdef USES_LIBDYNINST_SO
93 all: $(TARGET3_SO)
94 else
95 all: $(TARGET)
96 endif
97
98 BPatch_templates.o: ../src/BPatch_templates.C
99         $(CXX) $(TFLAGS) -c ../src/BPatch_templates.C
100
101 templates0.o: ../src/templates0.C
102         $(CXX) $(TFLAGS) -c ../src/templates0.C
103
104 templates05.o: ../src/templates05.C
105         $(CXX) $(TFLAGS) -c ../src/templates05.C
106
107 templates1.o: ../src/templates1.C
108         $(CXX) $(TFLAGS) -c ../src/templates1.C