Fixes for StackwalkerAPI on BlueGene
[dyninst.git] / symtabAPI / 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.17 2008/09/20 03:56:10 jaw Exp $
7 #
8
9 SUITE_NAME      = symtabAPI 
10 RELEASE_NUM     = 1.0
11 #BUILD_MARK should be (re-)defined in core/make.config.local rather than here!
12
13 DEFINES              += 
14
15 CFLAGS               += $(USEFULWARNINGS) $(DEFINES)
16 CXXFLAGS             += $(USEFULWARNINGS) $(DEFINES)
17 TFLAGS               += $(TCLFRIENDLYWARNINGS) $(DEFINES)
18
19 ifdef GCC_2_95
20 # This may cause problems on Alpha
21 # GCC has a new mangled name squisher (-fsquangle) which can be 
22 # set to "on" by default. This causes linker problems, so we
23 # default to "off".
24 CFLAGS          += -fno-squangle
25 CXXFLAGS        += -fno-squangle
26 TFLAGS          += -fno-squangle
27 endif
28
29 ifdef USE_LIBELF_SO_0
30 CFLAGS += -Dcap_libelf_so_0
31 CXXFLAGS += -Dcap_libelf_so_0
32 else
33 CFLAGS += -D_LARGEFILE64_SOURCE=1 -D__USE_FILE_OFFSET64=1
34 CXXFLAGS += -D_LARGEFILE64_SOURCE=1 -D__USE_FILE_OFFSET64=1
35 endif
36
37 ifndef STATIC_COMPS
38 MYFLAGS += -fPIC
39 endif
40
41 ifndef TARGET
42 ifndef STATIC_COMPS
43 TARGET          = libsymtabAPI.so
44 else
45 TARGET      = libsymtabAPI.a
46 endif
47 endif
48
49 LDFLAGS     += -L../../common/$(PLATFORM) -lcommon -ldl
50
51 ifndef USES_NATIVE_CC
52 LD              = $(GXX)
53 LDFLAGS         += -shared $(G_PTHREAD_LD)
54 CFLAGS          += 
55 CXXFLAGS        += $(G_PTHREAD)
56 else
57 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
58 LDFLAGS         += -G
59 endif #sparc
60 endif #USES_NATIVE
61 TFLAGS          += 
62
63 VPATH        += ../../symtabAPI/h
64
65 SRCS         += ../src/Object.C \
66                 ../src/Aggregate.C \
67                 ../src/Function.C \
68                 ../src/Variable.C \
69                 ../src/Symbol.C \
70                 ../src/LineInformation.C \
71                 ../src/Symtab.C \
72                 ../src/Symtab-edit.C \
73                 ../src/Symtab-lookup.C \
74                 ../src/Symtab-deprecated.C \
75                 ../src/Module.C \
76                 ../src/Region.C \
77                 ../src/Collections.C \
78                 ../src/Type.C \
79                 ../src/AddrLookup.C \
80                 ../src/annotations.C \
81                 ../src/debug.C \
82       ../src/SymtabReader.C 
83 #               ../src/serialize-bin.C \
84 #               ../src/serialize-xml.C 
85
86 TO_INC     = ../h
87 PUBLIC_H   = AddrLookup.h \
88              Archive.h \
89              Symbol.h \
90              Symtab.h \
91              Module.h \
92              Region.h \
93              symutil.h \
94              Type.h \
95              Collections.h \
96              Function.h \
97              Variable.h \
98              LineInformation.h \
99              RangeLookup.h \
100              Aggregate.h \
101              SymtabReader.h
102
103 #IGEN_GEN_SRCS = 
104
105 #IGEN_ISRCS    = 
106
107 ifndef USES_NATIVE_CC
108 ifdef CROSSCOMPILER
109 SYSLIBS         += -liberty -lg++ -lstdc++ -lm
110 else
111 SYSLIBS         += -liberty
112 endif
113 else
114 SYSLIBS         += -ldemangle
115 endif
116
117 IFLAGS       += -I../$(PLATFORM) -I../src -I../h
118
119 ifdef LIBXML2_INC
120 IFLAGS       += -I$(LIBXML2_INC)
121 else
122 IFLAGS       += -I/usr/include/libxml2
123 endif
124
125 # All that, and we finally get a target...
126 all: $(TARGET) $(EXTRA_LIBS)