First pass at thread_db integration for FreeBSD.
[dyninst.git] / dyninstAPI / i386-unknown-freebsd7.2 / Makefile
1 #
2 # $Id: Makefile,v 1.41 2008/09/04 21:06:06 bill Exp $
3 #
4
5 # Define any symbols needed to invoke configuration changes in make.config
6
7 #USES_SHM_SAMPLING = true
8 #USES_PAPI = true
9 #DEBUG_FLAG = -g
10 #AUTO_TEMPLATES= true
11 NO_IMPLICIT_TEMPLATES = true
12 USES_DWARF_DEBUG = true
13 USES_LIBELF = true
14 USES_BOOST = true
15
16 # For debugging.
17 #NO_OPT_FLAG = true
18
19 # Include standard make configuration stuff that applies to everything
20 # in the paradyn tree.
21
22 include ../../make.config 
23
24 # Now make any necessary architecture specific changes to variables:
25
26 SRCS =          ../src/freebsd.C \
27                 ../src/freebsd-x86.C \
28                 ../src/dynamiclinking.C \
29                 ../src/cpuid-x86.S \
30                 ../src/inst-x86.C \
31                 ../src/emit-x86.C \
32                 ../src/arch-x86.C \
33                 ../src/unix.C \
34                 ../src/stackwalk-x86.C \
35                 ../src/image-x86.C \
36                 ../src/frameChecker.C \
37                 ../src/stackanalysis.C \
38                 ../src/IAPI_to_AST.C \
39                 ../src/IA_IAPI.C \
40                 ../src/IA_x86.C \
41                 ../src/BPatch_memoryAccessAdapter.C \
42                 ../src/RegisterConversion-x86.C
43
44 #MYFLAGS        += -DNO_MDL_PRINT
45 #MYFLAGS        += -DLD_DEBUG
46 #MYFLAGS        += -DATTACH_DETACH_DEBUG
47 #MYFLAGS        += -DPTRACEDEBUG
48 #MYFLAGS        += -DPTRACEDEBUG_EXCESSIVE
49 #MYFLAGS        += -DPTRACEDEBUG_ALWAYS
50 #MYFLAGS        += -DINST_TRAP_DEBUG
51 #MYFLAGS        += -DSIGNAL_DEBUG
52 #MYFLAGS        += -DASTDEBUG
53 #MYFLAGS        += -DINFERIOR_RPC_DEBUG
54 MYFLAGS         += -DUSES_DWARF_DEBUG -I$(LIBDWARF_INC)
55 MYFLAGS         += -I$(LIBELF_INC)
56 MYFLAGS         += -I/usr/include/libelf
57
58 CXXFLAGS        += $(MYFLAGS)
59 CFLAGS          += $(MYFLAGS)
60 TFLAGS          += $(MYFLAGS)
61 LDFLAGS         += -Wl,-rpath,$(LIBDWARF_LIB)
62
63 # Tradeoff: adding -g to TFLAGS aids gdb but uses gobs of disk space
64 #TFLAGS         += -g
65
66 SYSLIBS         =
67
68 LIBS      +=  -L$(LIBDWARF_LIB) -L$(LIBELF_LIB)
69 ifdef LIBDWARFSTATIC
70 LIBS    += -Wl,-static -ldwarf -Wl,-call_shared
71 else
72 LIBS    += -ldwarf
73 endif
74 ifdef LIBELFSTATIC
75 LIBS    += -Wl,-static -lelf -Wl,-call_shared
76 else
77 LIBS    += -lelf
78 endif
79 LIBS    += -lgcc -pthread
80
81 # InstructionAPI is x86-only at this point
82 LIBS    += -linstructionAPI
83
84 AS              = /usr/bin/as
85
86 # no support for elf64_XXX() functions
87 CXXFLAGS        += -DUSES_ELF32_ONLY
88 CFLAGS          += -DUSES_ELF32_ONLY
89 TFLAGS          += -DUSES_ELF32_ONLY
90
91 # Add preprocessor and special link information for G++
92 G_PTHREAD       = -pthread
93 G_PTHREAD_LD    = -pthread
94
95 # Include the module-specific Makefile, which defines everything about
96 # the module that is common across architectures.
97
98 include ../make.module.tmpl
99
100 # Include the "standard library template".  This defines all the
101 # common targets like "clean", "install", etc.
102
103 include ../../make.library.tmpl