summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJoshua Liu <joshua.liu@sourceobby.com>2025-06-24 18:15:41 -0400
committerJoshua Liu <joshua.liu@sourceobby.com>2025-06-24 18:15:41 -0400
commitfcef1d3311cd61f8cb68d1c205e33cc7549865f0 (patch)
tree5f9773b34edf077076513876459c5d8a9f56041d /Makefile
parentba41680682bda8ef1014d84479aa5f1d09ea2c3d (diff)
bugfix: fixed Makefile not compiling
Diffstat (limited to 'Makefile')
-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)