-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (19 loc) · 774 Bytes
/
Makefile
File metadata and controls
28 lines (19 loc) · 774 Bytes
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
CWARNINGS := -Wall -Wextra -fno-strict-aliasing -Wno-error=unused-parameter
CFLAGS := -pipe -O2 -fPIC -I. $(CWARNINGS)
CXXFLAGS := $(CFLAGS) -IChaiScript-6.0.0/include
LDFLAGS := -lhidapi-libusb
HEADER_FILES := powerslaves.h
all: libpowerslaves.a
powerslaves.o: powerslaves.c
$(CC) -o $@ -c $^ $(CFLAGS) -std=c11
libpowerslaves.a: powerslaves.o
ar rcs libpowerslaves.a $^
examples/header: examples/header.o libpowerslaves.a
$(CC) -o $@ $^ $(LDFLAGS)
examples/savetool: examples/savetool.o libpowerslaves.a
$(CC) -o $@ $^ $(LDFLAGS)
examples/arbitrary: examples/arbitrary.o libpowerslaves.a
$(CC) -o $@ $^ $(LDFLAGS)
example: examples/header examples/arbitrary examples/savetool
clean:
rm -f *.o *.a powerslaves examples/header examples/arbitrary examples/*.o