compile_extension.sh 369 B

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