Make TTY cross-compilable
This commit is contained in:
parent
25ae53b165
commit
c2c39af6bb
2 changed files with 18 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue