]> Zhao Yanbai Git Server - minix.git/commitdiff
Make TTY cross-compilable
authorDirk Vogt <dirk@minix3.org>
Tue, 1 May 2012 13:17:05 +0000 (15:17 +0200)
committerThomas Veerman <thomas@minix3.org>
Mon, 18 Jun 2012 10:53:23 +0000 (10:53 +0000)
drivers/tty/keymaps/Makefile.inc
drivers/tty/keymaps/genmap.c

index 0c7a093e4cac2c1c8ee744a8ff37a5507fcadb99..d4cdbdefc0a296f738ad9c165c253a4f76ebf650 100644 (file)
@@ -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
 
index 5093cb7e2419c2bc85f5c754e152bb19a2786c55..29d3b49c0258816a8f055836d9f30a1ec12cca95 100644 (file)
@@ -1,13 +1,30 @@
 /*     genmap - output binary keymap                   Author: Marcus Hampel
  */
 #include <sys/types.h>
+#ifdef __minix
 #include <minix/keymap.h>
+#else
+#include "../../../include/minix/keymap.h"
+#endif
 #include <fcntl.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 
+/*
+ * if we crosscompile those might not be defined,
+ */
+#ifndef u16_t
+#include <stdint.h>
+typedef uint16_t u16_t;
+#endif
+
+#ifndef u8_t
+#include <stdint.h>
+typedef uint8_t u8_t;
+#endif
+
 u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
 #include KEYSRC
 };