forked from tatz1101/Edge-AI-Platform-Tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (28 loc) · 836 Bytes
/
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
PROJECT = detection
OBJ := main.o dpu_ssd.elf ssd_detector.o prior_boxes.o
CXX := g++
CC := gcc
# linking libraries of OpenCV
LDFLAGS = $(shell pkg-config --libs opencv)
# linking libraries of DNNDK
LDFLAGS += -lhineon -ln2cube -lpthread -ldputils -lSDL
CUR_DIR = $(shell pwd)
SRC = $(CUR_DIR)/src
BUILD = $(CUR_DIR)/build
MODEL = $(CUR_DIR)/model
VPATH = $(SRC)
CFLAGS := -g -O0 -mcpu=cortex-a53 -Wpointer-arith -std=c++11 -ffast-math
all: $(BUILD) $(PROJECT)
$(PROJECT): $(OBJ)
$(CXX) $(CFLAGS) $(addprefix $(BUILD)/, $^) -o $@ $(LDFLAGS)
%.o : %.cc
$(CXX) -c $(CFLAGS) $< -o $(BUILD)/$@
%.o : %.cpp
$(CXX) -c $(CFLAGS) $< -o $(BUILD)/$@
%.elf :
cp $(MODEL)/$@ $(BUILD)/$@
clean:
$(RM) -r $(BUILD)
$(RM) $(PROJECT)
$(BUILD) :
-mkdir -p $@