OLD | NEW |
---|---|
(Empty) | |
1 #!/bin/bash | |
2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. | |
Sam Clegg
2014/02/18 23:39:31
2014
| |
3 # Use of this source code is governed by a BSD-style license that can be | |
4 # found in the LICENSE file. | |
5 | |
6 BUILD_DIR=${START_DIR} | |
7 | |
8 BuildStep() { | |
9 # The sample is built using the NaCl SDK common.mk system. | |
10 # We override $(OUTBASE) to force the build system to put | |
11 # all its artifacts in ${NACL_PACKAGES_REPOSITORY} rather | |
12 # than alongside the Makefile. | |
13 export OUTBASE=${SRC_DIR} | |
14 export NACLPORTS_INCLUDE | |
15 export NACLPORTS_PREFIX | |
16 export NACL_PACKAGES_PUBLISH | |
17 export NACL_SRC | |
18 export CFLAGS=${NACLPORTS_CFLAGS} | |
19 export CXXFLAGS=${NACLPORTS_CXXFLAGS} | |
20 export LDFLAGS=${NACLPORTS_LDFLAGS} | |
21 | |
22 MakeDir ${OUTBASE} | |
23 if [ "${NACL_GLIBC}" = "1" ]; then | |
24 MAKEFLAGS+=" TOOLCHAIN=glibc" | |
25 elif [ "${NACL_ARCH}" = "pnacl" ]; then | |
26 MAKEFLAGS+=" TOOLCHAIN=pnacl" | |
27 else | |
28 MAKEFLAGS+=" TOOLCHAIN=newlib" | |
29 fi | |
30 if [ "${NACL_DEBUG}" = "1" ]; then | |
31 MAKEFLAGS+=" CONFIG=Debug" | |
32 else | |
33 MAKEFLAGS+=" CONFIG=Release" | |
34 fi | |
35 if [ "${NACL_ARCH}" != "pnacl" ]; then | |
36 MAKEFLAGS+=" NACL_ARCH=${NACL_ARCH_ALT}" | |
37 fi | |
38 MAKEFLAGS+=" V=1" | |
39 export MAKEFLAGS | |
40 ChangeDir ${START_DIR} | |
41 DefaultBuildStep | |
Sam Clegg
2014/02/18 23:39:31
You should be able to just call BuildStep_SDKBuild
| |
42 } | |
OLD | NEW |