summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile29
1 files changed, 14 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 352fb13..c78b810 100644
--- a/Makefile
+++ b/Makefile
@@ -1,23 +1,22 @@
-CCFLAGS=-O2 -Wall -c
-DEBUGFLAGS=-g -Werror
-CC=gcc
-LDLIBS=-lusb
-BACKEND="streamdeck.c"
-UTIL="functions.c util.c devdetails.c"
-OBJ="streamdeck.o functions.o util.o devdetails.o"
-.PHONY="all"
+CCFLAGS= -O2 -Wall -c
+DEBUGFLAGS= -g -Werror
+CC= gcc
+LDLIBS= -lhidapi-libusb -lusb-1.0
+BACKEND= streamdeck.c
+INC=-I/usr/include/libusb-1.0/
+UTIL= functions.c util.c devdetails.c
+OBJ= streamdeck.o functions.o util.o
+OUTPUT= streamdeck test
+.PHONY= "all"
all: driver
-driver: $(OBJ)
- $(CC) -o streamdeck $(OBJ)
-
-test: driver
- $(CC) -o test test.c $(OBJ)
+test: $(OBJ)
+ $(CC) -o test test.c $(OBJ) $(LDLIBS)
clean:
- rm $(OBJ)
+ rm $(OBJ) $(OUTPUT)
%.o: %.c
- $(CC) $(CCFLAGS) $<
+ $(CC) $(CCFLAGS) $< $(INC)