Fixes to get StackwalkerAPI building on BGQ
[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      = Dyninst
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 ifndef STATIC_COMPS
24 CFLAGS += -fPIC
25 CXXFLAGS += -fPIC
26 endif
27
28 CFLAGS               += $(USEFULWARNINGS) -I$(TO_CORE)/../include
29 CXXFLAGS             += $(USEFULWARNINGS) -I$(TO_CORE)/../include
30
31 LDFLAGS += -L../../common/$(PLATFORM) -L../../symtabAPI/$(PLATFORM) -lcommon -lsymtabAPI
32
33 LDFLAGS     += $(LIBDIR)
34 ifndef USES_NATIVE_CC
35 LD              = $(GXX)
36 LDFLAGS         += -shared $(G_PTHREAD_LD)
37 CFLAGS          += 
38 CXXFLAGS        += $(G_PTHREAD)
39 else
40 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
41 LDFLAGS         += -G
42 endif #sparc
43 endif #USES_NATIVE
44
45 ifneq ($(findstring cap_instruction_api,$(CAP_DEF)),)
46     LDFLAGS += -L../../instructionAPI/$(PLATFORM) -linstructionAPI
47 endif
48
49 TO_INC   = ../h
50
51 PUBLIC_H = \
52     CFGFactory.h\
53     CFG.h\
54     CodeObject.h\
55     CodeSource.h\
56     InstructionAdapter.h\
57     InstructionSource.h\
58     ParseCallback.h\
59     ParseContainers.h
60
61 SRCS += ../src/ParserDetails.C \
62         ../src/Parser.C \
63         ../src/CFGFactory.C \
64         ../src/Function.C \
65         ../src/Block.C \
66                 ../src/CodeObject.C \
67                 ../src/debug_parse.C \
68         ../src/SymtabCodeSource.C \
69         ../src/ParseData.C\
70         ../src/InstructionAdapter.C\
71         ../src/Parser-speculative.C\
72         ../src/IA_x86Details.C \
73         ../src/IA_powerDetails.C \
74         ../src/IA_platformDetailsFactory.C
75
76 ifneq ($(findstring cap_instruction_api,$(CAP_DEF)),)
77 SRCS += ../../dataflowAPI/src/Absloc.C \
78         ../../dataflowAPI/src/AbslocInterface.C \
79         ../../dataflowAPI/src/convertOpcodes.C \
80         ../../dataflowAPI/src/debug_dataflow.C \
81         ../../dataflowAPI/src/ExpressionConversionVisitor.C \
82         ../../dataflowAPI/src/RoseImpl.C \
83         ../../dataflowAPI/src/RoseInsnFactory.C \
84         ../../dataflowAPI/src/slicing.C \
85         ../../dataflowAPI/src/stackanalysis.C \
86         ../../dataflowAPI/src/SymbolicExpansion.C \
87         ../../dataflowAPI/src/SymEval.C \
88         ../../dataflowAPI/src/SymEvalPolicy.C \
89         ../../dataflowAPI/src/templates.C \
90         ../../dataflowAPI/src/Visitors.C \
91         ../src/StackTamperVisitor.C
92
93 VPATH += ../../dataflowAPI/src
94 VPATH += ../../dataflowAPI/h
95
96 PUBLIC_H += Absloc.h \
97          AbslocInterface.h \
98          slicing.h \
99          SymEval.h \
100          stackanalysis.h
101 endif
102
103 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
104
105
106 # All that, and we finally get a target...
107 all: $(TARGET) $(EXTRA_LIBS)
108