All of lore.kernel.org
 help / color / mirror / Atom feed
From: jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH 1 of 2] consolidate x86 user makefiles
Date: Tue, 23 Oct 2007 22:26:39 -0500	[thread overview]
Message-ID: <556d8fcfcbd72586111f.1193196399@thinkpad> (raw)
In-Reply-To: <patchbomb.1193196398@thinkpad>

# HG changeset patch
# User Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
# Date 1193196215 18000
# Node ID 556d8fcfcbd72586111f58a1914210e85a9a9d8a
# Parent  707451c0b5ab24ac40bf29885c1b660201eae203
consolidate x86 user makefiles

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.

This version takes comments from the list into consideration.

Signed-off-by: Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

diff --git a/user/Makefile b/user/Makefile
--- a/user/Makefile
+++ b/user/Makefile
@@ -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 --git a/user/config-i386.mak b/user/config-i386.mak
--- a/user/config-i386.mak
+++ b/user/config-i386.mak
@@ -3,5 +3,9 @@ bits = 32
 bits = 32
 ldarch = elf32-i386
 CFLAGS += -m32
+CFLAGS += -D__i386__
+CFLAGS += -I $(KERNELDIR)/include
 
-flatfiles=
+flatfile_tests=
+
+include config-x86-common.mak
diff --git a/user/config-x86-common.mak b/user/config-x86-common.mak
new file mode 100644
--- /dev/null
+++ b/user/config-x86-common.mak
@@ -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_tests-common = test/bootstrap test/vmexit.flat test/smp.flat
+
+flatfiles: $(flatfiles_tests-common) $(flatfile_tests))
diff --git a/user/config-x86_64.mak b/user/config-x86_64.mak
--- a/user/config-x86_64.mak
+++ b/user/config-x86_64.mak
@@ -3,5 +3,9 @@ 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
+flatfile_tests = test/access.flat test/irq.flat test/sieve.flat test/simple.flat test/stringio.flat test/memtest1.flat
+
+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/

  reply	other threads:[~2007-10-24  3:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24  3:26 [PATCH 0 of 2] [v2] Another attempt to Consolidate x86 makefiles & tests jyoung5-r/Jw6+rmf7HQT0dZR+AlfA
2007-10-24  3:26 ` jyoung5-r/Jw6+rmf7HQT0dZR+AlfA [this message]
2007-10-24 14:32   ` [kvm-ppc-devel] [PATCH 1 of 2] consolidate x86 user makefiles Hollis Blanchard
2007-10-24  3:26 ` [PATCH 2 of 2] Move all x86 specific tests to there own directory jyoung5-r/Jw6+rmf7HQT0dZR+AlfA
2007-10-24 14:32   ` [kvm-ppc-devel] " Hollis Blanchard
2007-10-25 18:12 ` [PATCH 0 of 2] [v2] Another attempt to Consolidate x86 makefiles & tests Avi Kivity
     [not found]   ` <4720DC70.6090607-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-25 18:37     ` userspace repositories Hollis Blanchard
2007-10-25 18:40       ` Avi Kivity
     [not found]         ` <4720E312.3060400-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-25 19:01           ` Hollis Blanchard
2007-10-25 19:03             ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=556d8fcfcbd72586111f.1193196399@thinkpad \
    --to=jyoung5-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.