From 75ff3cd870231229b062572ac0607a671fb6716f Mon Sep 17 00:00:00 2001 From: Thibaud Date: Wed, 23 May 2018 01:21:30 +0200 Subject: [PATCH] Initial commit --- .gitignore | 1 + Makefile | 26 ++++++++++++++++++++++++++ Readme.md | 2 ++ 3 files changed, 29 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 Readme.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a3062be --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..780cbc4 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +TARGET = spnav +LIBS = -Llib -lhidapi-libusb +CC = gcc +CFLAGS = -Wall -Wextra -pedantic + +.PHONY: mrproper all default + +default: $(TARGET) +all: default + +OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c)) +HEADERS = $(wildcard *.h) + +%.o: %.c $(HEADERS) + $(CC) $(CFLAGS) -c $< -o $@ + +.PRECIOUS: $(TARGET) $(OBJECTS) + +$(TARGET): $(OBJECTS) + $(CC) $(OBJECTS) -Wall $(LIBS) -o $@ + +clean: + -rm -f *.o + +mrproper: clean + -rm -f $(TARGET) \ No newline at end of file diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..c0c11e6 --- /dev/null +++ b/Readme.md @@ -0,0 +1,2 @@ +# Spacenav HDI driver +Simple driver for the spacenavigator 3d mice using HDI api