Have configure to start auto-detecting PLATFORM, which was required as of the per...
[dyninst.git] / make.config
1 # -*- makefile -*-
2 # Paradyn overall build configuration (unix)
3 #
4 # $Id: make.config,v 1.242 2008/09/20 03:56:08 jaw Exp $
5 #
6
7 SUITE_NAME      = Paradyn
8 RELEASE_NUM     = 8.0
9
10 ifndef TO_CORE
11 TO_CORE         = ../..
12 endif
13
14 ifndef TO_SCRIPTS
15 TO_SCRIPTS = $(TO_CORE)/scripts
16 endif
17 SNAME = $(shell if [ -f ${TO_SCRIPTS}/sysname ]; then echo ${TO_SCRIPTS}/sysname; else pwd; fi )
18 DYNSNAME = $(shell if [ -f ${TO_SCRIPTS}/dynsysname ]; then echo ${TO_SCRIPTS}/dynsysname; else pwd; fi )
19
20 # If the PLATFORM environment variable isn't set, we'll try to figure it out.
21 ifndef PLATFORM
22 ifdef build
23 CURPLAT = $(build)
24 else
25 CURPLAT = $(shell ${SNAME})
26 endif
27 ifdef CURPLAT
28 PLATFORM := $(shell ${DYNSNAME} ${CURPLAT})
29 endif
30 endif
31
32 LOCAL_LOCATION = $(shell if [ -f $(TO_CORE)/$(PLATFORM)/make.config.local ]; then echo $(TO_CORE)/$(PLATFORM)/; else echo $(TO_CORE)/; fi )
33
34 # ***** EXTERNAL SOFTWARE CONFIGURATION *****
35
36 # Include any per-user configuration changes; this "local" config file
37 # should *not* be under CVS control, so that it never gets committed.
38 include $(LOCAL_LOCATION)make.config.local
39
40 #Try setting PLATFORM again now that we have make.config.local info
41 ifndef PLATFORM
42 ifdef build
43 CURPLAT = $(build)
44 else
45 CURPLAT = $(shell ${SNAME})
46 endif
47 ifdef CURPLAT
48 PLATFORM := $(shell ${DYNSNAME} ${CURPLAT})
49 endif
50 endif
51
52 ifndef PLATFORM
53 $(error Could not determine you current platform.  Please set your PLATFORM environment variable to whichever closest matches your platform: amd64-unknown-freebsd7.2 i386-unknown-freebsd7.2 i386-unknown-linux2.4 i386-unknown-vxworks6.x ppc32-unknown-vxworks6.x ppc32_bgl_ion ppc32_bgp ppc32_bgp_ion ppc32_linux ppc64_bgq_ion ppc64_linux x86_64-unknown-linux2.4)
54 endif
55
56 Everything = dynutil common symtabAPI instructionAPI parseAPI proccontrol stackwalk dyninstAPI_RT dyninstAPI 
57 SymtabAPI       = dynutil common symtabAPI
58 StackwalkerAPI = dynutil common proccontrol stackwalk
59 DyninstAPI      = dynutil common symtabAPI instructionAPI parseAPI stackwalk dyninstAPI_RT dyninstAPI
60 DynC_API = dynutil common symtabAPI instructionAPI parseAPI dyninstAPI_RT dyninstAPI dynC_API
61 InstructionAPI  = dynutil common instructionAPI
62 ProcControlAPI = dynutil common proccontrol
63 DepGraphAPI = depGraphAPI
64 ParseAPI = dynutil common symtabAPI instructionAPI parseAPI
65 ValueAdded = valueAdded/sharedMem
66 DataflowAPI = ParseAPI
67
68 DEFAULT_COMPONENT ?= default
69 ifeq ($(DEFAULT_COMPONENT),default)
70 fullSystem      += $(Everything)
71 BUILD_PARSETHAT = true
72 else
73 ifeq ($(DEFAULT_COMPONENT),SymtabAPI)
74 fullSystem += $(SymtabAPI)
75 else
76 ifeq ($(DEFAULT_COMPONENT),StackwalkerAPI)
77 fullSystem += $(StackwalkerAPI)
78 else
79 ifeq ($(DEFAULT_COMPONENT),DyninstAPI)
80 fullSystem      += $(DyninstAPI)
81 BUILD_PARSETHAT = true
82 else
83 ifeq ($(DEFAULT_COMPONENT),InstructionAPI)
84 fullSystem += $(InstructionAPI)
85 else
86 ifeq ($(DEFAULT_COMPONENT),ProcControlAPI)
87 fullSystem += $(ProcControlAPI)
88 else
89 ifeq ($(DEFAULT_COMPONENT),ParseAPI)
90 fullSystem += $(ParseAPI)
91 else
92 ifeq ($(DEFAULT_COMPONENT),DataflowAPI)
93 fullSystem += $(ParseAPI)
94 else
95 default:
96         @echo Error: Build system does not have a valid default component: $(DEFAULT_COMPONENT)
97 endif
98 endif
99 endif
100 endif
101 endif
102 endif
103 endif
104 endif
105
106 ifndef DONT_BUILD_NEWTESTSUITE
107 testsuites += testsuite
108 allSubdirs_noinstall += testsuite 
109 fullSystem += testsuite
110 ifdef BUILD_PARSETHAT
111 testsuites += parseThat
112 fullSystem += parseThat
113 endif
114 endif
115
116 #BUILD_MARK     =
117 EXPLICIT_DEPENDS = 1
118 #USE_DEPRECATED_BPATCH_VECTOR   = 1
119 #IBM_BPATCH_COMPAT = 1
120 # Apart from actual "full" releases, don't modify these build Id components.
121 # For personal/experimental builds, feel free to use your 
122 # dyninst/make.config.local file to (re-)define BUILD_MARK as you desire.
123
124 # most "main" modules are only two levels deep, but we need to be able to
125 # change this for those that are deeper in the tree
126
127 # Choose default development directories if necessary variables are unset
128
129 LIBRARY_DEST ?= $(libdir)
130 PROGRAM_DEST ?= $(bindir)
131 INCLUDE_DEST ?= $(includedir)
132
133 ifdef prefix
134 ifeq (x$(LIBRARY_DEST),x)
135 LIBRARY_DEST = $(prefix)/lib
136 endif
137 ifeq (x$(PROGRAM_DEST),x)
138 PROGRAM_DEST = $(prefix)/bin
139 endif
140 ifeq (x$(INCLUDE_DEST),x)
141 LIBRARY_DEST = $(prefix)/include
142 endif
143 endif
144
145 # Destinations for library and executable installation (relative to "dyninst"!)
146 #  These are here for backwards compatibility with old make.config.locals
147 LIBRARY_DEST    ?= ${TO_CORE}/../${PLATFORM}/lib
148 PROGRAM_DEST    ?= ${TO_CORE}/../${PLATFORM}/bin
149 INCLUDE_DEST   ?= ${TO_CORE}/../include
150
151 # DESTDIR is a standard name to do a staged install
152 ifdef DESTDIR
153 LIBRARY_DEST := ${DESTDIR}${LIBRARY_DEST}
154 PROGRAM_DEST := ${DESTDIR}${PROGRAM_DEST}
155 INCLUDE_DEST := ${DESTDIR}${INCLUDE_DEST}
156 endif
157
158 # Usually, we look for files, binaries, libs in $(TO_CORE)/....<something>.
159 # But if the file doesn't exist there (i.e. if the user hasn't checked them out
160 # with cvs), then we should look in a backup location.  That's what this vrble
161 # is about.  It's used several times below in this file.
162 ifeq ($(PLATFORM),ppc32_bgl_compute)
163 GCC         = mpgcc
164 GXX         = mpg++
165 CC          = mpgcc
166 CXX         = mpg++
167 endif
168 ifeq ($(PLATFORM),ppc32_bgp_compute)
169 GCC         = powerpc-bgp-linux-gcc
170 GXX         = powerpc-bgp-linux-g++
171 CC          = powerpc-bgp-linux-gcc
172 CXX         = powerpc-bgp-linux-g++
173 endif
174
175 GCC      ?= gcc
176 GXX      ?= g++
177 LINKER   = ld
178 AS              = as
179 CC       ?= $(GCC)
180 CXX      ?= $(GXX)
181 LEX      = flex
182 RANLIB   = ranlib
183 AR       = ar
184 YFLAGS   = -d -y
185 YACC     = bison
186 MV       = mv
187 CP       = cp
188 RM       = rm -f
189 LN       = ln -s
190 MKDIR           = mkdir -p
191 CHMOD    = chmod
192 PERL            = perl          # NB: perl v5 or higher required!
193
194 # COLLECTOR is only used by purify & quantify
195 COLLECTOR       = /s/gcc-2.7.2/bin/../lib/gcc-lib/$(PLATFORM)/2.7.2/ld
196 # BUILDSTAMP is used to generate local build vouchers
197 BUILDSTAMP      = $(TO_CORE)/scripts/buildstamp
198
199 ifndef PLATFORM
200 BUILDERROR: PLATFORM must be defined in environment to build (and run) Paradyn
201 endif
202
203 # Define all tags based on the platform string. When a new platform
204 # is added, add it to the list
205
206 #
207 # Brief description of -Ds:
208 #
209 # CAP
210 # cap_save_the_world: support for creating a patched binary
211 # cap_relocation: function relocation
212 # cap_stripped_binaries: recursive parsing and function discovery without symbols
213 # cap_async_events: 
214 # cap_ptrace: uses ptrace interface
215 # cap_proc: uses /proc interface
216 # cap_proc_ioctl: uses ioctl interface to proc
217 # cap_proc_fd: uses solaris-style multiple-fd proc interface
218 # cap_threads: support for threaded applications
219 # cap_dynamic_heap: support for a dynamically growing inferior heap
220 # cap_threaded_times: (Linux only) times() returns per-thread information.
221 # cap_syscall_trap: The ability (or necessity) to place a trap instruction at the instruction following a system call.
222 # cap_slicing: (i386-unknown-linux2.4 and 2.6, sparc-sun-solaris2.8 and 2.9) Intraprocedural slicing feature
223 # cap_32_64: platforms that support 32- and 64-bit mutatees
224 # cap_liveness: liveness analysis
225 # cap_fixpoint_gen: Generate code using a fixpoint method that saves space
226 # cap_noaddr_gen: Allow code generation before determining the address code is going into
227 # cap_mutatee_traps: Traps can be handled mutatee side
228 # cap_instruction_api: System uses instruction API
229 # cap_registers: User can access registers in snippets
230 # cap_instruction_replacement: we use the replaceCode concept to implement (e.g.,) function call replacement
231 # cap_tramp_liveness: we can run liveness over our trampolines to determine what's used
232 # cap_toc: platform uses a TOC pointer that must be updated in inter-module control transfers
233 # cap_toc_32: "" for 32-bit mode
234 # cap_toc_64: "" for 64-bit mode
235 #
236 # BUG
237 # bug_aix_broken_fork: AIX child process does not stop on fork if requested.
238 # bug_syscall_changepc_rewind: Linux rewinds the PC by <addr width> if
239 #   the change occurs within a system call; reported by SGI.
240 # bug_freebsd_missing_sigstop: A stop followed by a continue and a new SIGSTOP 
241 #   results in the new SIGSTOP event never being returned from waitpid
242 # bug_freebsd_mt_suspend: threads do not suspend after an attach
243 # bug_freebsd_change_pc: when changing the PC for a thread, the OS may not
244 #   schedule the thread if it is blocked in the kernel.
245 # bug_phdrs_first_page: the OS requires that the program headers for a ELF
246 #   binary must reside in the first page of the binary on disk
247 # bug_registers_after_exit: Linux throws an oops and kills the culprit thread
248 #   when it attempts to read registers via ptrace after a pre-Exit
249 # bug_force_terminate_failure: during a ForceTerminate on Linux, there exists
250 # an OS-level race condition where we will receive a Post-Exit event but the 
251 # process remains stopped
252
253 ifeq ($(PLATFORM),i386-unknown-linux2.4)
254 OLD_DEF     = -Di386_unknown_linux2_0
255 ARCH_DEF    = -Darch_x86
256 OS_DEF      = -Dos_linux
257 CAP_DEF     = -Dcap_ptrace -Dcap_relocation -Dcap_stripped_binaries -Dcap_async_events -Dcap_threads -Dcap_dynamic_heap -Dcap_dwarf -Dcap_liveness -Dcap_fixpoint_gen -Dcap_noaddr_gen -Dcap_mutatee_traps -Dcap_instruction_api -Dcap_serialization -Dcap_binary_rewriter -Dcap_virtual_registers -Dcap_cache_func_starts -Dcap_instruction_replacement -Dcap_tramp_liveness
258 BUG_DEF     = -Dbug_syscall_changepc_rewind
259 endif
260
261 ifeq ($(PLATFORM),i386-unknown-linux2.6)
262 OLD_DEF     = -Di386_unknown_linux2_0
263 ARCH_DEF    = -Darch_x86
264 OS_DEF      = -Dos_linux
265 CAP_DEF     = -Dcap_ptrace -Dcap_relocation -Dcap_stripped_binaries -Dcap_async_events -Dcap_threads -Dcap_dynamic_heap -Dcap_dwarf -Dcap_liveness -Dcap_fixpoint_gen -Dcap_noaddr_gen -Dcap_mutatee_traps -Dcap_instruction_api -Dcap_serialization -Dcap_binary_rewriter -Dcap_virtual_registers -Dcap_instruction_replacement -Dcap_tramp_liveness
266 BUG_DEF     = -Dbug_syscall_changepc_rewind
267 endif
268
269 ifeq ($(PLATFORM),x86_64-unknown-linux2.4)
270 OLD_DEF     = -Dx86_64_unknown_linux2_4
271 ARCH_DEF    = -Darch_x86_64 -Darch_64bit
272 OS_DEF      = -Dos_linux
273 CAP_DEF     = -Dcap_ptrace -Dcap_stripped_binaries -Dcap_async_events -Dcap_threads -Dcap_dynamic_heap -Dcap_relocation -Dcap_dwarf -Dcap_32_64 -Dcap_liveness -Dcap_fixpoint_gen -Dcap_noaddr_gen -Dcap_mutatee_traps -Dcap_binary_rewriter -Dcap_registers -Dcap_instruction_api -Dcap_serialization -Dcap_instruction_replacement -Dcap_tramp_liveness
274 BUG_DEF     = -Dbug_syscall_changepc_rewind
275 endif
276
277 ifeq ($(PLATFORM),sparc-sun-solaris2.8)
278 OLD_DEF     = -Dsparc_sun_solaris2_4
279 ARCH_DEF    = -Darch_sparc
280 OS_DEF      = -Dos_solaris
281 CAP_DEF     = -Dcap_proc -Dcap_proc_fd -Dcap_async_events -Dcap_dynamic_heap -Dcap_threads -Dcap_relocation -Dcap_dwarf \
282 -Dcap_syscall_trap -Dcap_serialization
283 BUG_DEF     =
284 endif
285
286 ifeq ($(PLATFORM),sparc-sun-solaris2.9)
287 OLD_DEF     = -Dsparc_sun_solaris2_4
288 ARCH_DEF    = -Darch_sparc
289 OS_DEF      = -Dos_solaris
290 CAP_DEF     = -Dcap_proc -Dcap_proc_fd -Dcap_async_events -Dcap_dynamic_heap -Dcap_threads -Dcap_relocation -Dcap_dwarf \
291 -Dcap_syscall_trap -Dcap_serialization
292 BUG_DEF     =
293 endif
294
295 ifeq ($(PLATFORM),rs6000-ibm-aix5.1)
296 OLD_DEF     = -Drs6000_ibm_aix5_1 -Drs6000_ibm_aix4_1
297 ARCH_DEF    = -Darch_power
298 OS_DEF      = -Dos_aix
299 CAP_DEF     = -Dcap_proc -Dcap_proc_fd -Dcap_async_events -Dcap_relocation -Dcap_threads -Dcap_dynamic_heap -Dcap_syscall_trap \
300 -Dcap_liveness -Dcap_use_pdvector -Dcap_serialization -Dcap_registers -Dcap_instruction_replacement -Dcap_instruction_api \
301 -Dcap_stackwalker_use_symtab
302 BUG_DEF     =
303 endif
304
305 ifeq ($(PLATFORM),rs6000-ibm-aix64-5.2)
306 OLD_DEF     = -Drs6000_ibm_aix5_1 -Drs6000_ibm_aix4_1
307 ARCH_DEF    = -Darch_power -Darch_64bit
308 OS_DEF      = -Dos_aix
309 CAP_DEF     = -Dcap_proc -Dcap_proc_fd -Dcap_async_events -Dcap_relocation -Dcap_threads -Dcap_dynamic_heap -Dcap_syscall_trap \
310 -Dcap_liveness -Dcap_use_pdvector -Dcap_serialization -Dcap_registers -Dcap_instruction_replacement \
311 -Dcap_instruction_api -Dcap_32_64
312 BUG_DEF     = 
313 endif
314
315 ifeq ($(PLATFORM),ppc64_linux)
316 OLD_DEF     = -Dppc64_linux
317 ARCH_DEF    = -Darch_power -Darch_64bit
318 OS_DEF      = -Dos_linux
319 CAP_DEF     = -Dcap_ptrace -Dcap_relocation -Dcap_async_events -Dcap_threads -Dcap_dynamic_heap -Dcap_dwarf -Dcap_liveness \
320 -Dcap_32_64 -Dcap_serialization -Dcap_registers -Dcap_instruction_replacement -Dcap_binary_rewriter -Dcap_instruction_api -Dcap_toc_64
321 BUG_DEF     = -Dbug_syscall_changepc_rewind -Dbug_registers_after_exit -Dbug_force_terminate_failure
322 endif
323
324 ifeq ($(PLATFORM),ppc32_linux)
325 OLD_DEF     = -Dppc32_linux
326 ARCH_DEF    = -Darch_power
327 OS_DEF      = -Dos_linux
328 CAP_DEF     = -Dcap_ptrace -Dcap_relocation -Dcap_async_events -Dcap_threads -Dcap_dynamic_heap -Dcap_dwarf -Dcap_liveness \
329 -Dcap_serialization -Dcap_registers -Dcap_instruction_replacement -Dcap_instruction_api \
330 -Dcap_binary_rewriter
331 BUG_DEF     = -Dbug_syscall_changepc_rewind -Dbug_registers_after_exit -Dbug_force_terminate_failure
332 endif
333
334 ifeq ($(PLATFORM),ppc32_bgp)
335 OLD_DEF     = -Dppc32_linux
336 ARCH_DEF    = -Darch_power
337 OS_DEF      = -Dos_linux
338 CAP_DEF     = -Dcap_ptrace -Dcap_mutatee_traps -Dcap_relocation -Dcap_async_events -Dcap_threads -Dcap_dynamic_heap -Dcap_dwarf -Dcap_liveness \
339 -Dcap_serialization -Dcap_registers -Dcap_instruction_replacement -Dcap_instruction_api \
340 -Dcap_binary_rewriter
341 BUG_DEF     = -Dbug_syscall_changepc_rewind
342 endif
343
344
345 ifeq ($(PLATFORM),ppc32_bgl_ion)
346 OLD_DEF     = -Dppc32_bluegene
347 ARCH_DEF    = -Darch_power
348 OS_DEF      = -Dos_bg -Dos_bgl -Dos_bg_ion
349 CAP_DEF     = -Dcap_dwarf
350 BUG_DEF     = 
351 endif
352
353 ifeq ($(PLATFORM),ppc32_bgl_compute)
354 OLD_DEF     = -Dppc32_bluegene
355 ARCH_DEF    = -Darch_powerO
356 OS_DEF      = -Dos_bg -Dos_bgl -Dos_bg_compute
357 CAP_DEF     = -Dcap_dwarf
358 BUG_DEF     = 
359 endif
360
361 ifeq ($(PLATFORM),ppc32_bgp_ion)
362 OLD_DEF     = -Dppc32_bluegene
363 ARCH_DEF    = -Darch_power
364 OS_DEF      = -Dos_bg -Dos_bgp -Dos_bg_ion
365 CAP_DEF     = -Dcap_dwarf
366 BUG_DEF     = 
367 endif
368
369 ifeq ($(PLATFORM),ppc64_bgq_ion)
370 OLD_DEF     = -Dppc64_bluegene
371 ARCH_DEF    = -Darch_power -Darch_64bit
372 OS_DEF      = -Dos_bg -Dos_bgq -Dos_bgq_ion
373 CAP_DEF     = -Dcap_dwarf -Dcap_instruction_api
374 BUF_DEF     =
375 endif
376
377 ifeq ($(PLATFORM),ppc32_bgp_compute)
378 OLD_DEF     = -Dppc32_bluegene
379 ARCH_DEF    = -Darch_power
380 OS_DEF      = -Dos_bg -Dos_bgp -Dos_bg_compute
381 CAP_DEF     = -Dcap_dwarf
382 BUG_DEF     = 
383 endif
384
385 ifeq ($(PLATFORM),x86_64_catamount)
386 OLD_DEF     = -Dx86_64_catamount
387 ARCH_DEF    = -Darch_x86_64 -Darch_64bit
388 OS_DEF      = -Dos_catamount
389 CAP_DEF     = -Dcap_dwarf
390 BUG_DEF     = 
391 endif
392 ifeq ($(PLATFORM),x86_64_cnl)
393 OLD_DEF     = -Dx86_64_cnl -Dx86_64_unknown_linux2_4
394 ARCH_DEF    = -Darch_x86_64 -Darch_64bit
395 OS_DEF      = -Dos_linux -Dos_cnl
396 CAP_DEF     = -Dcap_ptrace -Dcap_stripped_binaries -Dcap_async_events -Dcap_threads -Dcap_dynamic_heap -Dcap_relocation -Dcap_dwarf -Dcap_32_64 -Dcap_liveness -Dcap_fixpoint_gen -Dcap_noaddr_gen -Dcap_mutatee_traps -Dcap_binary_rewriter -Dcap_registers -Dcap_instruction_api -Dcap_serialization -Dcap_instruction_replacement -Dcap_tramp_liveness
397 BUG_DEF     = -Dbug_syscall_changepc_rewind
398 STATIC_COMPS = true
399 DONT_BUILD_NEWTESTSUITE = true
400 endif
401 #
402
403 ifeq ($(PLATFORM),ppc32-unknown-vxworks6.x)
404 OLD_DEF     = -Dppc32_vxworks
405 ARCH_DEF    = -Darch_power -Dtarget_ppc32 -Dtarget_smallmem -Dendian_mismatch
406 OS_DEF      = -Dos_vxworks
407 CAP_DEF     = -Dcap_relocation -Dcap_async_events -Dcap_threads -Dcap_dynamic_heap -Dcap_dwarf -Dcap_slicing -Dcap_liveness -Dcap_fixpoint_gen -Dcap_noaddr_gen -Dno_cap_serialization -Dcap_virtual_registers -Dcap_stackwalker_use_symtab -Dcap_cache_func_starts -Dcap_instruction_replacement -Dcap_instruction_api
408 #CAP_DEF     = -Dcap_mutatee_traps -Dcap_binary_rewriter -Dcap_stripped_binaries
409 BUG_DEF     =
410 endif
411
412 ifeq ($(PLATFORM),i386-unknown-vxworks6.x)
413 OLD_DEF     = -Di386_vxworks
414 ARCH_DEF    = -Darch_x86 -Dtarget_smallmem
415 OS_DEF      = -Dos_vxworks -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
416 CAP_DEF     = -Dcap_relocation -Dcap_async_events -Dcap_threads -Dcap_dynamic_heap -Dcap_dwarf -Dcap_slicing -Dcap_liveness -Dcap_fixpoint_gen -Dcap_noaddr_gen -Dno_cap_serialization -Dcap_virtual_registers -Dcap_stackwalker_use_symtab -Dcap_cache_func_starts -Dcap_instruction_replacement -Dcap_instruction_api
417 #CAP_DEF     = -Dcap_mutatee_traps -Dcap_binary_rewriter -Dcap_stripped_binaries
418 BUG_DEF     =
419 endif
420
421 ifeq ($(PLATFORM),i386-unknown-freebsd7.2)
422 OLD_DEF     = -Di386_unknown_freebsd7_0
423 ARCH_DEF    = -Darch_x86
424 OS_DEF      = -Dos_freebsd
425 CAP_DEF     = -Dcap_instruction_api -Dcap_noaddr_gen -Dcap_dwarf -Dcap_binary_rewriter -Dcap_liveness -Dcap_fixpoint_gen -Dcap_registers -Dcap_instruction_replacement -Dcap_tramp_liveness -Dcap_relocation -Dcap_virtual_registers -Dcap_stripped_binaries -Dcap_threads -Dcap_mutatee_traps
426 BUG_DEF     = -Dbug_freebsd_missing_sigstop -Dbug_freebsd_mt_suspend -Dbug_freebsd_change_pc -Dbug_phdrs_first_page -Dbug_syscall_changepc_rewind -Dbug_freebsd_attach_stop
427 endif
428
429 ifeq ($(PLATFORM),amd64-unknown-freebsd7.2)
430 OLD_DEF     = -Damd64_unknown_freebsd7_0
431 ARCH_DEF    = -Darch_x86_64 -Darch_64bit
432 OS_DEF      = -Dos_freebsd
433 CAP_DEF     = -Dcap_instruction_api -Dcap_noaddr_gen -Dcap_dwarf -Dcap_binary_rewriter -Dcap_liveness -Dcap_fixpoint_gen -Dcap_registers -Dcap_instruction_replacement -Dcap_tramp_liveness -Dcap_relocation -Dcap_virtual_registers -Dcap_stripped_binaries -Dcap_32_64 -Dcap_threads -Dcap_mutatee_traps
434 BUG_DEF     = -Dbug_freebsd_missing_sigstop -Dbug_freebsd_mt_suspend -Dbug_freebsd_change_pc -Dbug_phdrs_first_page -Dbug_syscall_changepc_rewind -Dbug_freebsd_attach_stop
435 endif
436
437
438 ifdef HAVE_THREAD_DB
439 CAP_DEF    += -Dcap_thread_db
440 endif
441
442 # Combine all the #defines for ease of use
443 UNIFIED_DEF     = $(ARCH_DEF) $(OS_DEF) $(VER_DEF) $(CAP_DEF) $(BUG_DEF) $(OLD_DEF) $(AC_DEF)
444 UNIFIED_TEST_DEF        = $(ARCH_DEF) $(OS_DEF) $(VER_DEF) $(CAP_DEF) $(BUG_DEF) $(OLD_DEF)
445
446 #ifeq (solaris,$(findstring solaris,$(PLATFORM)))
447 ifeq (solaris,$(findstring solaris,$(OS_DEF)))
448 #AS             = /usr/ccs/bin/as
449 RANLIB          = true
450 endif
451
452 ifeq (linux,$(findstring linux,$(OS_DEF)))
453 AS              = /usr/bin/as
454 RANLIB          = true 
455 ASFLAGS         =
456 else
457 ASFLAGS         = -P $(UNIFIED_DEF) 
458 endif 
459
460 ifeq (ppc64_linux, $(findstring ppc64_linux, $(PLATFORM)))
461 ASFLAGS         += -m64
462 endif
463
464 # set the macros that control whether the stdint limit and constant
465 # macros are defined for C++ on the compilers command line so that
466 # we don't have to worry about the ordering of #includes.
467 ifeq (linux,$(findstring linux,$(PLATFORM)))
468 STDINT_MACROS   = -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
469 else
470 ifeq (freebsd,$(findstring freebsd,$(PLATFORM)))
471 STDINT_MACROS   = -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
472 else
473 ifeq (bluegene,$(findstring bluegene,$(PLATFORM)))
474 STDINT_MACROS   = -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
475 else
476 ifeq (cnl,$(findstring cnl,$(PLATFORM)))
477 STDINT_MACROS   = -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
478 else
479 ifeq (bgp,$(findstring bgp,$(PLATFORM)))
480 STDINT_MACROS   = -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
481 else
482 STDINT_MACROS   = 
483 endif
484 endif
485 endif
486 endif
487 endif
488
489 # Default module compiler; modules which want $(CC) should redefine
490 # this, **NOT** CC
491
492 MODCC           = $(CXX)
493 MODCFLAGS       = $(CXXFLAGS)
494 DEPCC       = $(MODCC)
495
496 .SUFFIXES:      .I
497
498 # Added dyninst/external for included external dependencies - bernat, 11JUN07
499 IFLAGS          = $(FIRST_INCLUDE) -I../h -I. -I$(TO_CORE) -I$(TO_CORE)/dynutil/h -I$(TO_CORE)/external
500
501 # uncomment/comment the line below to build with/without compilation warnings
502 # SILENCE_WARNINGS=true
503
504 ifndef SILENCE_WARNINGS
505 BASICWARNINGS   = -W -Wall
506
507 COMMONWARNINGS  = -W -Wall -Wshadow -Wpointer-arith       \
508                 -Wcast-qual            \
509                 -Wredundant-decls -Woverloaded-virtual
510
511 # not as strict as above, but can actually be used -- mdc
512 USEFULWARNINGS  = -W -Wall -Wpointer-arith       \
513                 -Wcast-qual            \
514                 -Woverloaded-virtual
515
516 # being nice to poor old pathetic tcl/tk header files --ari
517 TCLFRIENDLYWARNINGS = -W -Wall -Wpointer-arith \
518                 -Wcast-qual \
519                 -Woverloaded-virtual
520
521 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
522 COMMONWARNINGS       += -Wno-unknown-pragmas
523 USEFULWARNINGS       += -Wno-unknown-pragmas
524 TCLFRIENDLYWARNINGS  += -Wno-unknown-pragmas
525 else   # STL on Solaris with cast-align generates a warning with much output
526 COMMONWARNINGS       += -Wcast-align
527 USEFULWARNINGS       += -Wcast-align
528 endif
529 endif # SILENCE_WARNINGS
530
531
532 ifndef GCC_2_95
533 GCC_VER := $(shell gcc --version)
534 ifneq (,$(findstring 2.95,$(GCC_VER)))
535 GCC_2_95 = true
536 endif
537 endif
538
539 ifndef OLD_GCC
540 GCC_VER := $(shell gcc --version | head -n 1 | perl -ane 'print pop(@F)')
541 versionNumbers = $(sort $(GCC_VER) 2.95)
542 versionNumber  = $(firstword $(versionNumbers))
543 ifneq (2.95, $(versionNumber))
544 OLD_GCC = true
545 endif
546 endif
547
548 ifndef OLD_GCC
549 COMMONWARNINGS += -Wno-non-template-friend
550 USEFULWARNINGS += -Wno-non-template-friend
551 TCLFRIENDLYWARNINGS += -Wno-non-template-friend
552 endif
553
554 #don't inline -- for the files that won't emit template code
555 INLINE_DEFINES = 
556
557 #inline the private members of the class -- templates.o can use this
558 TEMP_INLINE_DEFINES = -DDO_INLINE_P="inline"
559
560 # inline everything -- the way things should be
561 ALL_INLINE_DEFINES = -DDO_INLINE_F="inline" -DDO_INLINE_P="inline"
562
563
564 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
565 USES_LIBDYNINST_SO = true
566 endif
567 ifeq (linux,$(findstring linux,$(PLATFORM)))
568 USES_LIBDYNINST_SO = true
569 endif
570
571 # Set this variable if it's desired that dyninst be built with the native
572 # compiler on Solaris
573 SOLARIS_NATIVE =  #1
574
575 ifdef SOLARIS_NATIVE
576 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
577 USES_LIBDYNINST_SO = true
578 USES_NATIVE_CC = true
579 NATIVE_CC      = cc
580 NATIVE_CXX     = CC
581 endif
582 endif
583
584 ifeq (ibm-aix,$(findstring ibm-aix,$(PLATFORM)))
585 ifndef IBM_BPATCH_COMPAT
586   USES_LIBDYNINST_SO = true
587 endif
588
589 USES_PERF_LIBRARY = true
590 # No longer used, because of relocation.
591 #USES_LIB_TEXT_HEAP = true
592
593 ifdef IBM_BPATCH_COMPAT
594   ifeq (ibm-aix, $(findstring ibm-aix, $(PLATFORM)))
595     USES_NATIVE_CC = true
596     NATIVE_CC = xlc
597     NATIVE_CXX = xlC
598     DEPCC = xlC
599     DEPENDFLAGS = -M -E -qhalt=E -qro -qtbtable=full -DCOMPILER="xlC"
600   endif
601 endif
602
603 # As of AIX 5, the pm_init function in libpmapi takes more
604 # parameters. This is keyed by the USES_PMAPI_GROUPS define,
605 # and handled in the paradyn runtime library
606 PMAPI_VERSION := $(shell uname -v )
607 ifeq (5, $(findstring 5,$(PMAPI_VERSION)))
608 USES_PMAPI_GROUPS = true
609 endif
610 endif
611
612 ifndef STATIC_COMPS
613 ifndef USES_NATIVE_CC
614 ifneq ($(SUITE_NAME),testsuite)
615 MYFLAGS += -fPIC
616 endif
617 endif
618 endif
619
620 # if we don't want OPT_FLAG defined for a particular part of the code
621 # (e.g. rtinst for aix), we just need to define NO_OPT_FLAG before doing
622 # the include of make.config - naim
623 ifndef NO_OPT_FLAG
624 OPT_FLAG        = -O2
625 endif
626
627 VERBOSE_COMPILATION     = true
628
629 # Do we shorten compile lines?
630 ifndef VERBOSE_COMPILATION
631 HIDE_COMP       = @
632 endif
633
634 ifeq (ibm-aix64-, $(findstring ibm-aix64-, $(PLATFORM)))
635     ARCH_FLAGS   = -maix64 -Drs6000_ibm_aix64
636 endif
637
638 ifeq (ppc64_linux, $(findstring ppc64_linux, $(PLATFORM)))
639     ARCH_FLAGS = -m64
640 endif
641
642 # flags for normal (non-kludge) files, with common warnings
643 CFLAGS          = $(IFLAGS) $(UNIFIED_DEF) $(OPT_FLAG) $(COMMON_WARNINGS) $(ARCH_FLAGS)
644 CXXFLAGS        = $(IFLAGS) $(UNIFIED_DEF) $(OPT_FLAG) $(COMMON_WARNINGS) $(STDINT_MACROS) $(ARCH_FLAGS)
645 LDFLAGS         = $(ARCH_FLAGS)
646
647 # flags for kludge files, won't have warnings generated
648 KFLAGS          = $(IFLAGS) $(UNIFIED_DEF) $(BASICWARNINGS)
649
650 ifdef COVERAGE
651
652 CFLAGS += -fprofile-arcs -ftest-coverage
653 CXXFLAGS += -fprofile-arcs -ftest-coverage
654 LDFLAGS += -fprofile-arcs -ftest-coverage
655
656 endif
657
658 ifdef USING_PURIFY
659 CFLAGS          += -DPURE_BUILD
660 CXXFLAGS        += -DPURE_BUILD
661 endif
662
663 ifdef USES_PERF_LIBRARY
664 # Add any platform-specific performance libraries here
665 ifeq (ibm-aix,$(findstring ibm-aix,$(PLATFORM)))
666 USES_PMAPI = true
667 CFLAGS          += -DUSES_PMAPI
668 CXXFLAGS        += -DUSES_PMAPI
669 LDFLAGS         += -lpmapi
670 ifdef USES_PMAPI_GROUPS
671 CFLAGS          += -DPMAPI_GROUPS
672 CXXFLAGS        += -DPMAPI_GROUPS
673 endif # USES_PMAPI_GROUPS
674 endif # ibm-aix
675 endif # perf_library
676
677 ifdef USE_DEPRECATED_BPATCH_VECTOR
678 CXXFLAGS        += -DUSE_DEPRECATED_BPATCH_VECTOR
679 CFLAGS          += -DUSE_DEPRECATED_BPATCH_VECTOR
680 TFLAGS          += -DUSE_DEPRECATED_BPATCH_VECTOR
681 else
682 #CFLAGS        += -fimplicit-templates
683 CXXFLAGS        += -fimplicit-templates
684 TFLAGS        += -fimplicit-templates
685 endif
686
687 ifndef STATIC_COMPS 
688 SONAME_FLAGS = -Wl,-soname,$(TARGET).$(RELEASE_NUM)
689 endif
690
691 ifdef IBM_BPATCH_COMPAT
692 CXXFLAGS        += -DIBM_BPATCH_COMPAT
693 CFLAGS          += -DIBM_BPATCH_COMPAT
694 endif
695
696 ifndef OPT_FLAG
697 KFLAGS          += -g
698 DEBUG_FLAG = -g
699 endif
700
701 ifeq ($(DEBUG_FLAG),none)
702 DEBUG_FLAG =
703 endif
704
705 ifdef DEBUG_FLAG
706 CFLAGS   += $(DEBUG_FLAG)
707 CXXFLAGS += $(DEBUG_FLAG)
708 KFLAGS   += $(DEBUG_FLAG)
709 endif
710
711 ifdef VERBOSE_CFG_ACCOUNTING
712 CFLAGS   += -DVERBOSE_CFG_FACTORY
713 CXXFLAGS += -DVERBOSE_CFG_FACTORY
714 endif
715
716 # flags for template files, don't define external template flags
717 # -g is optional in this case -- should be defined at module level
718 TFLAGS          = $(IFLAGS) $(TEMP_INLINE_DEFINES) $(UNIFIED_DEF) $(OPT_FLAG) $(BASICWARNINGS) $(STDINT_MACROS) $(ARCH_FLAGS)
719
720 ifdef DO_INLINE_ALL
721 CFLAGS         += $(ALL_INLINE_DEFINES)
722 CXXFLAGS       += $(ALL_INLINE_DEFINES)
723 endif
724
725 # Start off LIBDIR to point to the user's devel area's paradyn lib directory.
726 # As a backup, in case the user hasn't checked out & compiled some paradyn lib,
727 LIBDIR          = $(FIRST_LIBDIR) \
728                  -L$(TO_CORE)/../$(PLATFORM)/lib 
729
730 # Set IGEN to point to $(TO_CORE)/../bin/$(PLATFORM)/igen, if it exists,
731 # else set it to just "igen" (i.e. assume it's in the user's path)
732 ifdef CROSSCOMPILER
733 IGEN = $(shell if [ -f ${TO_CORE}/../${BASEPLATFORM}/bin/igen ]; then echo ${TO_CORE}/../${BASEPLATFORM}/bin/igen; else if [ -f ${TO_CORE}/igen/${BASEPLATFORM}/igen ]; then echo ${TO_CORE}/igen/${BASEPLATFORM}/igen; else echo igen; fi; fi )
734 else
735 IGEN = $(shell if [ -f ${TO_CORE}/${PROGRAM_DEST}/igen ]; then echo ${TO_CORE}/${PROGRAM_DEST}/igen; else if [ -f ${TO_CORE}/igen/$(PLATFORM)/igen ]; then echo ${TO_CORE}/igen/${PLATFORM}/igen; else echo igen; fi; fi )
736 endif
737
738 ifdef NO_IMPLICIT_TEMPLATES
739 ifdef USE_DEPRECATED_BPATCH_VECTOR
740 #  CFLAGS               += -fno-implicit-templates
741   CXXFLAGS      += -fno-implicit-templates
742   KFLAGS                += -fno-implicit-templates
743 endif
744 endif
745
746 ifndef INSTANTIATE_TEMPLATES
747 ifndef NO_IMPLICIT_TEMPLATES
748 # -fexternal-templates and -Dexternal_templates should both be used or
749 # neither should be used; add them to CFLAGS, CXXFLAGS, and KFLAGS
750 # (but not to TFLAGS).
751 #
752 #CFLAGS         +=  -fexternal-templates -Dexternal_templates
753 #CXXFLAGS       +=  -fexternal-templates -Dexternal_templates
754 #KFLAGS         +=  -fexternal-templates -Dexternal_templates
755 endif
756 endif
757
758 THREADSLIB      =
759 USE_PTHREADS    = yes
760
761 ifeq (xyes,x$(USE_PTHREADS))
762 THREADSLIB      += -lpthread
763
764 # On Linux, programs using pthreads are supposed to define _REENTRANT
765 ifeq (linux,$(findstring linux,$(PLATFORM)))
766 CFLAGS                  += -D_REENTRANT=1
767 CXXFLAGS                += -D_REENTRANT=1
768 KFLAGS                  += -D_REENTRANT=1
769 TFLAGS                  += -D_REENTRANT=1
770 endif
771
772 # Ditto for FreeBSD
773 ifeq (freebsd,$(findstring freebsd,$(PLATFORM)))
774 CFLAGS                  += -D_REENTRANT=1
775 CXXFLAGS                += -D_REENTRANT=1
776 KFLAGS                  += -D_REENTRANT=1
777 TFLAGS                  += -D_REENTRANT=1
778 endif
779
780 ifeq (ibm-aix,$(findstring ibm-aix,$(PLATFORM)))
781 #CFLAGS                 += -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_THREAD_SAFE_ERRNO=1
782 #CXXFLAGS               += -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_THREAD_SAFE_ERRNO=1
783 #KFLAGS                 += -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_THREAD_SAFE_ERRNO=1
784 #TFLAGS                 += -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_THREAD_SAFE_ERRNO=1
785 endif
786
787 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
788 CFLAGS                  += -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_THREAD_SAFE_ERRNO=1
789 CXXFLAGS                += -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_THREAD_SAFE_ERRNO=1
790 KFLAGS                  += -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_THREAD_SAFE_ERRNO=1
791 TFLAGS                  += -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_THREAD_SAFE_ERRNO=1
792 endif
793
794 endif
795
796 # System build constraints
797 #Build the MT daemon on AIX, Solaris, and Linux/x86
798 DONT_BUILD_PD_MT = true
799 ifeq (ibm-aix,$(findstring ibm-aix,$(PLATFORM)))
800 DONT_BUILD_PD_MT =
801 endif
802 ifeq (sparc-sun-solaris,$(findstring sparc-sun-solaris,$(PLATFORM)))
803 DONT_BUILD_PD_MT =
804 endif
805 ifeq (i386-unknown-linux2.4,$(findstring i386-unknown-linux2.4,$(PLATFORM)))
806 DONT_BUILD_PD_MT =
807 endif
808
809 ifeq (ppc32_bgp,$(findstring ppc32_bgp,$(PLATFORM)))
810 DONT_BUILD_NEWTESTSUITE = true
811 endif
812 ifdef USES_MMTIMER
813 CFLAGS             += -Dcap_mmtimer
814 CXXFLAGS           += -Dcap_mmtimer
815 endif
816
817 ifdef USES_UNWIND_LIB
818 CFLAGS         += -Dcap_unwind
819 CXXFLAGS       += -Dcap_unwind 
820 LIBUNWIND_LIB  ?= $(LIBUNWINDDIR)/lib
821 LIBUNWIND_INC  ?= $(LIBUNWINDDIR)/include
822 endif
823
824 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
825 LIBELF_PLATFORM = "true"
826 LIBDWARF_PLATFORM = "true"
827 endif
828 ifeq (linux,$(findstring linux,$(PLATFORM)))
829 LIBELF_PLATFORM = "true"
830 LIBDWARF_PLATFORM = "true"
831 endif
832 ifeq (freebsd,$(findstring freebsd,$(PLATFORM)))
833 LIBELF_PLATFORM = "true"
834 LIBDWARF_PLATFORM = "true"
835 endif
836 ifeq (vxworks,$(findstring vxworks,$(PLATFORM)))
837 LIBELF_PLATFORM = "true"
838 LIBDWARF_PLATFORM = "true"
839 endif
840 ifeq (_bgq,$(findstring _bgq,$(PLATFORM)))
841 LIBELF_PLATFORM = "true"
842 LIBDWARF_PLATFORM = "true"
843 endif
844 ifeq (_bgp,$(findstring _bgp,$(PLATFORM)))
845 LIBELF_PLATFORM = "true"
846 LIBDWARF_PLATFORM = "true"
847 endif
848 ifeq (_bgl,$(findstring _bgl,$(PLATFORM)))
849 LIBELF_PLATFORM = "true"
850 LIBDWARF_PLATFORM = "true"
851 endif
852 ifeq (_cnl,$(findstring _cnl,$(PLATFORM)))
853 LIBELF_PLATFORM = "true"
854 LIBDWARF_PLATFORM = "true"
855 endif
856
857 ifdef HAVE_NATIVE_DEMANGLER
858 LDFLAGS += -ldemangle
859 CAP_DEF += -Dcap_native_demangler
860 endif
861
862 ifdef GNU_DEMANGLER
863 CAP_DEF += -Dcap_gnu_demangler
864 endif
865
866 ifdef USE_LIBERTY
867 CAP_DEF += -Dcap_liberty
868 ifdef LINK_LIBERTY
869 ifdef LIBIBERTY_LIB
870 DEMANGLER_LINK = -L$(LIBIBERTY_LIB) -liberty
871 else
872 DEMANGLER_LINK = -liberty
873 endif
874 else
875 CAP_DEF += -Dcap_liberty_exec
876 ifdef LIBIBERTY_LIB
877 DEMANGLER_EXEC_LINK = -L$(LIBIBERTY_LIB) -liberty
878 else
879 DEMANGLER_EXEC_LINK = -liberty
880 endif
881 endif
882 endif
883
884 ifdef USES_FLEX
885 ifdef FLEX_DIR
886 WITHLIBFL       = --with-libfldir=$(FLEX_DIR)
887 else
888 WITHLIBFL       =
889 endif
890 endif
891
892 #Build other variables based off of the above defaults
893
894 ifdef USES_TCLTK
895 # use the first set if using tcl8.4,
896 # use the second set if still using tcl8.3
897 ifndef USE_TCL83
898
899 TCLTK_LIBVER_ID = 8.4
900 CFLAGS      += -DTCLCONST=const
901 CXXFLAGS    += -DTCLCONST=const
902 KFLAGS      += -DTCLCONST=const
903 TFLAGS      += -DTCLCONST=const
904
905 else
906
907 TCLTK_LIBVER_ID = 8.3
908 CFLAGS      += -DTCLCONST=""
909 CXXFLAGS    += -DTCLCONST=""
910 KFLAGS      += -DTCLCONST=""
911 TFLAGS      += -DTCLCONST=""
912
913 endif
914
915 TCL_LIB         = -ltcl$(TCLTK_LIBVER_ID)
916 TK_LIB          = -ltk$(TCLTK_LIBVER_ID)
917
918 ifdef LIBTCLTKSTATIC
919 TCLTK_LIBS      += -Wl,-Bstatic $(TCL_LIB) $(TK_LIB) -Wl,-Bdynamic
920 else
921 TCLTK_LIBS      += $(TCL_LIB) $(TK_LIB)
922 endif
923
924 # TCL2C is used to generate compilable sources from tcl files
925 TCL2C           = $(TO_CORE)/../scripts/tcl2c
926 TCL2C_GEN_SRCS  = tcl2c.C
927
928 IFLAGS          += -I$(TCLTK_INC_DIR)
929 ifdef CROSSCOMPILER
930 LIBDIR          += $(patsubst %,-L%/rs_aix41/lib,$(TCLTK_DIR))
931 else
932 LIBDIR      += $(patsubst %,-L%,$(TCLTK_LIB_DIR))
933 endif
934
935 endif # USES_TCLTK
936
937 ifdef USES_PAPI
938 PAPI_INCDIR     = $(PAPI_ROOT)
939 PAPI_LIBDIR     = $(PAPI_ROOT)
940 #PAPI_LIB       = -Wl,-static -lpapi -Wl,-Bdynamic
941 #PAPI_LIB       = $(PAPI_LIBDIR)/libpapi.a
942 PAPI_LIB        = -Wl,-rpath=$(PAPI_LIBDIR) -L$(PAPI_LIBDIR) -lpapi  
943 IFLAGS          += -I$(PAPI_INCDIR)
944 LIBDIR          += $(patsubst %,-L%,$(PAPI_LIBDIR))
945 CFLAGS          += -DPAPI 
946 CXXFLAGS        += -DPAPI
947 TFLAGS          += -DPAPI 
948 endif
949
950 ifdef USES_FLEX
951 FLEX_LIB        = -lfl
952 ifdef FLEX_DIR
953 LIBDIR          += $(patsubst %,-L%,$(FLEX_DIR))
954 VPATH           += $(FLEX_DIR)
955 endif
956 endif
957
958 ifdef CROSSCOMPILER
959 # no /s or /p allowed here
960 #FLEX_DIR       = /s/flex/rs_aix41/lib
961 #LIBDIR         += -L/p/sp2/gcc/lib 
962 endif
963
964 ifdef LIBDWARF_HASSETFRAME
965         CAP_DEF += -Ddwarf_has_setframe
966 endif
967
968 ifdef USES_X11
969 X11_LIB         = -lX11
970
971 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
972 X11DIR          = /usr/openwin
973 CFLAGS          += -I$(X11DIR)/include
974 CXXFLAGS        += -I$(X11DIR)/include
975 TFLAGS          += -I$(X11DIR)/include
976 LIBDIR          += -R$(X11DIR)/lib -L$(X11DIR)/lib
977 endif
978
979 ifeq (linux,$(findstring linux,$(PLATFORM)))
980 X11DIR          = /usr/X11R6
981 CFLAGS          += -I$(X11DIR)/include/X11
982 CXXFLAGS        += -I$(X11DIR)/include/X11
983 TFLAGS          += -I$(X11DIR)/include/X11
984 LIBDIR          += -L$(X11DIR)/lib
985 endif
986
987 ifeq (x86_64,$(findstring x86_64,$(PLATFORM)))
988 LIBDIR          += -L$(X11DIR)/lib64
989 endif
990 ifeq (ibm-aix,$(findstring ibm-aix,$(PLATFORM)))
991 X11DIR          = /usr
992 endif
993
994 endif # USES_X11
995
996
997 #End with the default target, prereqs specified elsewhere
998 all:
999
1000 make.config.local:
1001         @echo Error. Could not find ${PLATFORM}/make.config.local or make.config.local.  Please run configure.
1002         @false
1003
1004