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

login
register
mail settings
Submitter Paolo Bonzini
Date Dec. 17, 2012, 6:17 p.m.
Message ID <1355768254-12933-6-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/206976/
State New
Headers show

Comments

Paolo Bonzini - Dec. 17, 2012, 6:17 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 9ebd3cd..5810718 100644
--- a/Makefile
+++ b/Makefile
@@ -141,16 +141,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 7f01510..c067f38 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -18,3 +18,5 @@  endif
 common-obj-y += stream.o
 common-obj-y += commit.o
 common-obj-y += mirror.o
+
+$(obj)/curl.o: QEMU_CFLAGS+=$(CURL_CFLAGS)
diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index bcf278d..2778035 100644
--- a/hw/Makefile.objs
+++ b/hw/Makefile.objs
@@ -204,3 +204,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