Patchwork [05/32] build: move rules from Makefile to */Makefile.objs

login
register
mail settings
Submitter Paolo Bonzini
Date Oct. 24, 2012, 12:58 p.m.
Message ID <1351083542-15272-6-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/193823/
State New
Headers show

Comments

Paolo Bonzini - Oct. 24, 2012, 12:58 p.m.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile            |   10 ----------
 audio/Makefile.objs |    3 +++
 block/Makefile.objs |    2 ++
 hw/Makefile.objs    |    2 ++
 ui/Makefile.objs    |    5 +++++
 5 files changed, 12 insertions(+), 10 deletions(-)

Patch

diff --git a/Makefile b/Makefile
index 00126b9..3cfe5af 100644
--- a/Makefile
+++ b/Makefile
@@ -119,16 +119,6 @@  ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
 
 recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
 
-audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
-
-QEMU_CFLAGS+=$(CURL_CFLAGS)
-
-ui/cocoa.o: ui/cocoa.m
-
-ui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o hw/baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
-
-ui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
-
 bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
 
 version.o: $(SRC_PATH)/version.rc config-host.h
diff --git a/audio/Makefile.objs b/audio/Makefile.objs
index 0f2932d..d71a877 100644
--- a/audio/Makefile.objs
+++ b/audio/Makefile.objs
@@ -12,3 +12,6 @@  common-obj-$(CONFIG_WINWAVE) += winwaveaudio.o
 common-obj-$(CONFIG_AUDIO_PT_INT) += audio_pt_int.o
 common-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o
 common-obj-y += wavcapture.o
+
+$(obj)/audio.o $(obj)/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
+$(obj)/sdlaudio.o: QEMU_CFLAGS += $(SDL_CFLAGS)
diff --git a/block/Makefile.objs b/block/Makefile.objs
index 554f429..1b508c8 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -12,3 +12,5 @@  block-obj-$(CONFIG_GLUSTERFS) += gluster.o
 
 common-obj-y += stream.o
 common-obj-y += commit.o
+
+$(obj)/curl.o: QEMU_CFLAGS+=$(CURL_CFLAGS)
diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index af4ab0c..994a60b 100644
--- a/hw/Makefile.objs
+++ b/hw/Makefile.objs
@@ -206,3 +206,5 @@  ifeq ($(CONFIG_PCI), y)
 obj-$(CONFIG_KVM) += ivshmem.o
 obj-$(CONFIG_LINUX) += vfio_pci.o
 endif
+
+$(obj)/baum.o: QEMU_CFLAGS += $(SDL_CFLAGS) 
diff --git a/ui/Makefile.objs b/ui/Makefile.objs
index adc07be..fd339d2 100644
--- a/ui/Makefile.objs
+++ b/ui/Makefile.objs
@@ -12,3 +12,8 @@  common-obj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o
 common-obj-$(CONFIG_COCOA) += cocoa.o
 common-obj-$(CONFIG_CURSES) += curses.o
 common-obj-$(CONFIG_VNC) += $(vnc-obj-y)
+
+$(obj)/sdl.o $(obj)/sdl_zoom.o: QEMU_CFLAGS += $(SDL_CFLAGS) 
+$(obj)/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
+
+$(obj)/cocoa.o: $(SRC_PATH)/$(obj)/cocoa.m