summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authoraliguori2009-03-06 21:27:10 +0100
committeraliguori2009-03-06 21:27:10 +0100
commit0483755a4d1fd61fe9c284166f67ae08af8d858b (patch)
tree2c1e9ac8af63b982a7e0501408fbb37d0780ab93 /Makefile
parentEnhance 'info vnc' monitor output ("Daniel P. Berrange") (diff)
downloadqemu-0483755a4d1fd61fe9c284166f67ae08af8d858b.tar.gz
qemu-0483755a4d1fd61fe9c284166f67ae08af8d858b.tar.xz
qemu-0483755a4d1fd61fe9c284166f67ae08af8d858b.zip
Refactor keymap code to avoid duplication ("Daniel P. Berrange")
Each of the graphical frontends #include a .c file, for keymap code resulting in duplicated definitions & duplicated compiled code. A couple of small changes allowed this to be sanitized, so instead of doing a #include "keymaps.c", duplicating all code, we can have a shared keymaps.h file, and only compile code once. This allows the next patch to move the VncState struct out into a header file without causing clashing definitions. Makefile | 9 +++++--- b/keymaps.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ curses.c | 3 -- curses_keys.h | 9 +++----- keymaps.c | 45 ++++++++++++++++--------------------------- sdl.c | 3 -- sdl_keysym.h | 7 ++---- vnc.c | 5 +--- vnc_keysym.h | 7 ++---- 9 files changed, 97 insertions(+), 51 deletions(-) Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6721 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4f7a55ae01..092c108683 100644
--- a/Makefile
+++ b/Makefile
@@ -137,6 +137,7 @@ endif
AUDIO_OBJS+= wavcapture.o
OBJS+=$(addprefix audio/, $(AUDIO_OBJS))
+OBJS+=keymaps.o
ifdef CONFIG_SDL
OBJS+=sdl.o x_keymap.o
endif
@@ -161,15 +162,17 @@ LIBS+=$(VDE_LIBS)
cocoa.o: cocoa.m
-sdl.o: sdl.c keymaps.c sdl_keysym.h
+keymaps.o: keymaps.c keymaps.h
+
+sdl.o: sdl.c keymaps.h sdl_keysym.h
sdl.o audio/sdlaudio.o: CFLAGS += $(SDL_CFLAGS)
-vnc.o: vnc.c keymaps.c sdl_keysym.h vnchextile.h d3des.c d3des.h
+vnc.o: vnc.c keymaps.h sdl_keysym.h vnchextile.h d3des.c d3des.h
vnc.o: CFLAGS += $(CONFIG_VNC_TLS_CFLAGS)
-curses.o: curses.c keymaps.c curses_keys.h
+curses.o: curses.c keymaps.h curses_keys.h
bt-host.o: CFLAGS += $(CONFIG_BLUEZ_CFLAGS)