Skip to content

Commit

Permalink
build: convert some obj-specific CFLAGS to use new foo.o-cflags syntax
Browse files Browse the repository at this point in the history
Current Makefile system allows using foo.o-cflags variables to store
object-specific CFLAGS.  Convert some usages of old syntax
(using QEMU_CFLAGS += construct) to the new syntax.

Do not touch multifile modules for now, as build system isn't ready for this.

Signed-off-by: Michael Tokarev <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
Michael Tokarev authored and bonzini committed May 8, 2014
1 parent 0db564e commit 849d828
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ endif

all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules

vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)

vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)

config-host.h: config-host.h-timestamp
config-host.h-timestamp: config-host.mak
qemu-options.def: $(SRC_PATH)/qemu-options.hx
Expand Down Expand Up @@ -195,8 +191,6 @@ ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))

recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)

bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)

$(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h | $(BUILD_DIR)/version.lo
$(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<," RC version.o")
$(BUILD_DIR)/version.lo: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h
Expand Down
2 changes: 2 additions & 0 deletions Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ common-obj-y += hw/

common-obj-y += ui/
common-obj-y += bt-host.o bt-vhci.o
bt-host.o-cflags := $(BLUEZ_CFLAGS)

common-obj-y += dma-helpers.o
common-obj-y += vl.o
vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
common-obj-y += tpm.o

common-obj-$(CONFIG_SLIRP) += slirp/
Expand Down
2 changes: 1 addition & 1 deletion audio/Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ 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)
sdlaudio.o-cflags := $(SDL_CFLAGS)
2 changes: 1 addition & 1 deletion backends/Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ common-obj-$(CONFIG_POSIX) += rng-random.o

common-obj-y += msmouse.o
common-obj-$(CONFIG_BRLAPI) += baum.o
$(obj)/baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
baum.o-cflags := $(SDL_CFLAGS)

common-obj-$(CONFIG_TPM) += tpm.o
2 changes: 1 addition & 1 deletion disas/Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ common-obj-$(CONFIG_ARM_DIS) += arm.o
common-obj-$(CONFIG_ARM_A64_DIS) += arm-a64.o
common-obj-$(CONFIG_ARM_A64_DIS) += libvixl/
libvixldir = $(SRC_PATH)/disas/libvixl
$(obj)/arm-a64.o: QEMU_CFLAGS += -I$(libvixldir)
arm-a64.o-cflags := -I$(libvixldir)
common-obj-$(CONFIG_CRIS_DIS) += cris.o
common-obj-$(CONFIG_HPPA_DIS) += hppa.o
common-obj-$(CONFIG_I386_DIS) += i386.o
Expand Down
2 changes: 1 addition & 1 deletion ui/Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ common-obj-$(CONFIG_GTK) += gtk.o x_keymap.o

$(obj)/sdl.o $(obj)/sdl_zoom.o $(obj)/sdl2.o: QEMU_CFLAGS += $(SDL_CFLAGS)

$(obj)/gtk.o: QEMU_CFLAGS += $(GTK_CFLAGS) $(VTE_CFLAGS)
gtk.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS)

0 comments on commit 849d828

Please sign in to comment.