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