-
Notifications
You must be signed in to change notification settings - Fork 45
/
Makefile
55 lines (37 loc) · 1.07 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
43
44
45
46
47
48
49
50
51
52
53
54
CC = g++
CFLAGS = -Wall -g -O0
LIBS = -lopencv_core \
-lopencv_imgproc \
-lopencv_highgui \
-lopencv_ml \
-lopencv_video \
-lopencv_features2d \
-lopencv_calib3d \
-lopencv_objdetect \
-lopencv_flann
SOURCES = balanceball.cpp \
./camera/camera.cpp \
./pid/pid.cpp \
./platform/platform.cpp
OBJECTS = $(SOURCES:.c=.o)
EXECUTABLE = balanceball
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
@echo "====================================================="
@echo "Building BalanceBall"
@echo ""
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
@echo ""
@echo "Success"
@echo "====================================================="
%.o: %.c
$(CC) -c -MD $(CFLAGS) -o $@ $<
-include $(wildcard *.d)
valgrind:
valgrind ./$(EXECUTABLE)
make_clean: all clean
clean:
rm -f *.o *.d
clean_all:
rm -f *.o *.d $(EXECUTABLE)
.PHONY: all clean