Addition of Control Flow Graph related implementation.
[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.21 2000/03/18 21:53:58 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/BPatch_sourceBlock.C \
50                 ../src/BPatch_basicBlock.C \
51                 ../src/BPatch_basicBlockLoop.C \
52                 ../src/BPatch_flowGraph.C \
53                 ../src/Object.C \
54                 ../src/dummy.C \
55                 ../src/api_showerror.C \
56                 ../src/ast.C \
57                 ../src/inst.C \
58                 ../src/process.C \
59                 ../src/stats.C \
60                 ../src/symtab.C \
61                 ../src/util.C \
62                 ../src/sharedobject.C \
63                 ../src/LineInformation.C \
64                 ../src/templates0.C \
65                 ../src/templates05.C \
66                 ../src/templates1.C
67
68 ifdef USES_MT_THREAD
69 SRCS            += ../../dyninstAPI/src/pdThread.C \
70                    ../../paradynd/src/hashTable.C
71 endif
72
73 ifdef USES_SHM_SAMPLING
74 SRCS            += ../../paradynd/src/fastInferiorHeap.C \
75                    ../../paradynd/src/fastInferiorHeapHKs.C \
76                    ../../paradynd/src/fastInferiorHeapMgr.C
77 CXXFLAGS        += -DSHM_SAMPLING
78 TFLAGS          += -DSHM_SAMPLING
79 CFLAGS          += -DSHM_SAMPLING
80 endif
81
82 #IGEN_GEN_SRCS = 
83
84 #IGEN_ISRCS    = 
85
86 LIBS            += -lpdutil
87
88 ifdef CROSSCOMPILER
89 SYSLIBS         += -liberty -lg++ -lstdc++ -lm
90 else
91 SYSLIBS         += -liberty
92 endif
93
94 IFLAGS       += -I../$(PLATFORM) -I../src -I../h -I../../paradynd/src
95
96 ifdef USES_LIBDYNINST_SO
97 all: $(TARGET3_SO)
98 else
99 all: $(TARGET)
100 endif
101
102 BPatch_templates.o: ../src/BPatch_templates.C
103         $(CXX) $(TFLAGS) -c ../src/BPatch_templates.C
104
105 templates0.o: ../src/templates0.C
106         $(CXX) $(TFLAGS) -c ../src/templates0.C
107
108 templates05.o: ../src/templates05.C
109         $(CXX) $(TFLAGS) -c ../src/templates05.C
110
111 templates1.o: ../src/templates1.C
112         $(CXX) $(TFLAGS) -c ../src/templates1.C