OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 # | 5 # |
6 # | 6 # |
7 # nacl-mounts.sh | 7 # nacl-mounts.sh |
8 # | 8 # |
9 # usage: ./nacl-mounts.sh | 9 # usage: ./nacl-mounts.sh |
10 # | 10 # |
(...skipping 21 matching lines...) Expand all Loading... |
32 return | 32 return |
33 fi | 33 fi |
34 | 34 |
35 if [ ${NACL_ARCH} = "pnacl" ]; then | 35 if [ ${NACL_ARCH} = "pnacl" ]; then |
36 echo "FIXME: Not running sel_ldr-based tests with PNaCl." | 36 echo "FIXME: Not running sel_ldr-based tests with PNaCl." |
37 return | 37 return |
38 fi | 38 fi |
39 | 39 |
40 export CC=${NACLCC} | 40 export CC=${NACLCC} |
41 export CXX=${NACLCXX} | 41 export CXX=${NACLCXX} |
42 export CFLAGS="-I${NACL_SDK_USR_INCLUDE} -I${NACL_SDK_ROOT}/include" | 42 export CFLAGS="${NACLPORTS_CFLAGS} -I${NACL_SDK_ROOT}/include" |
43 | |
44 LDFLAGS=-L${NACL_SDK_USR_LIB} | |
45 if [ $NACL_GLIBC != "1" ] ; then | |
46 LDFLAGS="${LDFLAGS}" | |
47 fi | |
48 export LDFLAGS | |
49 | 43 |
50 MakeDir ${PACKAGE_DIR}/test.nacl | 44 MakeDir ${PACKAGE_DIR}/test.nacl |
51 ChangeDir ${PACKAGE_DIR}/test.nacl | 45 ChangeDir ${PACKAGE_DIR}/test.nacl |
52 make -f ${START_DIR}/test.nacl/Makefile | 46 make -f ${START_DIR}/test.nacl/Makefile |
53 | 47 |
54 RunSelLdrCommand ${PACKAGE_DIR}/test.nacl/nacl_mounts_sel_ldr_tests | 48 RunSelLdrCommand ${PACKAGE_DIR}/test.nacl/nacl_mounts_sel_ldr_tests |
55 } | 49 } |
56 | 50 |
57 CustomBuildStep() { | 51 CustomBuildStep() { |
58 Banner "Building ${PACKAGE_NAME}" | 52 Banner "Building ${PACKAGE_NAME}" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 SocketSubSystem.o \ | 121 SocketSubSystem.o \ |
128 BufferMount.o | 122 BufferMount.o |
129 | 123 |
130 ${NACLRANLIB} libnacl-mounts.a | 124 ${NACLRANLIB} libnacl-mounts.a |
131 set +x | 125 set +x |
132 } | 126 } |
133 | 127 |
134 CustomInstallStep() { | 128 CustomInstallStep() { |
135 Banner "Installing ${PACKAGE_NAME}" | 129 Banner "Installing ${PACKAGE_NAME}" |
136 export PACKAGE_DIR="${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}" | 130 export PACKAGE_DIR="${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}" |
137 cp ${PACKAGE_DIR}/libnacl-mounts.a ${NACL_SDK_USR_LIB} | 131 cp ${PACKAGE_DIR}/libnacl-mounts.a ${NACLPORTS_LIBDIR} |
138 mkdir -p ${NACL_SDK_USR_LIB}/nacl-mounts/util | 132 mkdir -p ${NACLPORTS_LIBDIR}/nacl-mounts/util |
139 cp ${START_DIR}/console/console.js ${NACL_SDK_USR_LIB}/nacl-mounts | 133 cp ${START_DIR}/console/console.js ${NACLPORTS_LIBDIR}/nacl-mounts |
140 cp ${START_DIR}/http2/genfs.py ${NACL_SDK_USR_LIB}/nacl-mounts/util | 134 cp ${START_DIR}/http2/genfs.py ${NACLPORTS_LIBDIR}/nacl-mounts/util |
141 | 135 |
142 # GLibC toolchain has termio.h so don't copy stub header. | 136 # GLibC toolchain has termio.h so don't copy stub header. |
143 if [[ $NACL_GLIBC = 0 ]]; then | 137 if [[ $NACL_GLIBC = 0 ]]; then |
144 cp ${START_DIR}/console/termio.h ${NACL_SDK_USR_INCLUDE} | 138 cp ${START_DIR}/console/termio.h ${NACLPORTS_INCLUDE} |
145 fi | 139 fi |
146 | 140 |
147 mkdir -p ${NACL_SDK_USR_INCLUDE}/nacl-mounts | 141 mkdir -p ${NACLPORTS_INCLUDE}/nacl-mounts |
148 for DIR in console base util memory net http2 AppEngine pepper buffer; do | 142 for DIR in console base util memory net http2 AppEngine pepper buffer; do |
149 mkdir -p ${NACL_SDK_USR_INCLUDE}/nacl-mounts/${DIR} | 143 mkdir -p ${NACLPORTS_INCLUDE}/nacl-mounts/${DIR} |
150 cp ${START_DIR}/${DIR}/*.h ${NACL_SDK_USR_INCLUDE}/nacl-mounts/${DIR} | 144 cp ${START_DIR}/${DIR}/*.h ${NACLPORTS_INCLUDE}/nacl-mounts/${DIR} |
151 done | 145 done |
152 mkdir -p ${NACL_SDK_USR_INCLUDE}/nacl-mounts/ppapi/cpp/private | 146 mkdir -p ${NACLPORTS_INCLUDE}/nacl-mounts/ppapi/cpp/private |
153 mkdir -p ${NACL_SDK_USR_INCLUDE}/nacl-mounts/ppapi/c/private | 147 mkdir -p ${NACLPORTS_INCLUDE}/nacl-mounts/ppapi/c/private |
154 cp -R ${START_DIR}/ppapi/cpp/private/*.h \ | 148 cp -R ${START_DIR}/ppapi/cpp/private/*.h \ |
155 ${NACL_SDK_USR_INCLUDE}/nacl-mounts/ppapi/cpp/private/ | 149 ${NACLPORTS_INCLUDE}/nacl-mounts/ppapi/cpp/private/ |
156 cp -R ${START_DIR}/ppapi/c/private/*.h \ | 150 cp -R ${START_DIR}/ppapi/c/private/*.h \ |
157 ${NACL_SDK_USR_INCLUDE}/nacl-mounts/ppapi/c/private/ | 151 ${NACLPORTS_INCLUDE}/nacl-mounts/ppapi/c/private/ |
158 } | 152 } |
159 | 153 |
160 CustomPackageInstall() { | 154 CustomPackageInstall() { |
161 # RunTests | 155 # RunTests |
162 DefaultPreInstallStep | 156 DefaultPreInstallStep |
163 CustomBuildStep | 157 CustomBuildStep |
164 CustomInstallStep | 158 CustomInstallStep |
165 DefaultCleanUpStep | 159 DefaultCleanUpStep |
166 DefaultTouchStep | 160 DefaultTouchStep |
167 RunSelLdrTests | 161 RunSelLdrTests |
168 } | 162 } |
169 | 163 |
170 CustomPackageInstall | 164 CustomPackageInstall |
171 exit 0 | 165 exit 0 |
OLD | NEW |