forked from elinalijouvni/OpenLeap
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
42 lines (26 loc) · 1.11 KB
/
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
LIBUSB_CFLAGS = $(shell pkg-config --cflags libusb-1.0)
LIBUSB_LDFLAGS = $(shell pkg-config --libs libusb-1.0)
SDL_CFLAGS = $(shell pkg-config --cflags sdl)
SDL_LDFLAGS = $(shell pkg-config --libs sdl)
OPENCV_CFLAGS = $(shell pkg-config --cflags opencv)
OPENCV_LDFLAGS = $(shell pkg-config --libs opencv)
CFLAGS = -O2 -Wall -DNDEBUG
LDFLAGS =
CC = gcc
all: low-level-leap display-leap-data-sdl display-leap-data-opencv
clean:
rm -f low-level-leap low-level-leap.o
leap_libusb_init.c.inc:
@echo "Use make_leap_usbinit.sh to generate leap_libusb_init.c.inc."
low-level-leap.o: low-level-leap.c leap_libusb_init.c.inc
$(CC) -c $(CFLAGS) $(LIBUSB_CFLAGS) -o $@ $<
low-level-leap: low-level-leap.o
$(CC) -o $@ $< $(LDFLAGS) $(LIBUSB_LDFLAGS)
display-leap-data-sdl.o: display-leap-data-sdl.c
$(CC) -c $(CFLAGS) $(SDL_CFLAGS) -o $@ $<
display-leap-data-sdl: display-leap-data-sdl.o
$(CC) -o $@ $< $(LDFLAGS) $(SDL_LDFLAGS)
display-leap-data-opencv.o: display-leap-data-opencv.c
$(CC) -c $(CFLAGS) $(OPENCV_CFLAGS) -o $@ $<
display-leap-data-opencv: display-leap-data-opencv.o
$(CC) -o $@ $< $(LDFLAGS) $(OPENCV_LDFLAGS)