From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Enhance libkvm Makefile Date: Fri, 03 Nov 2006 08:08:41 +0200 Message-ID: <454ADCE9.7000505@qumranet.com> References: <454A9578.1080100@cs.utexas.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: To: Anthony Liguori In-Reply-To: <454A9578.1080100-NZpS4cJIG2HvQtjrzfazuQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Anthony Liguori wrote: > The attached patch allows for DESTDIR/PREFIX to be used with the > libkvm Makefile as one may expect the should be used. Also, it lets > KERNELDIR be specified. > Thanks, this is useful. > Regards, > > Anthony Liguori > > Signed-off-by: Anthony Liguori > ------------------------------------------------------------------------ > > diff -r ca0347086805 Makefile > --- a/Makefile Thu Nov 02 18:59:50 2006 -0600 > +++ b/Makefile Thu Nov 02 19:00:05 2006 -0600 > @@ -1,12 +1,11 @@ > > -KERNELDIR = ../kernel > +KERNELDIR ?= ../kernel > +PREFIX ?= /usr/local > I dislike '?=' since it makes a simple 'make' depend on environment variables, so a build can have different results depending on which xterm you happen to be in. A regular assignment can be overridden on the make command line, but that's somewhat tedious. I think a simple ./configure (NOT the autotools thing) is best. > > CFLAGS = -I $(KERNELDIR)/include $(autodepend-flags) -g > CXXFLAGS = $(autodepend-flags) > > autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d > - > -DESTDIR = /usr/local > > Ditto. DESTDIR should be initialized. > ifeq ($(shell uname -m), x86_64) > LIBDIR = /lib64 > @@ -25,10 +24,10 @@ flatfiles: test/simple.flat test/stringi > test/irq.flat test/sieve.flat test/bootstrap > > install: > - install -D kvmctl.h $(DESTDIR)/include/kvmctl.h > + install -D kvmctl.h $(DESTDIR)$(PREFIX)/include/kvmctl.h > install -D $(KERNELDIR)/include/linux/kvm.h \ > - $(DESTDIR)/include/linux/kvm.h > - install -D libkvm.a $(DESTDIR)/$(LIBDIR)/libkvm.a > + $(DESTDIR)$(PREFIX)/include/linux/kvm.h > + install -D libkvm.a $(DESTDIR)$(PREFIX)/$(LIBDIR)/libkvm.a > > %.flat: %.o > gcc -nostdlib -o $@ -Wl,-T,flat.lds $^ > -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642