-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
73 lines (52 loc) · 1.96 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
CC=g++
ACC=arm-linux-gnueabihf-g++-4.8
CFLAGS=-std=c++11 -Wall -O2 -g
ECC=e-gcc
EFLAGS= -Wall -O -g
EPIPHANY:=$(shell echo $(EPIPHANY_HOME))
ELINK=$(EPIPHANY)/bsps/current/internal.ldf -Ilibs/pal/include
OBJS=obj/*.o
LIBS=-lusb -lfreenect -lseasocks -le-hal -le-loader -lboost_system -lpthread#-lpcl_io -lpcl_common -lboost_system
ELIB=-le-lib -lm#-lpal
LDIR=-Llibs/libfreenect/build/lib -Llibs/seasocks/bin -L$(EPIPHANY)/tools/host/lib -Llibs/pcl/build/lib
DIR_D=src/Data\ Management/
SRC_D=DataControl.cpp DataStorage.cpp #DataProcessing.cpp
DIR_E=src/Epiphany/
SRC_E=e_calc.c
DIR_U=src/Util/
SRC_U=main.cpp
DIR_S=src/Special\ Structs/
SRC_S=SpinArray.cpp
IDIR=-I$(DIR_D) -Ilibs/libfreenect/include/ -I$(DIR_S) -I$(DIR_U) -I$(EPIPHANY)/tools/host/include -Ilibs/pcl/common/include/ -Ilibs/pcl/io/include/ -I/usr/include/eigen3/ -Ilibs/pcl/build/include
NAME=drone_camera
default: remote
all: structs datamanagment main epiphany
@mv *.o obj/
$(CC) $(CFLAGS) $(OBJS) -o $(NAME) $(LDIR) $(LIBS)
main_only: main
$(CC) $(CFLAGS) $(OBJS) -o $(NAME) $(LDIR) $(LIBS)
remote: datamanagment_r main_r # epiphany structs_r
chmod +x cross-compile.sh
./cross-compile.sh
rm *.o
remote_link:
$(CC) $(CFLAGS) $(OBJS) -o $(NAME) $(LDIR) $(LIBS)
datamanagment:
$(CC) $(CFLAGS) $(IDIR) $(addprefix $(DIR_D),$(SRC_D)) -c $(LDIR)
structs:
$(CC) $(CFLAGS) $(IDIR) $(addprefix $(DIR_S),$(SRC_S)) -c $(LDIR)
main:
$(CC) $(CFLAGS) $(IDIR) $(addprefix $(DIR_U),$(SRC_U)) -c $(LDIR)
epiphany:
$(ECC) -T $(ELINK) $(EFLAGS) $(addprefix $(DIR_E),$(SRC_E)) -o e_calc.elf $(ELIB) #-Llibs/pal/src/.libs/
e-objcopy --srec-forceS3 --output-target srec e_calc.elf e_calc.srec
e-debug:
$(ECC) $(EFLAGS) $(addprefix $(DIR_E),$(SRC_E)) -o e_calc.elf $(ELIB)
datamanagment_r:
$(ACC) $(CFLAGS) $(IDIR) $(addprefix $(DIR_D),$(SRC_D)) -c $(LDIR)
structs_r:
$(ACC) $(CFLAGS) $(IDIR) $(addprefix $(DIR_S),$(SRC_S)) -c $(LDIR)
main_r:
$(ACC) $(CFLAGS) $(IDIR) $(addprefix $(DIR_U),$(SRC_U)) -c $(LDIR)
clean:
rm *.o