mirror of
https://github.com/moparisthebest/uinput-mapper
synced 2024-11-22 08:12:14 -05:00
commit
ad35a7e1b3
22
Makefile
22
Makefile
@ -1,16 +1,26 @@
|
|||||||
.PHONY: default clean
|
.PHONY: default clean
|
||||||
|
|
||||||
CFLAGS+=-ansi -pedantic -Wall -Wextra -Werror -Wno-unused-result
|
PREFIX=/usr/local
|
||||||
CFLAGS+=-pipe -O2
|
CFLAGS+=-ansi -pedantic -pipe -D_BSD_SOURCE \
|
||||||
CFLAGS+=-D_BSD_SOURCE
|
-Wall -Wextra -Werror -Wno-unused-result
|
||||||
|
OPT=-O2
|
||||||
|
|
||||||
default: map
|
all: map
|
||||||
|
|
||||||
|
debug: OPT=-O0
|
||||||
|
debug: CFLAGS+=-ggdb
|
||||||
|
debug: map
|
||||||
|
|
||||||
def_keys.h:
|
def_keys.h:
|
||||||
echo '#include <linux/input.h>' | gcc -E -dM - | grep '#define KEY_' | cut -f2 -d" " | sed 's/KEY_.*/DEF_KEY(&)/' > def_keys.h
|
echo '#include <linux/input.h>' | gcc -E -dM - \
|
||||||
|
| grep '#define KEY_' | cut -f2 -d" " | sed 's/KEY_.*/DEF_KEY(&)/' \
|
||||||
|
> $@
|
||||||
|
|
||||||
map: map.c def_keys.h config.h config_functions.h
|
map: map.c def_keys.h config.h config_functions.h
|
||||||
$(CC) map.c $(CFLAGS) -o map
|
$(CC) $(CFLAGS) ${OPT} map.c -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f map def_keys.h
|
rm -f map def_keys.h
|
||||||
|
|
||||||
|
install:
|
||||||
|
install map ${PREFIX}/sbin/uinput-mapper
|
||||||
|
Loading…
Reference in New Issue
Block a user