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
|
return 0
}
function buildCACKey() {
local platform
local file copied
platform="$1"
shift
if [ -z "${platform}" ]; then
echo 'error: Platform not specified' >&2
return 1
fi
(
cd ../.. || exit 1
make distclean
./configure --with-pcsc-headers="${cackeyChromeExtPCSCLiteDir}/include/PCSC" --with-pcsc-libs="${PCSC_LIBS}" "$@" || exit 1
make || exit 1
) || return 1
copied='0'
for file in ../../libcackey{,_g}.{so,dll,dylib}; do
if [ -f "${file}" ]; then
mkdir -p "${outdir}/${platform}"
cp "${file}" "${outdir}/${platform}"
copied='1'
fi
done
|
>
|
|
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
|
return 0
}
function buildCACKey() {
local platform
local file copied
local targets
platform="$1"
shift
if [ -z "${platform}" ]; then
echo 'error: Platform not specified' >&2
return 1
fi
(
cd ../.. || exit 1
make distclean
./configure --with-pcsc-headers="${cackeyChromeExtPCSCLiteDir}/include/PCSC" --with-pcsc-libs="${PCSC_LIBS}" "$@" || exit 1
make || exit 1
) || return 1
copied='0'
for file in ../../libcackey{,_g}.{so,dll,dylib,a}; do
if [ -f "${file}" ]; then
mkdir -p "${outdir}/${platform}"
cp "${file}" "${outdir}/${platform}"
copied='1'
fi
done
|
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
|
rm -rf "${outdir}"
mkdir "${outdir}" || exit 1
buildPCSCLite || exit 1
buildCACKey build || exit 1
buildOutputType="$(echo 'int main(int argc, char **argv) { return(0); }' | "${CC:-cc}" -x c - -o /dev/stdout | file -)" || exit 1
case "${buildOutputType}" in
*x86-64*)
naclTopDir='linux_x86_glibc'
naclPlatform='x86_64-nacl'
;;
*)
echo "error: Unrecognized platform output: \"${buildOutputType}\"" >&2
exit 1
;;
esac
PATH="${PATH}:${NACL_SDK_ROOT}/toolchain/${naclTopDir}/bin" buildCACKey "${naclPlatform}" --host="${naclPlatform}" CC=${naclPlatform}-gcc LD=${naclPlatform}-ld OBJCOPY=${naclPlatform}-objcopy STRIP=${naclPlatform}-strip || exit 1
cleanup
exit 0
|
<
<
<
<
<
<
<
<
|
<
<
<
<
|
344
345
346
347
348
349
350
351
352
353
354
355
|
rm -rf "${outdir}"
mkdir "${outdir}" || exit 1
buildPCSCLite || exit 1
buildCACKey build || exit 1
PATH="${PATH}:${NACL_SDK_ROOT}/toolchain/linux_pnacl/bin" buildCACKey pnacl --host="nacl" CC=pnacl-clang LD=pnacl-ld OBJCOPY=pnacl-objcopy STRIP=pnacl-strip AR=pnacl-ar RANLIB=pnacl-ranlib cackey_cv_pcsc_works=okay || exit 1
cleanup
exit 0
|