commit 75ff3cd870231229b062572ac0607a671fb6716f Author: Thibaud Date: Wed May 23 01:21:30 2018 +0200 Initial commit 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