* [PATCH] consolidate i386 & x86-64 user dir make rules
@ 2007-10-22 23:42 Jerone Young
0 siblings, 0 replies; only message in thread
From: Jerone Young @ 2007-10-22 23:42 UTC (permalink / raw)
To: kvm-devel
This patch removes arch specific make rules for x86 & x86-64 out of the
main Makefile. These rules are now moved into config-$(ARCH) and a new
file config-x86-common has been created to consolidate common rules
amongst x86 & x86-64.
Signed-off-by: Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
diff -r 707451c0b5ab user/Makefile
--- a/user/Makefile Mon Oct 22 16:13:40 2007 -0500
+++ b/user/Makefile Mon Oct 22 18:36:05 2007 -0500
@@ -15,8 +15,7 @@ cc-option = $(shell if $(CC) $(1) -S -o
cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
-CFLAGS += -I $(KERNELDIR)/include $(autodepend-flags) -g -fomit-frame-pointer \
- -Wall
+CFLAGS += $(autodepend-flags) -g -fomit-frame-pointer -Wall
CFLAGS += $(call cc-option, -fno-stack-protector, "")
CFLAGS += $(call cc-option, -fno-stack-protector-all, "")
@@ -25,21 +24,6 @@ CXXFLAGS = $(autodepend-flags)
CXXFLAGS = $(autodepend-flags)
autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d
-
-all: kvmctl libkvm.a flatfiles
-
-kvmctl: LDFLAGS += -pthread -lrt
-
-kvmctl: kvmctl.o main.o
-
-balloon_ctl: balloon_ctl.o
-
-libkvm.a: kvmctl.o
- $(AR) rcs $@ $^
-
-flatfiles-common = test/bootstrap test/vmexit.flat test/smp.flat
-
-flatfiles: $(flatfiles-common) $(flatfiles)
install:
install -D kvmctl.h $(DESTDIR)/$(PREFIX)/include/kvmctl.h
diff -r 707451c0b5ab user/config-i386.mak
--- a/user/config-i386.mak Mon Oct 22 16:13:40 2007 -0500
+++ b/user/config-i386.mak Mon Oct 22 18:36:05 2007 -0500
@@ -3,5 +3,9 @@ bits = 32
bits = 32
ldarch = elf32-i386
CFLAGS += -m32
+CFLAGS += -D__i386__
+CFLAGS += -I $(KERNELDIR)/include
flatfiles=
+
+include config-x86-common.mak
diff -r 707451c0b5ab user/config-x86-common.mak
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/user/config-x86-common.mak Mon Oct 22 18:36:05 2007 -0500
@@ -0,0 +1,16 @@
+#This is a make file with common rules for both x86 & x86-64
+
+all: kvmctl libkvm.a flatfiles
+
+kvmctl: LDFLAGS += -pthread -lrt
+
+kvmctl: kvmctl.o main.o
+
+libkvm.a: kvmctl.o
+ $(AR) rcs $@ $^
+
+balloon_ctl: balloon_ctl.o
+
+flatfiles-common = test/bootstrap test/vmexit.flat test/smp.flat
+
+flatfiles: $(flatfiles-common) $(flatfiles)
diff -r 707451c0b5ab user/config-x86_64.mak
--- a/user/config-x86_64.mak Mon Oct 22 16:13:40 2007 -0500
+++ b/user/config-x86_64.mak Mon Oct 22 18:36:05 2007 -0500
@@ -3,5 +3,18 @@ bits = 64
bits = 64
ldarch = elf64-x86-64
CFLAGS += -m64
+CFLAGS += -D__x86_64__
+CFLAGS += -I $(KERNELDIR)/include
flatfiles = test/access.flat test/irq.flat test/sieve.flat test/simple.flat test/stringio.flat test/memtest1.flat
+
+all: kvmctl libkvm.a flatfiles
+
+kvmctl: LDFLAGS += -pthread -lrt
+
+kvmctl: kvmctl.o main.o
+
+libkvm.a: kvmctl.o
+ $(AR) rcs $@ $^
+
+include config-x86-common.mak
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-22 23:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-22 23:42 [PATCH] consolidate i386 & x86-64 user dir make rules Jerone Young
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.