Skip to content

Commit

Permalink
ui: add x_keymap.o to modules
Browse files Browse the repository at this point in the history
x_keymap.o is common to the SDL and GTK+ modules, and it causes the
QEMU binary to link to the X11 libraries.  Add it separately to the
modules to keep the main QEMU binary smaller.

Signed-off-by: Paolo Bonzini <[email protected]>
Message-id: [email protected]

[ kraxel: fix lm32 target build (milkymist-tmu2) ]

Signed-off-by: Gerd Hoffmann <[email protected]>
  • Loading branch information
bonzini authored and kraxel committed May 18, 2018
1 parent 08d9864 commit 68898bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions hw/display/Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ common-obj-$(CONFIG_MILKYMIST) += milkymist-vgafb.o
common-obj-$(CONFIG_ZAURUS) += tc6393xb.o

common-obj-$(CONFIG_MILKYMIST_TMU2) += milkymist-tmu2.o
milkymist-tmu2.o-cflags := $(X11_CFLAGS)
milkymist-tmu2.o-libs := $(X11_LIBS)

obj-$(CONFIG_OMAP) += omap_dss.o
obj-$(CONFIG_OMAP) += omap_lcdc.o
Expand Down
11 changes: 7 additions & 4 deletions ui/Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ common-obj-$(CONFIG_COCOA) += cocoa.o
common-obj-$(CONFIG_VNC) += $(vnc-obj-y)
common-obj-$(call lnot,$(CONFIG_VNC)) += vnc-stubs.o

common-obj-$(CONFIG_X11) += x_keymap.o
x_keymap.o-cflags := $(X11_CFLAGS)
x_keymap.o-libs := $(X11_LIBS)

# ui-sdl module
common-obj-$(CONFIG_SDL) += sdl.mo
ifeq ($(CONFIG_SDLABI),1.2)
Expand Down Expand Up @@ -46,6 +42,13 @@ gtk.mo-objs += gtk-gl-area.o
endif
endif

ifeq ($(CONFIG_X11),y)
sdl.mo-objs += x_keymap.o
gtk.mo-objs += x_keymap.o
x_keymap.o-cflags := $(X11_CFLAGS)
x_keymap.o-libs := $(X11_LIBS)
endif

common-obj-$(CONFIG_CURSES) += curses.mo
curses.mo-objs := curses.o
curses.mo-cflags := $(CURSES_CFLAGS)
Expand Down

0 comments on commit 68898bc

Please sign in to comment.