-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
49 lines (36 loc) · 1.58 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
CC = g++
CXXFLAGS += -O3 -std=c++11 -Wall -Wextra -Werror -Wno-reorder -fomit-frame-pointer -pipe -ftree-vectorize -mfpmath=sse -march=native -mtune=native -flto
LDLIBS += -lpthread -lboost_system -lboost_filesystem -lboost_timer -lncurses
LDFLAGS += -O1 -std=c++11 -Wall -flto --hash-style=gnu --as-needed
SOURCES = RoboticArm.cpp
OBJECTS = RoboticArm.o
OBJECTS += HighLatencyGPIO/GPIO.o \
HighLatencyPWM/PWM.o \
Linux-DC-Motor/Motor.o \
Linux-Quadrature-Encoder/QuadratureEncoder.o \
Linux-Visual-Encoder/VisualEncoder.o \
DEMOS = Examples/Robot_Diagnostics.o \
Examples/Robot_Keyboard.o \
Examples/Robot_Playback.o \
Examples/Robot_Recorder.o \
DEPS += HighLatencyGPIO \
HighLatencyPWM \
CXXFLAGS += -DRT_PRIORITY=0 -DRT_POLICY=SCHED_RR
CXXFLAGS += -DBASE_PWM_FREQUENCY_HZ=250 -DBASE_PWM_DUTYCYCLE=0
CXXFLAGS += -DNO_VISUAL_ENCODER
CXXFLAGS += -DDEBUG -DDEBUG_LEVEL=5
all:
$(MAKE) -j1 $(DEPS) > /dev/null
$(MAKE) build
build: $(DEPS) $(OBJECTS) $(DEMOS)
# To build all of our demos as separate binaries
$(CC) $(LDLIBS) $(OBJECTS) Examples/Robot_Diagnostics.o -o robot-arm-diagnostics.app
$(CC) $(LDLIBS) $(OBJECTS) Examples/Robot_Keyboard.o -o robot-arm-keyboard.app
$(CC) $(LDLIBS) $(OBJECTS) Examples/Robot_Playback.o -o robot-arm-playback.app
$(CC) $(LDLIBS) $(OBJECTS) Examples/Robot_Recorder.o -o robot-arm-recorder.app
$(DEPS):
git clone -q https://github.com/oxavelar/HighLatencyGPIO
git clone -q https://github.com/oxavelar/HighLatencyPWM
clean:
-rm -rf $(OBJECTS) $(DEMOS)
-rm -rf *.app