~xdavidwu/motion-control

ref: 04a57ec059a95841c06fe63d4360871d162ed684 motion-control/Makefile -rw-r--r-- 777 bytes
04a57ec0xdavidwu sensors: joycon: use directions of joycon-r 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
SENSORS ?= gy801
SENSORS_LIBS =
HEADERS_PREFIX ?= /usr/include
BINARIES = evdev-dump-events uinput-pointer sensors-dump pointerd pointerc motion-control buttonc

ifeq ($(SENSORS), joycon)
	SENSORS_LIBS = -levdev
endif

event-codes:
	hare build -o $@ aux/$@/
evdev/codes.ha: event-codes
	./event-codes <$(HEADERS_PREFIX)/linux/input-event-codes.h >$@

evdev-dump-events uinput-pointer: evdev/codes.ha
	hare build -levdev -o $@ tools/$@/
sensors-dump pointerc:
	hare build $(SENSORS_LIBS) -T +$(SENSORS) -o $@ tools/$@/
buttonc:
	hare build -o $@ tools/$@/
pointerd: evdev/codes.ha
	hare build -levdev -o $@ cmd/$@/
motion-control:
	hare build $(SENSORS_LIBS) -T +$(SENSORS) -o $@ cmd/$@/
.PHONY: $(BINARIES)
all: $(BINARIES)
clean:
	rm -f event-codes evdev/codes.ha $(BINARIES)