Build fixes for prefixed build etc
[dyninst.git] / parseAPI / 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.4 2008/09/15 17:38:17 jaw Exp $
7 #
8
9 SUITE_NAME      = ParseAPI
10 RELEASE_MAJOR   = 7
11 RELEASE_MINOR = 0
12 #BUILD_MARK should be (re-)defined in core/make.config.local rather than here!
13
14 ifndef TARGET
15 ifdef STATIC_COMPS
16 STATIC_LIBRARY = true
17 TARGET = libparseAPI.a
18 else
19 TARGET = libparseAPI.so
20 endif
21 endif
22
23 USES_LIBELF = true
24
25 ifndef STATIC_COMPS
26 CFLAGS += -fPIC
27 CXXFLAGS += -fPIC
28 endif
29
30 CFLAGS               += $(USEFULWARNINGS) -I$(TO_CORE)/../include
31 CXXFLAGS             += $(USEFULWARNINGS) -I$(TO_CORE)/../include
32
33 LDFLAGS += -L../../common/$(PLATFORM) -lcommon -L../../symlite/$(PLATFORM) -lsymLite
34
35 ifneq (x$(WITHOUT_SYMTAB_API),xtrue)
36 LDFLAGS += -L../../symtabAPI/$(PLATFORM) -lsymtabAPI
37 SRCS += ../src/SymtabCodeSource.C
38 endif
39
40 ifdef USES_LIBELF
41 LDFLAGS += -L../../elf/$(PLATFORM) -ldynElf
42 endif
43
44 LDFLAGS     += $(LIBDIR)
45 ifndef USES_NATIVE_CC
46 LD              = $(GXX)
47 LDFLAGS         += -shared $(G_PTHREAD_LD)
48 CXXFLAGS        += $(G_PTHREAD)
49 else
50 endif #USES_NATIVE
51
52 ifneq ($(findstring cap_instruction_api,$(CAP_DEF)),)
53     LDFLAGS += -L../../instructionAPI/$(PLATFORM) -linstructionAPI
54 endif
55
56 TO_INC   = ../h
57
58 PUBLIC_H = \
59     CFGFactory.h\
60     CFGModifier.h \
61     CFG.h\
62     CodeObject.h\
63     CodeSource.h\
64     Location.h\
65     InstructionAdapter.h\
66     InstructionSource.h\
67     ParseCallback.h\
68     ParseContainers.h\
69     SymLiteCodeSource.h \
70     GraphAdapter.h
71
72 SRCS += ../src/ParserDetails.C \
73         ../src/Parser.C \
74         ../src/CFGFactory.C \
75         ../src/Function.C \
76         ../src/Block.C \
77                 ../src/CodeObject.C \
78                 ../src/debug_parse.C \
79         ../src/CodeSource.C \
80         ../src/ParseData.C\
81         ../src/InstructionAdapter.C\
82         ../src/Parser-speculative.C\
83         ../src/ParseCallback.C \
84         ../src/IA_x86Details.C \
85         ../src/IA_powerDetails.C \
86         ../src/IA_platformDetailsFactory.C \
87         ../src/CFGModifier.C\
88         ../src/SymLiteCodeSource.C \
89         ../src/GraphAdapter.C
90
91 ifneq ($(findstring cap_instruction_api,$(CAP_DEF)),)
92 SRCS += ../../dataflowAPI/src/ABI.C \
93         ../../dataflowAPI/src/Absloc.C \
94         ../../dataflowAPI/src/AbslocInterface.C \
95         ../../dataflowAPI/src/convertOpcodes.C \
96         ../../dataflowAPI/src/debug_dataflow.C \
97         ../../dataflowAPI/src/ExpressionConversionVisitor.C \
98         ../../dataflowAPI/src/InstructionCache.C \
99         ../../dataflowAPI/src/liveness.C \
100         ../../dataflowAPI/src/RegisterMap.C \
101         ../../dataflowAPI/src/RoseImpl.C \
102         ../../dataflowAPI/src/RoseInsnFactory.C \
103         ../../dataflowAPI/src/slicing.C \
104         ../../dataflowAPI/src/stackanalysis.C \
105         ../../dataflowAPI/src/SymbolicExpansion.C \
106         ../../dataflowAPI/src/SymEval.C \
107         ../../dataflowAPI/src/SymEvalPolicy.C \
108         ../../dataflowAPI/src/templates.C \
109         ../../dataflowAPI/src/Visitors.C \
110         ../src/StackTamperVisitor.C
111
112 VPATH += ../../dataflowAPI/src
113 VPATH += ../../dataflowAPI/h
114 VPATH += ../../common/src
115
116 PUBLIC_H += Absloc.h \
117          AbslocInterface.h \
118          slicing.h \
119          SymEval.h \
120          stackanalysis.h \
121          liveness.h \
122          ABI.h \
123          bitArray.h \
124          InstructionCache.h      
125 endif
126
127 IFLAGS       += -I../$(PLATFORM) -I../src -I../../dataflowAPI/src -I../../dataflowAPI/h -I../h -I../../dynutil/h -I../../symtabAPI/h -I../../common/h -I../../instructionAPI/h
128
129