forked from rpicopter/MotionSensorExample
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (24 loc) · 675 Bytes
/
Makefile
File metadata and controls
34 lines (24 loc) · 675 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
29
30
31
32
33
34
CXX=g++
CXXFLAGS= -Wall -g -O2
CXX_OPTS= -Wall -g -O2
INSTALL=install
PROG=mstest
%.o: %.c
$(CXX) $(CXXFLAGS) $(CXX_OPTS) $< -o $@
all: $(PROG).o
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o $(PROG) \
main.c \
MotionSensor/libMotionSensor.a \
libs/libI2Cdev.a
$(PROG).o: MotionSensor/libMotionSensor.a libs/libI2Cdev.a
MotionSensor/libMotionSensor.a:
$(MAKE) -C MotionSensor/
libs/libI2Cdev.a:
$(MAKE) -C libs/I2Cdev
install1:
$(INSTALL) -m 755 $(PROG) $(DESTDIR)/usr/local/bin/
clean:
cd MotionSensor && $(MAKE) clean
cd libs/I2Cdev && $(MAKE) clean
rm -rf *.o *~ *.mod
rm -rf $(PROG)