Fixes to get StackwalkerAPI building on BGQ
[dyninst.git] / instructionAPI / 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
13 #BUILD_MARK should be (re-)defined in core/make.config.local rather than here!
14
15
16 CFLAGS               += $(USEFULWARNINGS) $(DEFINES)
17 CXXFLAGS             += $(USEFULWARNINGS) $(DEFINES)
18
19 LDFLAGS += -lcommon
20
21 ifndef TARGET
22 ifdef STATIC_COMPS
23 STATIC_LIBRARY = true
24 TARGET = libinstruction.a
25 else
26 TARGET = libinstruction.so
27 endif
28 endif
29
30 ifndef STATIC_COMPS
31 CFLAGS += -fPIC
32 CXXFLAGS += -fPIC
33 endif
34
35 LDFLAGS     += -L../../common/$(PLATFORM)
36 ifndef USES_NATIVE_CC
37 LD              = $(GXX)
38 LDFLAGS         += -shared $(G_PTHREAD_LD)
39 CFLAGS          += -g
40 CXXFLAGS        += $(G_PTHREAD) -felide-constructors -g
41 else
42 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
43 LDFLAGS         += -G
44 endif #sparc
45 endif #USES_NATIVE
46
47
48 ifdef AUTO_TEMPLATES
49 CFLAGS += -DAUTO_TEMPLATES
50 CXXFLAGS += -DAUTO_TEMPLATES
51 endif
52
53 SRCS += ../src/Instruction.C \
54         ../src/InstructionAST.C \
55         ../src/Operation.C \
56         ../src/Operand.C \
57         ../src/Register.C \
58         ../src/Expression.C \
59         ../src/BinaryFunction.C \
60         ../src/InstructionCategories.C \
61         ../src/Immediate.C \
62         ../src/InstructionDecoder.C \
63         ../src/InstructionDecoder-power.C \
64         ../src/InstructionDecoderImpl.C
65
66
67 IFLAGS       += -I../$(PLATFORM) -I../src -I../h -I../../common/h -I../../dynutil/h -I../../symtabAPI/h -I../external
68
69 DOCDIR  = ../doc
70
71 TO_INC = ../h
72 PUBLIC_H =      BinaryFunction.h \
73                 Dereference.h \
74                 Expression.h \
75                 Immediate.h \
76                 InstructionAST.h \
77                 InstructionDecoder.h \
78                 Instruction.h \
79                 Operand.h \
80                 Operation.h \
81                 Register.h \
82                 RegisterIDs.h \
83                 Result.h \
84                InstructionCategories.h \
85                Visitor.h
86
87
88
89 # All that, and we finally get a target...
90 all: $(TARGET) $(EXTRA_LIBS)
91
92
93
94 docs: $(SRCS)
95         cd ..; doxygen instructionAPI.conf
96         cd $(DOCDIR)/latex; ./manual-preproc.pl *.tex; $(MAKE) clean
97         $(MAKE) -C $(DOCDIR)/latex
98         cp $(DOCDIR)/latex/refman.pdf ../../../docs/instructionProgGuide.pdf
99
100
101