Initial commit
This commit is contained in:
commit
75ff3cd870
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.vscode/*
|
26
Makefile
Normal file
26
Makefile
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user