-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 711 Bytes
/
Copy pathMakefile
File metadata and controls
28 lines (22 loc) · 711 Bytes
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
CC = gcc
CFLAGS = -std=c11 -Wall -Wextra -O2
LDFLAGS = -lm -lpthread
TARGET = sony-tracker
SRC = main.c
PREFIX = /usr/local
.PHONY: all install uninstall clean
all: $(TARGET)
$(TARGET): $(SRC) hidraw.h quat.h
$(CC) $(CFLAGS) $(SRC) -o $(TARGET) $(LDFLAGS)
install: $(TARGET)
install -Dm755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
install -Dm644 71-sony-head-tracker.rules $(DESTDIR)/etc/udev/rules.d/71-sony-head-tracker.rules
@echo ""
@echo "Installed"
@echo ""
@echo "Run command: sudo udevadm control --reload-rules && sudo udevadm trigger"
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/$(TARGET)
rm -f $(DESTDIR)/etc/udev/rules.d/71-sony-head-tracker.rules
clean:
rm -f $(TARGET)