summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4f66dd2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+CFLAGS=-Wall -Wextra -g $(shell pkg-config --cflags 'libusb-1.0') -I src -I src/feature
+LDFLAGS=$(shell pkg-config --libs 'libusb-1.0')
+CC=c99
+
+LSHIDPP_SRC=src/lshidpp.c \
+ src/device.c \
+ src/usb.c \
+ src/common.c \
+ src/feature/battery.c \
+ src/feature/reprogrammable.c
+LSHIDPP_OBJ=${LSHIDPP_SRC:.c=.o}
+
+UNBRICK_SRC=src/unbrick.c
+UNBRICK_OBJ=${UNBRICK_SRC:.c=.o}
+
+all: lshidpp unbrick
+lshidpp: ${LSHIDPP_OBJ}
+ ${CC} -o $@ ${LSHIDPP_OBJ} ${LDFLAGS}
+
+unbrick: ${UNBRICK_OBJ}
+ ${CC} -o $@ ${UNBRICK_OBJ} ${LDFLAGS}
+
+clean:
+ ${RM} ${LSHIDPP_OBJ} ${UNBRICK_OBJ}