Build fixes for NewInstpoint merge on FreeBSD.
[dyninst.git] / dyninstAPI / amd64-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/inst-x86.C \
29                 ../src/emit-x86.C \
30                 ../src/codegen-x86.C \
31                 ../src/unix.C \
32                 ../src/stackwalk-x86.C \
33                 ../src/frameChecker.C \
34                 ../src/IAPI_to_AST.C \
35                 ../src/BPatch_memoryAccessAdapter.C \
36                 ../src/RegisterConversion-x86.C \
37                 ../src/pcProcess-x86.C \
38                 ../src/syscall-freebsd.C \
39                 ../src/parse-x86.C \
40                 ../src/Relocation/Atoms/CFAtom-x86.C
41
42 #MYFLAGS        += -DNO_MDL_PRINT
43 #MYFLAGS        += -DLD_DEBUG
44 #MYFLAGS        += -DATTACH_DETACH_DEBUG
45 #MYFLAGS        += -DPTRACEDEBUG
46 #MYFLAGS        += -DPTRACEDEBUG_EXCESSIVE
47 #MYFLAGS        += -DPTRACEDEBUG_ALWAYS
48 #MYFLAGS        += -DINST_TRAP_DEBUG
49 #MYFLAGS        += -DSIGNAL_DEBUG
50 #MYFLAGS        += -DASTDEBUG
51 #MYFLAGS        += -DINFERIOR_RPC_DEBUG
52 MYFLAGS         += -DUSES_DWARF_DEBUG -I$(LIBDWARF_INC)
53 MYFLAGS         += -I$(LIBELF_INC)
54
55 CXXFLAGS        += $(MYFLAGS)
56 CFLAGS          += $(MYFLAGS)
57 TFLAGS          += $(MYFLAGS)
58 LDFLAGS         += -Wl,-rpath,$(LIBDWARF_LIB)
59
60 # Tradeoff: adding -g to TFLAGS aids gdb but uses gobs of disk space
61 #TFLAGS         += -g
62
63 SYSLIBS         =
64
65 LIBS      +=  -L$(LIBDWARF_LIB) -L$(LIBELF_LIB)
66 ifdef LIBDWARFSTATIC
67 LIBS    += -Wl,-static -ldwarf -Wl,-call_shared
68 else
69 LIBS    += -ldwarf
70 endif
71 ifdef LIBELFSTATIC
72 LIBS    += -Wl,-static -lelf -Wl,-call_shared
73 else
74 LIBS    += -lelf
75 endif
76 LIBS    += -lgcc -pthread
77
78 # InstructionAPI is x86-only at this point
79 LIBS    += -linstructionAPI
80
81 AS              = /usr/bin/as
82
83 # no support for elf64_XXX() functions
84 CXXFLAGS        += -DUSES_ELF32_ONLY
85 CFLAGS          += -DUSES_ELF32_ONLY
86 TFLAGS          += -DUSES_ELF32_ONLY
87
88 # Add preprocessor and special link information for G++
89 G_PTHREAD       = -pthread
90 G_PTHREAD_LD    = -pthread
91
92 # Include the module-specific Makefile, which defines everything about
93 # the module that is common across architectures.
94
95 include ../make.module.tmpl
96
97 # Include the "standard library template".  This defines all the
98 # common targets like "clean", "install", etc.
99
100 include ../../make.library.tmpl