-
Notifications
You must be signed in to change notification settings - Fork 46
/
Makefile-cross
79 lines (50 loc) · 1.87 KB
/
Makefile-cross
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#
# Cross build makefile for eMPL Linux userland implementation
#
### cross-build defs ###
ifeq ($(strip $(OETMP)),)
OETMP = $(HOME)/overo-oe/tmp
endif
TOOLDIR = $(OETMP)/sysroots/`uname -m`-linux/usr/bin
STAGEDIR = ${OETMP}/sysroots/overo/usr
CC = ${TOOLDIR}/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
CFLAGS = -Wall
LIBDIR = $(STAGEDIR)/lib
INCDIR = $(STAGEDIR)/include
### end cross-build defs ###
# 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 local_defaults.h
$(CC) $(CFLAGS) -I $(EMPLDIR) -I $(GLUEDIR) -I $(MPUDIR) $(DEFS) -c imu.c
imucal.o : imucal.c local_defaults.h
$(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
install:
scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no imu imucal root@192.168.10.112:/home/root
clean:
rm -f *.o imu imucal