-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
executable file
·260 lines (226 loc) · 7.35 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
#²ÎÊý
m ?= dm8127
t ?= 1
s ?= all
alg ?= TrafficGate
ifdef d
USER_VERSION="USER_VERSION=-DUSER_VERSION=\\\"$d\\\""
endif
#»·¾³±äÁ¿
WORK_BASE = $(shell pwd)
ifeq ($(m),dm6467)
APPPATH = $(WORK_BASE)/rootfs/filesys/venus/App
endif
ifeq ($(m),dm8127)
APPPATH = $(WORK_BASE)/rootfs/filesys/venus/App
endif
ifeq ($(t),1)
xml=LprApp.xml
DSP=MercuryDsp.out
endif
ifeq ($(t),2)
xml=LprApp_CapFace.xml
DSP=MercuryDsp.out
endif
ifeq ($(t),3)
xml=LprApp_TollGate.xml
DSP=MercuryDsp.out
endif
ifeq ($(t),4)
xml=LprApp_PT.xml
DSP=MercuryDspPT.out
endif
#±àÒëÑ¡Ïî
help:
@echo "Usage: make module_name [m=dm6467] [v=0] [t=1] [d=v1] s=[clean, all]"
@echo "module_name:"
@echo " --- swpa compile swpa"
@echo " --- SWFC compile SWFC"
@echo " --- Plugin compile Plugin"
@echo " --- ONVIF compile ONVIF"
@echo " --- RTSP compile RTSP"
@echo " --- bm compile BasicModule"
@echo " --- LprApp compile LprApp"
@echo " --- deamon compile deamon"
@echo " --- command compile command"
@echo " --- log compile log"
@echo " --- upgrade compile upgrade"
@echo " --- RtspApp compile RtspApp"
@echo " --- ShmTool compile ShmTool"
@echo " --- OnvifApp compile OnvifApp"
@echo " --- GB28181App compile GB28181App"
@echo " --- 2AApp compile 2AApp"
@echo " --- dsp link dsp program,alg=[normal,EP,PK,TrafficGate] default is normal. \"normal\" is for CapFace and TollGate, \"EP\" for EPolice, \"PK\" for Parking"
@echo " --- lib compile all lib"
@echo " --- exe compile all exe"
@echo " --- all compile all projects"
@echo " --- rootfs generate upgrade package"
@echo " --- install complie all projects and generate upgrade package"
@echo " --- svn download files from svn."
@echo " --- clean clear all *.o and *.bak and *.d files"
@echo "m:"
@echo " --- dm6467 compile dm6467 lib. default value"
@echo " --- dm8127 compile dm8127 lib"
@echo "v:"
@echo " --- 0 disable verbose compile line. default value"
@echo " --- 1 enable verbose compile line."
@echo "t:"
@echo " --- 1 EPoliceApp package. default value"
@echo " --- 2 CapFaceApp package"
@echo " --- 3 TollGateApp package"
@echo " --- 4 TollGatePTApp package"
@echo "d:"
@echo " --- user define version sufix."
@echo "s:"
@echo " --- make session, clean or all"
@echo "Exam:"
@echo " make swpa"
@echo " make swpa m=dm6467"
@echo " make swpa m=dm6467 v=1"
@echo " make swpa m=dm6467 v=1 d=v1"
swpa:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/swpa/src clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/swpa/src all
endif
SWFC:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/SWFC/src clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/SWFC/src all
endif
Plugin:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Plugin clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Plugin all
endif
ONVIF:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Plugin/ONVIF clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Plugin/ONVIF all
endif
RTSP:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Plugin/RTSP clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Plugin/RTSP all
endif
bm:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/BasicModule/src clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/BasicModule/src all
endif
LprApp:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/LprApp clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/LprApp all
endif
deamon:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/deamon clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/deamon all
endif
command:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/command clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/command all
endif
log:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/log clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/log all
endif
upgrade:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/upgrade clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/upgrade all
endif
RtspApp:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/RtspApp clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/RtspApp all
endif
ShmTool:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/ShmTool clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/ShmTool all
endif
OnvifApp:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/OnvifApp clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/OnvifApp all
endif
GB28181App:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/GB28181App clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/GB28181App all
endif
2AApp:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/2AApp clean
else
$(MAKE) DIR=$(WORK_BASE) V=$(v) M=$(m) $(USER_VERSION) -C $(WORK_BASE)/Application/2AApp all
endif
dsp:
ifeq ($(s),clean)
$(MAKE) DIR=$(WORK_BASE) ALG=$(alg) -C $(WORK_BASE)/swpa/src/dm8127/ipc/dsp_libs_export clean
else
$(MAKE) DIR=$(WORK_BASE) ALG=$(alg) -C $(WORK_BASE)/swpa/src/dm8127/ipc/dsp_libs_export all
endif
svn:
@echo "start download files."
@echo "sorry,function not compliment."
clean:
@echo "clear all *.o and *.bak and *.d file"
@find . -iname '*.o' -o -iname '*.bak' -o -iname '*.d'|xargs rm
@echo "done."
cleansw:
@echo "clean sw libs and exe."
$(MAKE) lib s=clean
$(MAKE) exe s=clean
rootfs:
@echo "copy file to system..."
@./copybin.sh
lib:swpa SWFC bm
cp -vf ./Plugin/lib/*.a ./lib/ARM/
exe:LprApp deamon command log upgrade RtspApp OnvifApp GB28181App 2AApp ShmTool
all:lib exe
install:all rootfs
.PHONY:help\
swpa\
SWFC\
Plugin\
ONVIF\
RTSP\
bm\
LprApp\
deamon\
command\
log\
upgrade\
RtspApp\
ShmTool\
OnvifApp\
GB28181App\
2AApp\
dsp\
lib\
exe\
all\
rootfs\
install\
svn\
clean