From: Dirk Vogt Date: Tue, 1 May 2012 13:17:05 +0000 (+0200) Subject: Make TTY cross-compilable X-Git-Tag: v3.2.1~531 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/mult.png?a=commitdiff_plain;h=c2c39af6bb979dcc457db366e7a087b3b113eaf9;p=minix.git Make TTY cross-compilable --- diff --git a/drivers/tty/keymaps/Makefile.inc b/drivers/tty/keymaps/Makefile.inc index 0c7a093e4..d4cdbdefc 100644 --- a/drivers/tty/keymaps/Makefile.inc +++ b/drivers/tty/keymaps/Makefile.inc @@ -4,7 +4,7 @@ FILESDIR= /usr/lib/keymaps .src.map: ${_MKTARGET_CREATE} - $(CC) $(LDFLAGS) -DKEYSRC=\"$<\" -o $<_genmap ${.CURDIR}/genmap.c + $(HOST_CC) $(LDFLAGS) -DKEYSRC=\"$<\" -o $<_genmap ${.CURDIR}/genmap.c ./$<_genmap > $@ @rm -f $<_genmap diff --git a/drivers/tty/keymaps/genmap.c b/drivers/tty/keymaps/genmap.c index 5093cb7e2..29d3b49c0 100644 --- a/drivers/tty/keymaps/genmap.c +++ b/drivers/tty/keymaps/genmap.c @@ -1,13 +1,30 @@ /* genmap - output binary keymap Author: Marcus Hampel */ #include +#ifdef __minix #include +#else +#include "../../../include/minix/keymap.h" +#endif #include #include #include #include #include +/* + * if we crosscompile those might not be defined, + */ +#ifndef u16_t +#include +typedef uint16_t u16_t; +#endif + +#ifndef u8_t +#include +typedef uint8_t u8_t; +#endif + u16_t keymap[NR_SCAN_CODES * MAP_COLS] = { #include KEYSRC };