-
Notifications
You must be signed in to change notification settings - Fork 13
/
makefile
502 lines (437 loc) · 18.8 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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
# Makefile for eCMD for pdbg
## IBM_PROLOG_BEGIN_TAG
#
# eCMD for pdbg Project
#
# Copyright 2017,2018 IBM International Business Machines Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
## IBM_PROLOG_END_TAG
# *****************************************************************************
# Include the common base makefile
# *****************************************************************************
include makefile.base
# *****************************************************************************
# The Common Setup stuff
# *****************************************************************************
TARGET_EXE := edbg
TARGET_DLL := edbg.dll
#CXXFLAGS := ${CXXFLAGS} -Os
# Create a list of subdirectories for each repo where source will be found
# Then use that list to create our include and vpath definitions
ECMD_SRCDIRS := ecmd-core/capi ecmd-core/cmd ecmd-core/dll ecmd-core/ext/cip/capi ecmd-core/ext/cip/cmd ecmd-core/ext/fapi2/capi src_${TARGET_ARCH}
EDBG_SRCDIRS := src/common src/dll src/vpd src/p9 src/p10 src/regaccess src/p9/ekb src/p10/ekb
ifeq (${EDBG_ISTEP_CONTROL}, yes)
EDBG_SRCDIRS += src/istep
endif
PDBG_SRCDIRS := libpdbg
# Create our includes
CXXFLAGS += $(foreach srcdir, ${ECMD_SRCDIRS}, -I ${ECMD_ROOT}/${srcdir})
CXXFLAGS += $(foreach srcdir, ${EDBG_SRCDIRS}, -I ${EDBG_ROOT}/${srcdir})
# Need the root pdbg dir too
CXXFLAGS += -I ${PDBG_ROOT} $(foreach srcdir, ${PDBG_SRCDIRS}, -I ${PDBG_ROOT}/${srcdir})
# Create our vpath
VPATH := $(foreach srcdir, ${ECMD_SRCDIRS}, :${ECMD_ROOT}/${srcdir}):
VPATH += $(foreach srcdir, ${EDBG_SRCDIRS}, :${EDBG_ROOT}/${srcdir}):
VPATH += ${PDBG_ROOT}$(foreach srcdir, ${PDBG_SRCDIRS}, :${PDBG_ROOT}/${srcdir})
# Cleanup spaces introduced
VPATH := $(subst ${space},${empty}, ${VPATH})
# *****************************************************************************
# Setup all the files going into the build
# *****************************************************************************
# The INCLUDES_EXE are files provided by eCMD that if changed, we would want to recompile on
INCLUDES_EXE += ecmdClientCapi.H
INCLUDES_EXE += ecmdDataBuffer.H
INCLUDES_EXE += ecmdReturnCodes.H
INCLUDES_EXE += ecmdStructs.H
INCLUDES_EXE += ecmdUtils.H
INCLUDES_EXE += ecmdSharedUtils.H
INCLUDES_EXE += ecmdDefines.H
INCLUDES_EXE += ecmdDllCapi.H
INCLUDES_EXE += ecmdChipTargetCompare.H
INCLUDES_EXE += cipClientCapi.H
# The source files and includes for edbg that are going into the build
INCLUDES_DLL += edbgCommon.H
INCLUDES_DLL += edbgOutput.H
INCLUDES_DLL += edbgReturnCodes.H
INCLUDES_DLL += lhtVpd.H
INCLUDES_DLL += lhtVpdFile.H
INCLUDES_DLL += lhtVpdDevice.H
INCLUDES_DLL += p9_edbgEcmdDllScom.H
INCLUDES_DLL += p10_edbgEcmdDllScom.H
INCLUDES_DLL += p9_edbgCipDllInstrCtrl.H
INCLUDES_DLL += p10_edbgCipDllInstrCtrl.H
INCLUDES_DLL += ecmdMapSpr2Str.H
ifeq (${EDBG_ISTEP_CONTROL}, yes)
INCLUDES_DLL += edbgIstep.H
endif
# Combine all the includes into one variable for the build
INCLUDES := ${INCLUDES_EXE} ${INCLUDES_DLL}
# edbg source files to pull into the build
SOURCES_DLL += p9_edbgEcmdDllScom.C
SOURCES_DLL += p10_edbgEcmdDllScom.C
SOURCES_DLL += edbgEcmdDll.C
SOURCES_DLL += edbgEcmdDllInfo.C
SOURCES_DLL += edbgOutput.C
SOURCES_DLL += lhtVpd.C
SOURCES_DLL += lhtVpdFile.C
SOURCES_DLL += lhtVpdDevice.C
SOURCES_DLL += p9_scominfo.C
SOURCES_DLL += p10_scominfo.C
SOURCES_DLL += p10_scom_addr.C
SOURCES_DLL += p10_spr_name_map.C
# cip support files
SOURCES_DLL += p9_edbgCipDllInstrCtrl.C
SOURCES_DLL += p10_edbgCipDllInstrCtrl.C
SOURCES_DLL += edbgCipDll.C
# fapi2 support files
SOURCES_DLL += edbgFapi2Dll.C
# common support file
SOURCES_DLL += edbgCommon.C
# register access file
SOURCES_DLL += ecmdMapSpr2Str.C
# istep support files
ifeq (${EDBG_ISTEP_CONTROL}, yes)
SOURCES_DLL += edbgIstep.C
endif
# Like the rest of the DLL files, this one is also included in both builds
# However, it needs to have the EXE defines on when it builds
SOURCES_ALL := ecmdDllCapi.C
SOURCES_ALL += cipDllCapi.C
SOURCES_ALL += fapi2DllCapi.C
# eCMD source files to pull in for a static build
SOURCES_EXE += ecmdClientCapi.C
SOURCES_EXE += ecmdClientCapiFunc.C
SOURCES_EXE += ecmdMain.C
SOURCES_EXE += ecmdInterpreter.C
SOURCES_EXE += ecmdExtInterpreter.C
SOURCES_EXE += ecmdCommandUtils.C
SOURCES_EXE += ecmdParseTokens.C
SOURCES_EXE += ecmdUtils.C
SOURCES_EXE += ecmdQueryUser.C
SOURCES_EXE += ecmdMiscUser.C
SOURCES_EXE += ecmdScomUser.C
SOURCES_EXE += ecmdVpdUser.C
SOURCES_EXE += ecmdRingUser.C
SOURCES_EXE += ecmdIstepUser.C
SOURCES_EXE += ecmdMemUser.C
SOURCES_EXE += ecmdProcUser.C
SOURCES_EXE += ecmdDataBuffer.C
SOURCES_EXE += ecmdDataBufferBase.C
SOURCES_EXE += ecmdStructs.C
SOURCES_EXE += ecmdSharedUtils.C
SOURCES_EXE += ecmdChipTargetCompare.C
SOURCES_EXE += ecmdWriteTarget.C
# cip extension source files to pull in for static build
SOURCES_EXE += cipClientCapi.C
SOURCES_EXE += cipClientCapiFunc.C
SOURCES_EXE += cipInterpreter.C
SOURCES_EXE += cipProcUser.C
# *****************************************************************************
# Setup all the defines going into the build
# *****************************************************************************
# Push the current git rev into the build so ecmdquery version can return it
DEFINES += -DGIT_COMMIT_REV=\"$(shell git --work-tree=. --git-dir=./.git describe --always --long --dirty || echo unknown)\"
# Push the current date into the build so ecmdquery version can return it as well
DEFINES += -DBUILD_DATE=\"$(shell date +"%Y-%m-%d\ %H:%M:%S\ %Z")\"
ifeq (${EDBG_ISTEP_CONTROL}, yes)
DEFINES += -DEDBG_ISTEP_CTRL_FUNCTIONS
endif
# These are options we only need when building the standalone exe
# Turn on eCMD static linking
DEFINES_EXE += -DECMD_STATIC_FUNCTIONS
# *****************************************************************************
# The Main Targets
# *****************************************************************************
####
# General build rules
###
# The default action is to do everything to config & build all required components
all: | ecmd-full pdbg-full edbg-full dtb
build: | ecmd-build pdbg-build edbg-build dtb
clean: | ecmd-clean pdbg-clean edbg-clean
####
# eCMD build rules
####
ecmd-full: | ecmd-build
ecmd-banner:
@printf "\n"
@echo "++++++++++++++++++++++++++++++++++++++++"
@echo "+++++ ecmd -- ecmd -- ecmd -- ecmd +++++"
@echo "++++++++++++++++++++++++++++++++++++++++"
@printf "\n"
ecmd-build: ecmd-banner
${VERBOSE} make -C ${ECMD_ROOT}/ecmd-core/capi --no-print-directory
${VERBOSE} make -C ${ECMD_ROOT}/ecmd-core/ext/cip/capi --no-print-directory
${VERBOSE} make -C ${ECMD_ROOT}/ecmd-core/ext/fapi2/capi --no-print-directory
${VERBOSE} make -C ${ECMD_ROOT}/ecmd-core/cmd/ generate --no-print-directory
${VERBOSE} make -C ${ECMD_ROOT}/ecmd-core/cmd ecmd.htxt --no-print-directory
ifeq (${CREATE_PERLAPI},yes)
${VERBOSE} make -C ${ECMD_ROOT}/ecmd-core/ext/cip/perlapi --no-print-directory
${VERBOSE} make -C ${ECMD_ROOT}/ecmd-core/ext/fapi2/perlapi --no-print-directory
${VERBOSE} make -C ${ECMD_ROOT}/ecmd-core/perlapi --no-print-directory
endif
ifneq ($(filter yes,${CREATE_PYAPI} ${CREATE_PY3API}),)
${VERBOSE} make -C ${ECMD_ROOT}/ecmd-core/ext/cip/pyapi --no-print-directory
${VERBOSE} make -C ${ECMD_ROOT}/ecmd-core/ext/fapi2/pyapi --no-print-directory
endif
ifeq (${CREATE_PYAPI},yes)
${VERBOSE} make -C ${ECMD_ROOT}/ecmd-core/pyapi --no-print-directory
endif
ifeq (${CREATE_PY3API},yes)
${VERBOSE} make -C ${ECMD_ROOT}/ecmd-core/py3api --no-print-directory
endif
ecmd-clean: ecmd-banner
@make -C ${ECMD_ROOT} clean --no-print-directory
####
# pdbg build rules
####
pdbg-full: | pdbg-build
pdbg-banner:
@printf "\n"
@echo "++++++++++++++++++++++++++++++++++++++++"
@echo "+++++ pdbg -- pdbg -- pdbg -- pdbg +++++"
@echo "++++++++++++++++++++++++++++++++++++++++"
@printf "\n"
pdbg-build: pdbg-banner
${VERBOSE} make -C ${PDBG_ROOT} --no-print-directory
pdbg-clean: pdbg-banner
@make -C ${PDBG_ROOT} clean --no-print-directory
####
# edbg build rules
####
# invoking this make
edbg-full: | edbg-build
edbg-banner:
@printf "\n"
@echo "++++++++++++++++++++++++++++++++++++++++"
@echo "+++++ edbg -- edbg -- edbg -- edbg +++++"
@echo "++++++++++++++++++++++++++++++++++++++++"
@printf "\n"
# This re-call of make instead of having EXE and DLL as dependenicies is required
# The eCMD build creates files EXE and DLL are dependent upon.
# If make isn't completely re-invoked to find the eCMD created files, the build
# will fail saying dependencies are missing - hence edbg-build-actual
edbg-build: edbg-banner
${VERBOSE} make edbg-build-actual -C ${EDBG_ROOT} --no-print-directory
edbg-build-actual: ${TARGET_EXE} ${TARGET_DLL}
edbg-clean: edbg-banner
rm -rf ${OBJPATH}
rm -rf ${OUTPATH}
rm -rf ${DTBPATH}
dir:
@mkdir -p ${OBJPATH}
@mkdir -p ${OUTPATH}
@mkdir -p ${OUTBIN}
@mkdir -p ${OUTLIB}
@mkdir -p ${DTBPATH}
date:
# Remove the object before each build to force a rebuild to update the date
@rm -f ${OBJPATH}/edbgEcmdDllInfo.o
# *****************************************************************************
# Object Build Targets
# *****************************************************************************
OBJS_EXE := $(basename ${SOURCES_EXE})
OBJS_EXE := $(addprefix ${OBJPATH}, ${OBJS_EXE})
OBJS_EXE := $(addsuffix .o, ${OBJS_EXE})
OBJS_DLL := $(basename ${SOURCES_DLL})
OBJS_DLL := $(addprefix ${OBJPATH}, ${OBJS_DLL})
OBJS_DLL := $(addsuffix .o, ${OBJS_DLL})
OBJS_ALL := $(basename ${SOURCES_ALL})
OBJS_ALL := $(addprefix ${OBJPATH}, ${OBJS_ALL})
OBJS_ALL := $(addsuffix .o, ${OBJS_ALL})
# *****************************************************************************
# Compile code for the common C++ objects if their respective
# code has been changed. Or, compile everything if a header file has changed
# *****************************************************************************
# Create the compile defines needed for each type of source building
${OBJS_EXE} ${OBJS_ALL}: CDEFINES = ${DEFINES} ${DEFINES_EXE} ${DEFINES_FUNC}
${OBJS_DLL}: CDEFINES = ${DEFINES}
${OBJS_EXE} ${OBJS_DLL} ${OBJS_ALL}: ${OBJPATH}%.o : %.C ${INCLUDES} | dir date
@echo Compiling $<
${VERBOSE}${CXX} -c ${CXXFLAGS} $< -o $@ ${CDEFINES}
# *****************************************************************************
# Create the Target
# *****************************************************************************
LINK_LIBS := -L${PDBG_ROOT}/.libs -lpdbg -lfdt -lz -lyaml
ifeq (${EDBG_ISTEP_CONTROL}, yes)
LINK_LIBS += -lipl -lekb -lstdc++fs
endif
${TARGET_EXE}: ${OBJS_DLL} ${OBJS_EXE} ${OBJS_ALL}
@echo Linking ${TARGET_EXE}
${VERBOSE}${LD} ${LDFLAGS} -o ${OUTBIN}/${TARGET_EXE} $^ ${LINK_LIBS}
${TARGET_DLL}: ${OBJS_DLL} ${OBJS_ALL}
@echo Linking ${TARGET_DLL}
${VERBOSE}${LD} ${SLDFLAGS} -o ${OUTLIB}/${TARGET_DLL} $^ ${LINK_LIBS} -L${ECMD_ROOT}/out_${TARGET_ARCH}/lib -lecmd
dtb:
@echo Creating p9-fake.dtb
@${VERBOSE} m4 -I ${EDBG_ROOT}/dt ${EDBG_ROOT}/dt/p9-fake.dts.m4 | dtc -I dts -O dts > ${DTBPATH}/p9-fake.dts
@${VERBOSE} dtc -I dts ${DTBPATH}/p9-fake.dts -O dtb > ${DTBPATH}/p9-fake.dtb
@echo Creating 2-socket-host-p9n.dtb
@${VERBOSE} m4 -I ${EDBG_ROOT}/dt ${EDBG_ROOT}/dt/2-socket-host-p9n.dts.m4 > ${DTBPATH}/2-socket-host-p9n.dts
@${VERBOSE} dtc -I dts ${DTBPATH}/2-socket-host-p9n.dts -O dtb > ${DTBPATH}/2-socket-host-p9n.dtb
@echo Creating 2-socket-bmc-p9n.dtb
@${VERBOSE} m4 -I ${EDBG_ROOT}/dt ${EDBG_ROOT}/dt/2-socket-bmc-p9n.dts.m4 > ${DTBPATH}/2-socket-bmc-p9n.dts
@${VERBOSE} dtc -I dts ${DTBPATH}/2-socket-bmc-p9n.dts -O dtb > ${DTBPATH}/2-socket-bmc-p9n.dtb
# *****************************************************************************
# Install what we built
# *****************************************************************************
.PHONY: install
install:
@echo "Removing any previous install at ${INSTALL_PATH}"
@rm -rf ${INSTALL_PATH}
@echo "Creating ${INSTALL_PATH}"
@mkdir -p ${INSTALL_PATH}
@echo "Creating bin dir ..."
@mkdir -p ${INSTALL_PATH}/bin
@echo "Creating help dir ..."
@mkdir -p ${INSTALL_PATH}/help
@echo "Creating lib dir ..."
@mkdir -p ${INSTALL_PATH}/lib
@echo "Creating dtb dir ..."
@mkdir -p ${INSTALL_PATH}/dtb
ifeq (${CREATE_PERLAPI},yes)
@echo "Creating perl dir ..."
@mkdir -p ${INSTALL_PATH}/perl
endif
ifneq ($(filter yes,${CREATE_PYAPI} ${CREATE_PY3API}),)
@echo "Creating python dir ..."
@mkdir -p ${INSTALL_PATH}/python/ecmd
ifeq (${CREATE_PYAPI},yes)
@mkdir -p ${INSTALL_PATH}/python/ecmd/python2
endif
ifeq (${CREATE_PY3API},yes)
@mkdir -p ${INSTALL_PATH}/python/ecmd/python3
endif
endif
@echo ""
@echo "Installing edbg plugin ..."
@cp ${OUTLIB}/${TARGET_DLL} ${INSTALL_PATH}/lib/.
@echo "Installing edbg exe ..."
@cp ${OUTBIN}/${TARGET_EXE} ${INSTALL_PATH}/bin/.
@echo "Installing libecmd.so ..."
@cp ${ECMD_ROOT}/out_${TARGET_ARCH}/lib/libecmd.so ${INSTALL_PATH}/lib/.
ifneq (,$(wildcard ${PDBG_ROOT}/libfdt/.libs/libfdt.so))
@echo "Installing libfdt.so* ..."
@cp -P ${PDBG_ROOT}/libfdt/.libs/libfdt.so* ${INSTALL_PATH}/lib/.
endif
@echo "Installing libpdbg.so* ..."
@cp -P ${PDBG_ROOT}/.libs/libpdbg.so* ${INSTALL_PATH}/lib/.
ifeq (${CREATE_PERLAPI},yes)
@echo "Installing perl module ..."
@cp -r ${ECMD_ROOT}/out_${TARGET_ARCH}/perl ${INSTALL_PATH}/.
endif
ifneq ($(filter yes,${CREATE_PYAPI} ${CREATE_PY3API}),)
@echo "Installing python init ..."
@cp -P ${ECMD_ROOT}/ecmd-core/pyapi/init/__init__.py ${INSTALL_PATH}/python/ecmd/.
ifeq (${CREATE_PYAPI},yes)
@echo "Installing python2 module ..."
@cp -P ${ECMD_ROOT}/out_${TARGET_ARCH}/pyapi/_ecmd.so ${INSTALL_PATH}/python/ecmd/python2/.
@cp -P ${ECMD_ROOT}/out_${TARGET_ARCH}/pyapi/ecmd.py ${INSTALL_PATH}/python/ecmd/python2/__init__.py
endif
ifeq (${CREATE_PY3API},yes)
@echo "Installing python3 module ..."
@cp -P ${ECMD_ROOT}/out_${TARGET_ARCH}/py3api/_ecmd.so ${INSTALL_PATH}/python/ecmd/python3/.
@cp -P ${ECMD_ROOT}/out_${TARGET_ARCH}/py3api/ecmd.py ${INSTALL_PATH}/python/ecmd/python3/__init__.py
endif
endif
@echo ""
@echo "Stripping bin dir ..."
@${STRIP} ${INSTALL_PATH}/bin/*
@echo "Stripping lib dir ..."
@${STRIP} ${INSTALL_PATH}/lib/*
ifeq (${CREATE_PERLAPI},yes)
@echo "Stripping perl module ..."
@${STRIP} ${INSTALL_PATH}/perl/ecmd.so
endif
ifeq (${CREATE_PYAPI},yes)
@echo "Stripping python2 module ..."
@${STRIP} ${INSTALL_PATH}/python/ecmd/python2/_ecmd.so
endif
ifeq (${CREATE_PY3API},yes)
@echo "Stripping python3 module ..."
@${STRIP} ${INSTALL_PATH}/python/ecmd/python3/_ecmd.so
endif
@echo ""
@echo "Installing return code headers ..."
@cp ${ECMD_ROOT}/ecmd-core/capi/ecmdReturnCodes.H ${INSTALL_PATH}/help/.
@cp src/common/edbgReturnCodes.H ${INSTALL_PATH}/help/.
@echo "Installing help text ..."
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/getscom.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/putscom.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/getcfam.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/putcfam.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/getvpdkeyword.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/putvpdkeyword.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/checkrings.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/getbits.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/putbits.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/getmemproc.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/putmemproc.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/stopclocks.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/startclocks.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/ecmdquery.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/istep.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/getgpr.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/putgpr.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/getspr.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/cmd/help/putspr.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/ext/cip/cmd/help/cipinstruct.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/ext/cip/cmd/help/cipgetmemproc.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/ecmd-core/ext/cip/cmd/help/cipputmemproc.htxt ${INSTALL_PATH}/help/.
@cp ${ECMD_ROOT}/out_${TARGET_ARCH}/bin/ecmd.htxt ${INSTALL_PATH}/help/.
ifeq (${EDBG_ISTEP_CONTROL}, yes)
@cp ${EDBG_ROOT}/src/istep/p10/help/istep_list.htxt ${INSTALL_PATH}/help/.
endif
@echo "Installing command wrappers ..."
@cp ${EDBG_ROOT}/bin/edbgWrapper.sh ${INSTALL_PATH}/bin/.
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/ecmdquery
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/getscom
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/putscom
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/getcfam
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/putcfam
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/getvpdkeyword
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/putvpdkeyword
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/getmemproc
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/putmemproc
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/startclocks
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/stopclocks
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/istep
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/cipinstruct
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/cipgetmemproc
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/cipputmemproc
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/getgpr
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/putgpr
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/getspr
@ln -s edbgWrapper.sh ${INSTALL_PATH}/bin/putspr
@echo "Installing bin scripts ..."
@cp ${EDBG_ROOT}/bin/* ${INSTALL_PATH}/bin/.
@echo "Installing device trees ..."
@cp ${DTBPATH}/p9-fake.dtb ${INSTALL_PATH}/dtb/.
@cp ${DTBPATH}/2-socket-host-p9n.dtb ${INSTALL_PATH}/dtb/.
@cp ${DTBPATH}/2-socket-bmc-p9n.dtb ${INSTALL_PATH}/dtb/.
@echo "Creating env.sh setup script ..."
@echo "export EDBG_HOME=${INSTALL_PATH}" > ${INSTALL_PATH}/bin/env.sh
@echo "export ECMD_EXE=\$$EDBG_HOME/bin/edbg" >> ${INSTALL_PATH}/bin/env.sh
@echo "export ECMD_DLL_FILE=\$$EDBG_HOME/lib/edbg.dll" >> ${INSTALL_PATH}/bin/env.sh
@echo "export PATH=\$$PATH:\$$EDBG_HOME/bin" >> ${INSTALL_PATH}/bin/env.sh
@echo "export LD_LIBRARY_PATH=\$$LD_LIBRARY_PATH:\$$EDBG_HOME/lib" >> ${INSTALL_PATH}/bin/env.sh
# *****************************************************************************
# Debug rule for any makefile testing
# *****************************************************************************
# Allows you to print any variable by doing this:
# make print-BUILD_TARGETS
print-%:
@echo $*=$($*)