Fix compilation errors in slicing component; it now works on top of ParseAPI.
[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_NUM     = 6.1
11 #BUILD_MARK should be (re-)defined in core/make.config.local rather than here!
12
13 CFLAGS               += $(USEFULWARNINGS) -I$(TO_CORE)/../include
14 CXXFLAGS             += $(USEFULWARNINGS) -I$(TO_CORE)/../include
15
16 LDFLAGS += -lcommon -lsymtabAPI
17
18 LDFLAGS     += $(LIBDIR)
19 ifndef USES_NATIVE_CC
20 LD              = $(GXX)
21 LDFLAGS         += -shared $(G_PTHREAD_LD)
22 CFLAGS          += -fPIC
23 CXXFLAGS        += -fPIC $(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 += -linstructionAPI
32 endif
33
34 TO_INC   = ../h
35
36 PUBLIC_H = \
37     ../h/CFGFactory.h\
38     ../h/CFG.h\
39     ../h/CodeObject.h\
40     ../h/CodeSource.h\
41     ../h/InstructionAdapter.h\
42     ../h/InstructionSource.h\
43     ../h/ParseCallback.h\
44     ../h/ParseContainers.h
45
46 SRCS += ../src/ParserDetails.C \
47         ../src/Parser.C \
48         ../src/CFGFactory.C \
49         ../src/Function.C \
50         ../src/Block.C \
51                 ../src/CodeObject.C \
52                 ../src/debug.C \
53         ../src/SymtabCodeSource.C \
54         ../src/ParseData.C\
55         ../src/InstructionAdapter.C\
56         ../src/Parser-speculative.C
57         
58
59
60 ifndef USES_NATIVE_CC
61 ifdef CROSSCOMPILER
62 SYSLIBS         += -liberty -lg++ -lstdc++ -lm
63 else
64 SYSLIBS         += -liberty
65 endif
66 else
67 SYSLIBS         += -ldemangle
68 endif
69
70
71 IFLAGS       += -I../$(PLATFORM) -I../src -I../h -I../../dynutil/h -I../../symtabAPI/h -I../../common/h -I../../instructionAPI/h
72
73
74 # All that, and we finally get a target...
75 all: $(TARGET) $(EXTRA_LIBS)
76