-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.param
63 lines (54 loc) · 1.78 KB
/
build.param
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
##
# Copyright (C) 2021 Alibaba Group Holding Limited
# Author: LuChongzhi <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
##
BUILD_LOG_START="\n\033[47;30m>>> $(MODULE_NAME) $@ begin >>>\033[0m"
BUILD_LOG_END ="\033[47;30m<<< $(MODULE_NAME) $@ end <<<\033[0m"
PLATFORM ?= simulator
ROOT_DIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST))))
SO_LIB_DIR=lib_so
ifeq ($(PLATFORM),simulator)
CFLAGS := -O0 -g -Werror -fPIC -DPLATFORM_SIMULATOR
else
CFLAGS := -O2 -g -Werror -fPIC
endif
LFLAGS := -no-pie
LIBS := -L$(ROOT_DIR)/output/common \
-L$(ROOT_DIR)/output/hal
ifeq ($(PLATFORM),light)
INCLUDE := -I$(ROOT_DIR)/include/common \
-I$(ROOT_DIR)/include/hal \
-I$(ROOT_DIR)/include/lib_camera \
-I$(ROOT_DIR)/src/lib_camera/camera_action/include\
-I$(ROOT_DIR)/examples/camera/camera_demo3_srcs \
-I$(ROOT_DIR)/src/lib_camera \
-I$(ROOT_DIR)/../recipe-sysroot/usr/include/csi_hal/
else
INCLUDE := -I$(ROOT_DIR)/include/common \
-I$(ROOT_DIR)/include/hal \
-I$(ROOT_DIR)/include/lib_camera \
-I$(ROOT_DIR)/src/lib_camera/camera_action/include
endif
ifeq ($(PLATFORM),simulator)
CC := gcc
CXX := g++
CPP := g++
AR := ar
LD := ld
RAN := ranlib
LIBOPENCV_INC = $(shell pkg-config --cflags opencv)
LIBOPENCV_LIBS = $(shell pkg-config --libs opencv)
else ifeq ($(PLATFORM),light)
# PARAM_FILE = ../.param
# -include $(PARAM_FILE)
test = $(shell if [ -f "../.param" ]; then echo "exist"; else echo "noexist"; fi)
ifeq ("$(test)", "exist")
-include ../.param
endif
else
$(error PLATFORM undefined)
endif