Add keymap generation to build.

This commit is contained in:
Michael Jumper 2014-01-02 22:24:02 -08:00
parent b840935530
commit 8e3c512256
3 changed files with 18 additions and 3 deletions

View File

@ -34,3 +34,6 @@ libtool
ltmain.sh ltmain.sh
missing missing
# Autogenerated sources
rdp_keymaps.c

View File

@ -31,6 +31,7 @@ libguac_client_rdp_la_SOURCES = \
client.c \ client.c \
default_pointer.c \ default_pointer.c \
guac_handlers.c \ guac_handlers.c \
rdp_keymaps.c \
rdp_bitmap.c \ rdp_bitmap.c \
rdp_cliprdr.c \ rdp_cliprdr.c \
rdp_fs.c \ rdp_fs.c \
@ -104,6 +105,17 @@ libguac_client_rdp_la_LIBADD = @LIBGUAC_LTLIB@
guacsnd_libadd = @LIBGUAC_LTLIB@ guacsnd_libadd = @LIBGUAC_LTLIB@
guacdr_libadd = @LIBGUAC_LTLIB@ guacdr_libadd = @LIBGUAC_LTLIB@
# Autogenerate keymaps
CLEANFILES = rdp_keymaps.c
BUILT_SOURCES = rdp_keymaps.c
rdp_keymaps = \
keymaps/base.keymap \
keymaps/en_us_qwerty.keymap
rdp_keymaps.c: $(rdp_keymaps)
keymaps/generate.pl $(rdp_keymaps)
if LEGACY_FREERDP_EXTENSIONS if LEGACY_FREERDP_EXTENSIONS
# FreeRDP 1.0-style extensions # FreeRDP 1.0-style extensions

View File

@ -233,7 +233,7 @@ for $filename (@ARGV) {
# Parent layout (if any) # Parent layout (if any)
if ($parent) { if ($parent) {
print OUTPUT " .parent = $parent,\n"; print OUTPUT " .parent = &$parent,\n";
} }
# FreeRDP layout (if any) # FreeRDP layout (if any)
@ -252,10 +252,10 @@ for $filename (@ARGV) {
} }
print OUTPUT "\n" print OUTPUT "\n"
. 'const guac_rdp_keymap guac_rdp_keymaps[] = {' . "\n"; . 'const guac_rdp_keymap* guac_rdp_keymaps[] = {' . "\n";
foreach $keymap (@keymaps) { foreach $keymap (@keymaps) {
print OUTPUT " $keymap,\n"; print OUTPUT " &$keymap,\n";
} }
print OUTPUT print OUTPUT
' NULL' . "\n" ' NULL' . "\n"