-
Notifications
You must be signed in to change notification settings - Fork 72
/
Makefile
executable file
·50 lines (35 loc) · 1.46 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
# Hisilicon Hi35xx sample Makefile
include $(PWD)/../Makefile.param
CFLAGS += -I$(PWD)/src
CFLAGS += -I$(PWD)/third_party/hi_nnie/include
CXXFLAGS += -I$(PWD)/src
CXXFLAGS += -I$(PWD)/third_party/hi_nnie/include
CXXFLAGS += -I$(PWD)/third_party/opencv4/include/opencv4
CXXFLAGS += -L$(PWD)/third_party/opencv4/lib
LD_OPENCV_LIBS += -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_videoio -lopencv_dnn -lopencv_ml -lopencv_photo \
-lopencv_objdetect -lopencv_stitching -lopencv_flann -lopencv_imgcodecs -lopencv_gapi -lopencv_core -lopencv_calib3d \
-lopencv_features2d
CXXFLAGS += ${LD_OPENCV_LIBS}
CXXFLAGS += -std=c++11
CXXFLAGS += -Wno-error
CXXFLAGS += -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -fno-rtti -fno-exceptions -fpermissive
CXXFLAGS += -O3
SRCS := $(wildcard ./src/*.c)
TARGET := sample_nnie_main
# target source
OBJS = $(SRCS:%.c=%.o)
CXX = aarch64-himix100-linux-g++
.PHONY : clean all
all: $(TARGET)
$(TARGET): ./sample/sample_nnie_main.o ./src/ins_nnie_interface.o $(OBJS)
$(CXX) $(CXXFLAGS) $(LIBS_LD_CFLAGS) -lpthread -lm -o $@ $^ -Wl,--start-group $(MPI_LIBS) $(SENSOR_LIBS) $(AUDIO_LIBA) $(REL_LIB)/libsecurec.a -Wl,--end-group
clean:
@rm -f $(TARGET) ./sample/sample_nnie_main.o ./src/ins_nnie_interface.o ./src/util.o
@rm -f $(OBJS)
@rm -f $(COMM_OBJ)
cleanstream:
@rm -f *.h264
@rm -f *.h265
@rm -f *.jpg
@rm -f *.mjp
@rm -f *.mp4