From ad061e038cd5926aff571cd6d3951ac27ea37031 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 2 Nov 2006 12:25:06 +0000 Subject: Unhardcode libkvm path --- Makefile | 5 ++++- Makefile.target | 16 ++++++++++------ configure | 2 -- kvm-configure | 1 + 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 3807f25c8..1ac3f6e56 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,14 @@ # Makefile for QEMU. +CFLAGS= +LDFLAGS= + include config-host.mak .PHONY: all clean distclean dvi info install install-doc tar tarbin \ speed test test2 html dvi info -CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I. +CFLAGS+=-Wall -O2 -g -fno-strict-aliasing -I. ifdef CONFIG_DARWIN CFLAGS+= -mdynamic-no-pic endif diff --git a/Makefile.target b/Makefile.target index cdbb4dfbe..3eccd227b 100644 --- a/Makefile.target +++ b/Makefile.target @@ -1,5 +1,9 @@ +CFLAGS= +LDFLAGS= + include config.mak +LDFLAGS_BASE:=$(LDFLAGS) TARGET_BASE_ARCH:=$(TARGET_ARCH) ifeq ($(TARGET_ARCH), x86_64) TARGET_BASE_ARCH:=i386 @@ -17,9 +21,9 @@ ifdef CONFIG_USER_ONLY VPATH+=:$(SRC_PATH)/linux-user DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH) endif -CFLAGS=-Wall -O2 -g -fno-strict-aliasing +CFLAGS+=-Wall -O2 -g -fno-strict-aliasing #CFLAGS+=-Werror -LDFLAGS=-g +LDFLAGS+=-g LIBS= HELPER_CFLAGS=$(CFLAGS) DYNGEN=../dyngen$(EXESUF) @@ -323,9 +327,9 @@ ifdef CONFIG_ADLIB SOUND_HW += fmopl.o adlib.o endif AUDIODRV+= wavcapture.o -ifdef CONFIG_KVM_INC -DEFINES += -I $(CONFIG_KVM_INC) -I $(CONFIG_KVM_KERNEL_INC) -LIBS += -L $(CONFIG_KVM_LIB) -lkvm +ifdef CONFIG_KVM_KERNEL_INC +DEFINES += -I $(CONFIG_KVM_KERNEL_INC) +LIBS += -lkvm endif # SCSI layer @@ -396,7 +400,7 @@ tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o VL_OBJS+=$(addprefix slirp/, $(SLIRP_OBJS)) endif -VL_LDFLAGS= +VL_LDFLAGS=$(LDFLAGS_BASE) # specific flags are needed for non soft mmu emulator ifdef CONFIG_STATIC VL_LDFLAGS+=-static diff --git a/configure b/configure index df0eeed25..431b08196 100755 --- a/configure +++ b/configure @@ -792,8 +792,6 @@ echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h configure_kvm() { if test $kvm = "yes" -a "$target_softmmu" = "yes" -a $cpu = "$target_cpu" ; then echo "#define USE_KVM 1" >> $config_h - echo "CONFIG_KVM_INC=$PWD/../user" >> $config_mak - echo "CONFIG_KVM_LIB=$PWD/../user" >> $config_mak echo "CONFIG_KVM_KERNEL_INC=$kernel_path/include" >> $config_mak fi } diff --git a/kvm-configure b/kvm-configure index 5d905ca0e..a877738f4 100755 --- a/kvm-configure +++ b/kvm-configure @@ -2,4 +2,5 @@ CC=$(ls /usr/bin/gcc3* | tail -n1) ./configure --target-list=$(uname -i)-softmmu --cc=$CC --disable-kqemu \ + --extra-cflags="-I $PWD/../user" --extra-ldflags="-L $PWD/../user" \ --enable-kvm --kernel-path=$PWD/../kernel -- cgit v1.2.3