Fix builds for static linked components and x86_64_cnl
[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 CFLAGS               += $(USEFULWARNINGS) -I$(TO_CORE)/../include
15 CXXFLAGS             += $(USEFULWARNINGS) -I$(TO_CORE)/../include
16
17 LDFLAGS += -L../../common/$(PLATFORM) -L../../symtabAPI/$(PLATFORM) -lcommon -lsymtabAPI
18
19 LDFLAGS     += $(LIBDIR)
20 ifndef USES_NATIVE_CC
21 LD              = $(GXX)
22 LDFLAGS         += -shared $(G_PTHREAD_LD)
23 CXXFLAGS        += $(G_PTHREAD)
24 else
25 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
26 LDFLAGS         += -G
27 endif #sparc
28 endif #USES_NATIVE
29
30 ifneq ($(findstring cap_instruction_api,$(CAP_DEF)),)
31     LDFLAGS += -L../../instructionAPI/$(PLATFORM) -linstructionAPI
32 endif
33
34 TO_INC   = ../h
35
36 PUBLIC_H = \
37     CFGFactory.h\
38     CFGModifier.h \
39     CFG.h\
40     CodeObject.h\
41     CodeSource.h\
42     Location.h\
43     InstructionAdapter.h\
44     InstructionSource.h\
45     ParseCallback.h\
46     ParseContainers.h
47
48 SRCS += ../src/ParserDetails.C \
49         ../src/Parser.C \
50         ../src/CFGFactory.C \
51         ../src/Function.C \
52         ../src/Block.C \
53                 ../src/CodeObject.C \
54                 ../src/debug_parse.C \
55         ../src/SymtabCodeSource.C \
56         ../src/ParseData.C\
57         ../src/InstructionAdapter.C\
58         ../src/Parser-speculative.C\
59         ../src/ParseCallback.C \
60         ../src/IA_x86Details.C \
61         ../src/IA_powerDetails.C \
62         ../src/IA_platformDetailsFactory.C \
63         ../src/CFGModifier.C
64         
65 ifneq ($(findstring cap_instruction_api,$(CAP_DEF)),)
66 SRCS += ../../dataflowAPI/src/ABI.C \
67         ../../dataflowAPI/src/Absloc.C \
68         ../../dataflowAPI/src/AbslocInterface.C \
69         ../../dataflowAPI/src/convertOpcodes.C \
70         ../../dataflowAPI/src/debug_dataflow.C \
71         ../../dataflowAPI/src/ExpressionConversionVisitor.C \
72         ../../dataflowAPI/src/InstructionCache.C \
73         ../../dataflowAPI/src/liveness.C \
74         ../../dataflowAPI/src/RegisterMap.C \
75         ../../dataflowAPI/src/RoseImpl.C \
76         ../../dataflowAPI/src/RoseInsnFactory.C \
77         ../../dataflowAPI/src/slicing.C \
78         ../../dataflowAPI/src/stackanalysis.C \
79         ../../dataflowAPI/src/SymbolicExpansion.C \
80         ../../dataflowAPI/src/SymEval.C \
81         ../../dataflowAPI/src/SymEvalPolicy.C \
82         ../../dataflowAPI/src/templates.C \
83         ../../dataflowAPI/src/Visitors.C \
84         ../src/StackTamperVisitor.C
85
86 VPATH += ../../dataflowAPI/src
87 VPATH += ../../dataflowAPI/h
88
89 PUBLIC_H += Absloc.h \
90          AbslocInterface.h \
91          slicing.h \
92          SymEval.h \
93          stackanalysis.h \
94          liveness.h \
95          ABI.h \
96          bitArray.h \
97          InstructionCache.h      
98 endif
99
100 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
101
102