forked from audiohacked/OpenCorsairLink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (37 loc) · 947 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
CC ?= gcc
CFLAGS ?= -std=c99 -pedantic-errors
LDFLAGS ?= -lm
# pkg-config for libusb-1.0
CFLAGS += $(shell pkg-config --cflags libusb-1.0)
LDFLAGS += $(shell pkg-config --libs libusb-1.0)
OBJS = main.o \
device.o \
driver.o \
options.o \
print.o \
scan.o
OBJS_LL = lowlevel/asetek4.o \
lowlevel/hid.o \
lowlevel/rmi.o
OBJS_PROTO = protocol/asetek4/core.o \
protocol/asetek4/fan.o \
protocol/asetek4/led.o \
protocol/asetek4/pump.o \
protocol/asetek4/temperature.o \
protocol/rmi/core.o \
protocol/rmi/power.o \
protocol/rmi/temperature.o \
protocol/rmi/time.o \
protocol/hid/core.o \
protocol/hid/fan.o \
protocol/hid/led.o \
protocol/hid/pump.o \
protocol/hid/temperature.o
default: all
all: OpenCorsairLink.elf
OpenCorsairLink.elf: $(OBJS) $(OBJS_PROTO) $(OBJS_LL) $(OBJS)
$(CC) $^ $(CFLAGS) $(LDFLAGS) -o $@
%.o: %.c
$(CC) $(CFLAGS) -g -c -o $@ $<
clean:
$(RM) OpenCorsairLink.elf $(OBJS) $(OBJS_LL) $(OBJS_PROTO)