forked from cybergibbons/ipc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
96 lines (78 loc) · 2.01 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#DEVICE_MODEL ?= hi3507_inc
#DEVICE_MODEL ?= hi3518a_inc
DEVICE_MODEL ?= hi3518c_inc
#DEVICE_MODEL ?= hi3516c_inc
INC_PATH := $(CURDIR)/include
LIB_PATH := $(CURDIR)/lib
BIN_PATH := $(CURDIR)/bin
DBG_PATH := $(CURDIR)/debug
# Hisilicon Hi3507 inception
ifeq ($(DEVICE_MODEL),hi3507_inc)
PRODUCT_CLASS := ipcam
PRODUCT_MODEL := hi3507-inception
SOC_MODEL := HI3507
CROSS := arm-hismall-linux-
endif
# Hisilicon Hi3518a inception
ifeq ($(DEVICE_MODEL),hi3518a_inc)
PRODUCT_CLASS := ipcam
PRODUCT_MODEL := hi3518a-inception
SOC_MODEL := HI3518A
CROSS := arm-hisiv100nptl-linux-
SERISE_CODE := C1
endif
ifeq ($(DEVICE_MODEL),hi3518c_inc)
PRODUCT_CLASS := ipcam
PRODUCT_MODEL := hi3518c-inception
SOC_MODEL := HI3518C
CROSS := arm-hisiv100nptl-linux-
SERISE_CODE := C2
endif
ifeq ($(DEVICE_MODEL),hi3516c_inc)
PRODUCT_CLASS := ipcam
PRODUCT_MODEL := hi3516c-inception
SOC_MODEL := HI3516C
CROSS := arm-hisiv100nptl-linux-
SERISE_CODE := C3
endif
MAKE := @make
.PHONY: all src sdk api sdk_clean tarball image
#info:
# @echo $(PRODUCT_CLASS)
# @echo $(PRODUCT_MODEL)
# @echo $(SOC_MODEL)
#
src: srclib
$(MAKE) -C src CROSS="@$(CROSS)" \
PRODUCT_CLASS="$(PRODUCT_CLASS)" \
PRODUCT_MODEL="$(PRODUCT_MODEL)" \
SOC_MODEL="$(SOC_MODEL)" \
INC_PATH="$(INC_PATH)" \
LIB_PATH="$(LIB_PATH)" \
BIN_PATH="$(BIN_PATH)" \
DBG_PATH="$(DBG_PATH)" \
SERISE_CODE="$(SERISE_CODE)" \
srclib:
rm -f $(BIN_PATH)/ipcam_app
$(MAKE) -C src srclib CROSS="@$(CROSS)" \
PRODUCT_CLASS="$(PRODUCT_CLASS)" \
PRODUCT_MODEL="$(PRODUCT_MODEL)" \
SOC_MODEL="$(SOC_MODEL)" \
INC_PATH="$(INC_PATH)" \
LIB_PATH="$(LIB_PATH)" \
BIN_PATH="$(BIN_PATH)" \
DBG_PATH="$(DBG_PATH)" \
SERISE_CODE="$(SERISE_CODE)" \
sdk:
$(MAKE) --directory=sdk SOC_MODEL="$(SOC_MODEL)"
api:
$(MAKE) --directory=api CROSS=$(CROSS)
tarball:
$(MAKE) --directory=sdk clean
image: src
#cd ../release
$(MAKE) -C ../release DEVICE_MODEL="$(DEVICE_MODEL)"
all: clean sdk srclib src image
clean:
rm -f $(shell find $(CURDIR) -name *.o)
rm -f $(shell find $(CURDIR) -name *.d)