forked from mlaurijsse/linux-mpu9150
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile-native
60 lines (39 loc) · 1.41 KB
/
Makefile-native
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
55
56
57
58
59
#
# Makefile for eMPL Linux userland implementation
#
CC = gcc
CFLAGS = -Wall -fsingle-precision-constant
# add -DI2C_DEBUG for debugging
DEFS = -DEMPL_TARGET_LINUX -DMPU9150 -DAK8975_SECONDARY
EMPLDIR = eMPL
GLUEDIR = glue
MPUDIR = mpu9150
OBJS = inv_mpu.o \
inv_mpu_dmp_motion_driver.o \
linux_glue.o \
mpu9150.o \
quaternion.o \
vector3d.o
all : imu imucal
imu : $(OBJS) imu.o
$(CC) $(CFLAGS) $(OBJS) imu.o -lm -o imu
imucal : $(OBJS) imucal.o
$(CC) $(CFLAGS) $(OBJS) imucal.o -lm -o imucal
imu.o : imu.c
$(CC) $(CFLAGS) -I $(EMPLDIR) -I $(GLUEDIR) -I $(MPUDIR) $(DEFS) -c imu.c
imucal.o : imucal.c
$(CC) $(CFLAGS) -I $(EMPLDIR) -I $(GLUEDIR) -I $(MPUDIR) $(DEFS) -c imucal.c
mpu9150.o : $(MPUDIR)/mpu9150.c
$(CC) $(CFLAGS) $(DEFS) -I $(EMPLDIR) -I $(GLUEDIR) -c $(MPUDIR)/mpu9150.c
quaternion.o : $(MPUDIR)/quaternion.c
$(CC) $(CFLAGS) $(DEFS) -c $(MPUDIR)/quaternion.c
vector3d.o : $(MPUDIR)/vector3d.c
$(CC) $(CFLAGS) $(DEFS) -c $(MPUDIR)/vector3d.c
linux_glue.o : $(GLUEDIR)/linux_glue.c
$(CC) $(CFLAGS) $(DEFS) -I $(EMPLDIR) -I $(GLUEDIR) -c $(GLUEDIR)/linux_glue.c
inv_mpu_dmp_motion_driver.o : $(EMPLDIR)/inv_mpu_dmp_motion_driver.c
$(CC) $(CFLAGS) $(DEFS) -I $(EMPLDIR) -I $(GLUEDIR) -c $(EMPLDIR)/inv_mpu_dmp_motion_driver.c
inv_mpu.o : $(EMPLDIR)/inv_mpu.c
$(CC) $(CFLAGS) $(DEFS) -I $(EMPLDIR) -I $(GLUEDIR) -c $(EMPLDIR)/inv_mpu.c
clean:
rm -f *.o imu imucal