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