OLD | NEW |
(Empty) | |
| 1 # Copyright 2015 The Native Client Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 NACLPORTS_CPPFLAGS+=" -Dmain=nacl_main" |
| 6 export LIBS="${NACL_CLI_MAIN_LIB}" |
| 7 |
| 8 EXTRA_CONFIGURE_ARGS=" --disable-tool-name-check --disable-system-torrc \ |
| 9 --disable-gcc-hardening --disable-unittests" |
| 10 |
| 11 ConfigureStep() { |
| 12 # TODO(dt) fix the problem in (explicit) static linking of openssl |
| 13 # and libevent when TOOLCHAIN=glibc |
| 14 if [ "${NACL_LIBC}" = "newlib" ]; then |
| 15 EXTRA_CONFIGURE_ARGS+=" --enable-static-tor \ |
| 16 --enable-static-libevent --with-libevent-dir=${NACL_PREFIX} \ |
| 17 --enable-static-openssl --with-openssl-dir=${NACL_PREFIX} \ |
| 18 --enable-static-zlib --with-zlib-dir=${NACL_PREFIX}" |
| 19 NACLPORTS_CPPFLAGS+=" -I${NACLPORTS_INCLUDE}/glibc-compat" |
| 20 export LIBS+=" -lglibc-compat" |
| 21 fi |
| 22 |
| 23 # building with NDEBUG not allowed |
| 24 NACLPORTS_CFLAGS="${NACLPORTS_CFLAGS/-DNDEBUG/}" |
| 25 DefaultConfigureStep |
| 26 } |
| 27 |
| 28 PublishStep() { |
| 29 MakeDir ${PUBLISH_DIR} |
| 30 local platform_dir="${PUBLISH_DIR}/_platform_specific/${NACL_ARCH}" |
| 31 MakeDir ${platform_dir} |
| 32 local exe=${PUBLISH_DIR}/_platform_specific/${NACL_ARCH}/tor${NACL_EXEEXT} |
| 33 LogExecute cp ${BUILD_DIR}/src/or/tor${NACL_EXEEXT} ${exe} |
| 34 cd ${PUBLISH_DIR} |
| 35 LogExecute python ${NACL_SDK_ROOT}/tools/create_nmf.py \ |
| 36 _platform_specific/*/tor${NACL_EXEEXT} -s . -o tor.nmf |
| 37 InstallNaClTerm ${PUBLISH_DIR} |
| 38 GenerateManifest ${START_DIR}/manifest.json ${PUBLISH_DIR} |
| 39 LogExecute cp ${START_DIR}/krotor_16.png ${PUBLISH_DIR} |
| 40 LogExecute cp ${START_DIR}/krotor_48.png ${PUBLISH_DIR} |
| 41 LogExecute cp ${START_DIR}/krotor_128.png ${PUBLISH_DIR} |
| 42 LogExecute cp ${START_DIR}/background.js ${PUBLISH_DIR} |
| 43 LogExecute cp ${START_DIR}/tor.js ${PUBLISH_DIR} |
| 44 LogExecute cp ${START_DIR}/index.html ${PUBLISH_DIR} |
| 45 } |
OLD | NEW |