summaryrefslogtreecommitdiff
path: root/Makefile
blob: 4f66dd22cec8e30c2b573d46fc33dcce62c0d806 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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}