debuggers.hg

view config/x86_64.mk @ 16988:0faf620bc749

build: Make PREFIX work by fixing LIBDIR

In the current tree, setting PREFIX does not work very well. This is
because of confusion about the meaning of LIBDIR. In some places it
is the pathname tail of directories containing libraries (lib, lib64
or lib/amd64). But in other places it is a destination pathname
(implicitly, including any PREFIX). This can result in PREFIX or /usr
being added the wrong number of times.

This patch splits LIBDIR into two variables, LIBLEAFDIR and
LIBDIR. LIBDIR is the directory into which Xen libraries and other
similar code is to be placed, and includes any PREFIX. LIBLEAFDIR is
just the library tail and can be appended to various different
prefixes; for example, to construct the X11 library directory for -L.

Neither variable contains the value of DESTDIR, which is of course
used only to redirect the results of `make install' when desired.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jan 31 09:38:34 2008 +0000 (2008-01-31)
parents 6ed9b42d1ec4
children
line source
1 CONFIG_X86 := y
2 CONFIG_X86_64 := y
3 CONFIG_X86_$(XEN_OS) := y
5 CONFIG_COMPAT := y
6 CONFIG_HVM := y
7 CONFIG_MIGRATE := y
8 CONFIG_XCUTILS := y
9 CONFIG_IOEMU := y
11 CFLAGS += -m64
13 LIBLEAFDIR = $(LIBLEAFDIR_x86_64)
14 LIBDIR = $(LIBDIR_x86_64)
16 SunOS_LIBDIR = $(SunOS_LIBDIR_x86_64)
18 # Use only if calling $(LD) directly.
19 ifeq ($(XEN_OS),OpenBSD)
20 LDFLAGS_DIRECT += -melf_x86_64_obsd
21 else
22 LDFLAGS_DIRECT += -melf_x86_64
23 endif