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=src/dosbox${NACL_EXEEXT} | 5 EXECUTABLES=src/dosbox${NACL_EXEEXT} |
6 MAKE_TARGETS="AR=${NACLAR}" | 6 MAKE_TARGETS="AR=${NACLAR}" |
7 | 7 |
8 ConfigureStep() { | 8 ConfigureStep() { |
9 SetupCrossEnvironment | 9 SetupCrossEnvironment |
10 | 10 |
11 local conf_host=${NACL_CROSS_PREFIX} | 11 CONFIG_FLAGS="--host=${CONF_HOST} --build=${CONF_BUILD} \ |
12 if [ ${NACL_ARCH} = "pnacl" ]; then | |
13 # The PNaCl tools use "pnacl-" as the prefix, but config.sub | |
14 # does not know about "pnacl". It only knows about "le32-nacl". | |
15 # Unfortunately, most of the config.subs here are so old that | |
16 # it doesn't know about that "le32" either. So we just say "nacl". | |
17 conf_host="nacl" | |
18 fi | |
19 | |
20 CONFIG_FLAGS="--host=${conf_host} \ | |
21 --prefix=${PREFIX} \ | 12 --prefix=${PREFIX} \ |
22 --with-sdl-prefix=${NACL_TOOLCHAIN_ROOT} \ | 13 --with-sdl-prefix=${NACL_TOOLCHAIN_ROOT} \ |
23 --disable-shared \ | 14 --disable-shared \ |
24 --with-sdl-exec-prefix=${NACL_TOOLCHAIN_ROOT}" | 15 --with-sdl-exec-prefix=${NACL_TOOLCHAIN_ROOT}" |
25 | 16 |
26 # TODO(clchiou): Sadly we cannot export LIBS and LDFLAGS to configure, which | 17 # TODO(clchiou): Sadly we cannot export LIBS and LDFLAGS to configure, which |
27 # would fail due to multiple definitions of main and missing pp::CreateModule. | 18 # would fail due to multiple definitions of main and missing pp::CreateModule. |
28 # So we patch auto-generated Makefile after running configure. | 19 # So we patch auto-generated Makefile after running configure. |
29 export PPAPI_LIBS="" | 20 export PPAPI_LIBS="" |
30 export LIBS="-lnacl_io" | 21 export LIBS="-lnacl_io" |
(...skipping 12 matching lines...) Expand all Loading... |
43 LogExecute install ${START_DIR}/dosbox.html ${PUBLISH_DIR} | 34 LogExecute install ${START_DIR}/dosbox.html ${PUBLISH_DIR} |
44 LogExecute install src/dosbox${NACL_EXEEXT} \ | 35 LogExecute install src/dosbox${NACL_EXEEXT} \ |
45 ${PUBLISH_DIR}/dosbox_${NACL_ARCH}${NACL_EXEEXT} | 36 ${PUBLISH_DIR}/dosbox_${NACL_ARCH}${NACL_EXEEXT} |
46 local CREATE_NMF="${NACL_SDK_ROOT}/tools/create_nmf.py" | 37 local CREATE_NMF="${NACL_SDK_ROOT}/tools/create_nmf.py" |
47 LogExecute ${CREATE_NMF} -s ${PUBLISH_DIR} ${PUBLISH_DIR}/dosbox_*${NACL_EXEEX
T} -o ${PUBLISH_DIR}/dosbox.nmf | 38 LogExecute ${CREATE_NMF} -s ${PUBLISH_DIR} ${PUBLISH_DIR}/dosbox_*${NACL_EXEEX
T} -o ${PUBLISH_DIR}/dosbox.nmf |
48 | 39 |
49 if [ "${NACL_ARCH}" = "pnacl" ]; then | 40 if [ "${NACL_ARCH}" = "pnacl" ]; then |
50 sed -i.bak 's/x-nacl/x-pnacl/' ${PUBLISH_DIR}/dosbox.html | 41 sed -i.bak 's/x-nacl/x-pnacl/' ${PUBLISH_DIR}/dosbox.html |
51 fi | 42 fi |
52 } | 43 } |
OLD | NEW |