Restructuring of declararations required because of include conflicts when
[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.25 2000/08/22 20:59:16 wylie Exp $
7 #
8
9 SUITE_NAME      = Dyninst
10 RELEASE_NUM     = 2.2
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                 ../../common/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                 ../../common/src/Dictionary.C \
65                 ../../common/src/Ident.C \
66                 ../../common/src/String.C \
67                 ../../common/src/Timer.C \
68                 ../../common/src/Types.C \
69                 ../../common/src/debugOstream.C \
70                 ../../common/src/lprintf.C \
71                 ../../common/src/pathName.C \
72                 ../../common/src/vectorSet.C \
73                 ../src/templates0.C \
74                 ../src/templates05.C \
75                 ../src/templates1.C
76
77 #IGEN_GEN_SRCS = 
78
79 #IGEN_ISRCS    = 
80
81 ifdef CROSSCOMPILER
82 SYSLIBS         += -liberty -lg++ -lstdc++ -lm
83 else
84 SYSLIBS         += -liberty
85 endif
86
87 IFLAGS       += -I../$(PLATFORM) -I../src -I../h
88
89 ifdef USES_LIBDYNINST_SO
90 all: $(TARGET3_SO)
91 else
92 all: $(TARGET)
93 endif
94
95 BPatch_templates.o: ../src/BPatch_templates.C
96         $(CXX) $(TFLAGS) -c ../src/BPatch_templates.C
97
98 templates0.o: ../src/templates0.C
99         $(CXX) $(TFLAGS) -c ../src/templates0.C
100
101 templates05.o: ../src/templates05.C
102         $(CXX) $(TFLAGS) -c ../src/templates05.C
103
104 templates1.o: ../src/templates1.C
105         $(CXX) $(TFLAGS) -c ../src/templates1.C