#!/bin/bash
exec cc -Wall -fPIC -shared -O2 -fomit-frame-pointer -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -fstack-protector-all -march=rv64imafdc -mabi=lp64d -fPIC -L/usr/lib64 -fno-strict-aliasing -Wno-incompatible-pointer-types \
    -I. `/usr/bin/php8-config --includes` \
    -I/usr/include/libxml2 \
    -I/usr/include/freetype \
    -I/usr/include/openssl \
    -I/usr/src/php8-devel/ext \
    -I/usr/include/$1 \
    $4 $2 -o $1.so $3 -lc
