| OLD | NEW |
| 1 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 1 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 EXECUTABLES=bin/xaos | 5 EXECUTABLES=bin/xaos |
| 6 NACL_CPPFLAGS+=" -D__NO_MATH_INLINES=1" | 6 NACL_CPPFLAGS+=" -D__NO_MATH_INLINES=1" |
| 7 | 7 |
| 8 # xaos does not work with a build dir which is separate from the src dir |
| 9 BUILD_DIR=${SRC_DIR} |
| 10 |
| 11 NACLPORTS_LDFLAGS+=" -Wl,--undefined=PPP_GetInterface \ |
| 12 -Wl,--undefined=PPP_ShutdownModule \ |
| 13 -Wl,--undefined=PPP_InitializeModule \ |
| 14 -Wl,--undefined=original_main" |
| 15 |
| 16 NACLPORTS_LIBS="-lppapi -lpthread -l${NACL_CXX_LIB} -lm" |
| 17 |
| 8 PatchStep() { | 18 PatchStep() { |
| 9 DefaultPatchStep | 19 DefaultPatchStep |
| 10 echo "copy nacl driver" | 20 echo "copy nacl driver" |
| 11 cp -r "${START_DIR}/nacl-ui-driver" "${SRC_DIR}/src/ui/ui-drv/nacl" | 21 cp -r "${START_DIR}/nacl-ui-driver" "${SRC_DIR}/src/ui/ui-drv/nacl" |
| 12 } | 22 } |
| 13 | 23 |
| 14 ConfigureStep() { | 24 ConfigureStep() { |
| 15 # xaos does not work with a build dir which is separate from the | 25 # xaos takes care of defining NDEBUG itself |
| 16 # src dir - so we copy src -> build | 26 NACLPORTS_CFLAGS="${NACLPORTS_CFLAGS/-DNDEBUG/}" |
| 17 ChangeDir ${SRC_DIR} | |
| 18 Remove ${BUILD_DIR} | |
| 19 local tmp=${SRC_DIR}.tmp | |
| 20 Remove ${tmp} | |
| 21 cp -r ${SRC_DIR} ${tmp} | |
| 22 mv ${tmp} ${BUILD_DIR} | |
| 23 | 27 |
| 24 ChangeDir ${BUILD_DIR} | |
| 25 echo "running autoconf" | 28 echo "running autoconf" |
| 26 LogExecute rm ./configure | 29 LogExecute rm ./configure |
| 27 LogExecute autoconf | 30 LogExecute autoconf |
| 28 | 31 |
| 29 # xaos takes case of defining NDEBUG itself | |
| 30 NACLPORTS_CFLAGS="${NACLPORTS_CFLAGS/-DNDEBUG/}" | |
| 31 NACLPORTS_LDFLAGS+=" -Wl,--undefined=PPP_GetInterface \ | |
| 32 -Wl,--undefined=PPP_ShutdownModule \ | |
| 33 -Wl,--undefined=PPP_InitializeModule \ | |
| 34 -Wl,--undefined=original_main" | |
| 35 | |
| 36 export LIBS="-lppapi -lpthread -l${NACL_CXX_LIB} -lm" | |
| 37 SetupCrossEnvironment | 32 SetupCrossEnvironment |
| 38 LogExecute ./configure --with-png=no --with-long-double=no \ | 33 LogExecute ./configure --with-png=no --with-long-double=no \ |
| 39 --host=nacl --with-x11-driver=no --with-sffe=no | 34 --host=nacl --with-x11-driver=no --with-sffe=no |
| 40 } | 35 } |
| 41 | 36 |
| 42 BuildStep() { | 37 BuildStep() { |
| 43 SetupCrossEnvironment | 38 SetupCrossEnvironment |
| 44 DefaultBuildStep | 39 DefaultBuildStep |
| 45 } | 40 } |
| 46 | 41 |
| 47 InstallStep(){ | 42 InstallStep() { |
| 43 return |
| 44 } |
| 45 |
| 46 PublishStep() { |
| 48 MakeDir ${PUBLISH_DIR} | 47 MakeDir ${PUBLISH_DIR} |
| 49 install ${START_DIR}/xaos.html ${PUBLISH_DIR} | 48 LogExecute install ${START_DIR}/xaos.html ${PUBLISH_DIR} |
| 50 install ${START_DIR}/xaos.nmf ${PUBLISH_DIR} | 49 LogExecute install ${BUILD_DIR}/bin/xaos \ |
| 51 # Not used yet | 50 ${PUBLISH_DIR}/xaos_${NACL_ARCH}${NACL_EXEEXT} |
| 52 install ${BUILD_DIR}/help/xaos.hlp ${PUBLISH_DIR} | 51 LogExecute install ${BUILD_DIR}/help/xaos.hlp ${PUBLISH_DIR} |
| 53 install ${BUILD_DIR}/bin/xaos ${PUBLISH_DIR}/xaos_${NACL_ARCH}${NACL_EXEEXT} | 52 ChangeDir ${PUBLISH_DIR} |
| 53 LogExecute python ${NACL_SDK_ROOT}/tools/create_nmf.py \ |
| 54 xaos*${NACL_EXEEXT} -s . -o xaos.nmf |
| 54 } | 55 } |
| OLD | NEW |