#!/bin/sh
make extraclean
make \
    configure='--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-modules --without-libotf --without-m17n-flt --without-gconf --enable-link-time-optimization --with-native-compilation=aot --with-xinput2 --with-pgtk --without-xaw3d --with-sound=alsa --with-tree-sitter --program-transform-name=s/\([ec]tags\)/\1.emacs/' \
    CFLAGS='-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection' \
    LDFLAGS='-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' || exit 125
