compile_extension.sh 372 B

123456789101112131415161718
  1. #!/bin/bash
  2. set -ex
  3. cd $(dirname $0)
  4. if [ "$1" = "--release" ]; then
  5. CFLAGS="-Wall"
  6. else
  7. # To get debugging symbols in PHP itself, build PHP with:
  8. # $ ./configure --enable-debug CFLAGS='-g -O0'
  9. CFLAGS="-g -O0 -Wall"
  10. fi
  11. pushd ../ext/google/protobuf
  12. make clean || true
  13. phpize && ./configure --with-php-config=$(which php-config) CFLAGS="$CFLAGS" && make
  14. popd