Merge branch 'master' of ssh://bill@git.dyninst.org/pub/dyninst
[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   = 2
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 LDFLAGS     += -L../../common/$(PLATFORM)
22 ifndef USES_NATIVE_CC
23 LD              = $(GXX)
24 LDFLAGS         += -shared $(G_PTHREAD_LD)
25 CFLAGS          += -fPIC -g
26 CXXFLAGS        += -fPIC $(G_PTHREAD) -felide-constructors -g -D_GLIBCXX_PROFILE
27 else
28 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
29 LDFLAGS         += -G
30 endif #sparc
31 endif #USES_NATIVE
32
33
34 ifdef AUTO_TEMPLATES
35 CFLAGS += -DAUTO_TEMPLATES
36 CXXFLAGS += -DAUTO_TEMPLATES
37 endif
38
39 SRCS += ../src/Instruction.C \
40         ../src/InstructionAST.C \
41         ../src/Operation.C \
42         ../src/Operand.C \
43         ../src/Register.C \
44         ../src/Expression.C \
45         ../src/BinaryFunction.C \
46         ../src/InstructionCategories.C \
47         ../src/Immediate.C \
48         ../src/InstructionDecoder.C \
49         ../src/InstructionDecoder-power.C \
50         ../src/InstructionDecoderImpl.C
51
52
53 IFLAGS       += -I../$(PLATFORM) -I../src -I../h -I../../common/h -I../../dynutil/h -I../../symtabAPI/h -I../external
54
55 DOCDIR  = ../doc
56
57 TO_INC = ../h
58 PUBLIC_H =      BinaryFunction.h \
59                 Dereference.h \
60                 entryIDs.h \
61                 Expression.h \
62                 Immediate.h \
63                 InstructionAST.h \
64                 InstructionDecoder.h \
65                 Instruction.h \
66                 Operand.h \
67                 Operation.h \
68                 Register.h \
69                 RegisterIDs.h \
70                 Result.h \
71                InstructionCategories.h \
72                Visitor.h
73
74
75
76 # All that, and we finally get a target...
77 all: $(TARGET) $(EXTRA_LIBS)
78
79
80
81 docs: $(SRCS)
82         cd ..; doxygen instructionAPI.conf
83         cd $(DOCDIR)/latex; ./manual-preproc.pl *.tex; $(MAKE) clean
84         $(MAKE) -C $(DOCDIR)/latex
85         cp $(DOCDIR)/latex/refman.pdf ../instructionProgGuide.v11.pdf
86
87
88