Add ELF dependency to parseAPI to fix build error
[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
34 ifneq (x$(WITHOUT_SYMTAB_API),xtrue)
35 LDFLAGS += -L../../symtabAPI/$(PLATFORM) -lsymtabAPI
36 SRCS += ../src/SymtabCodeSource.C
37 endif
38
39 LDFLAGS     += $(LIBDIR)
40 ifndef USES_NATIVE_CC
41 LD              = $(GXX)
42 LDFLAGS         += -shared $(G_PTHREAD_LD)
43 CXXFLAGS        += $(G_PTHREAD)
44 else
45 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
46 LDFLAGS         += -G
47 endif #sparc
48 endif #USES_NATIVE
49
50 ifneq ($(findstring cap_instruction_api,$(CAP_DEF)),)
51     LDFLAGS += -L../../instructionAPI/$(PLATFORM) -linstructionAPI
52 endif
53
54 TO_INC   = ../h
55
56 PUBLIC_H = \
57     CFGFactory.h\
58     CFGModifier.h \
59     CFG.h\
60     CodeObject.h\
61     CodeSource.h\
62     Location.h\
63     InstructionAdapter.h\
64     InstructionSource.h\
65     ParseCallback.h\
66     ParseContainers.h\
67     SymLiteCodeSource.h
68
69 SRCS += ../src/ParserDetails.C \
70         ../src/Parser.C \
71         ../src/CFGFactory.C \
72         ../src/Function.C \
73         ../src/Block.C \
74                 ../src/CodeObject.C \
75                 ../src/debug_parse.C \
76         ../src/CodeSource.C \
77         ../src/ParseData.C\
78         ../src/InstructionAdapter.C\
79         ../src/Parser-speculative.C\
80         ../src/ParseCallback.C \
81         ../src/IA_x86Details.C \
82         ../src/IA_powerDetails.C \
83         ../src/IA_platformDetailsFactory.C \
84         ../src/CFGModifier.C\
85         ../src/SymLiteCodeSource.C \
86         ../../common/src/SymLite-elf.C \
87         ../../common/src/Elf_X.C
88
89 ifneq ($(findstring cap_instruction_api,$(CAP_DEF)),)
90 SRCS += ../../dataflowAPI/src/ABI.C \
91         ../../dataflowAPI/src/Absloc.C \
92         ../../dataflowAPI/src/AbslocInterface.C \
93         ../../dataflowAPI/src/convertOpcodes.C \
94         ../../dataflowAPI/src/debug_dataflow.C \
95         ../../dataflowAPI/src/ExpressionConversionVisitor.C \
96         ../../dataflowAPI/src/InstructionCache.C \
97         ../../dataflowAPI/src/liveness.C \
98         ../../dataflowAPI/src/RegisterMap.C \
99         ../../dataflowAPI/src/RoseImpl.C \
100         ../../dataflowAPI/src/RoseInsnFactory.C \
101         ../../dataflowAPI/src/slicing.C \
102         ../../dataflowAPI/src/stackanalysis.C \
103         ../../dataflowAPI/src/SymbolicExpansion.C \
104         ../../dataflowAPI/src/SymEval.C \
105         ../../dataflowAPI/src/SymEvalPolicy.C \
106         ../../dataflowAPI/src/templates.C \
107         ../../dataflowAPI/src/Visitors.C \
108         ../src/StackTamperVisitor.C
109
110 VPATH += ../../dataflowAPI/src
111 VPATH += ../../dataflowAPI/h
112 VPATH += ../../common/src
113
114 PUBLIC_H += Absloc.h \
115          AbslocInterface.h \
116          slicing.h \
117          SymEval.h \
118          stackanalysis.h \
119          liveness.h \
120          ABI.h \
121          bitArray.h \
122          InstructionCache.h      
123 endif
124
125 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
126
127