blob: e2aab28b4bcf47b9d9fe2ed337a30b162bba9ebd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
#
cd $WRKSRC
#
# If this is FreeBSD 2.2 or later, this will work. Older FreeBSD versions
# will set CFLAGS to "". Life's a bitch.
#
CFLAGS=`make -V CFLAGS echo` || echo "*** Ignore this error"
if [ X"$CFLAGS" = X ] ; then
CFLAGS="-O2 -fno-strength-reduce"
fi
echo "Setting CFLAGS to \"$CFLAGS\""
sed -e "s/%CFLAGS%/${CFLAGS}/" makefile >makefile.new
mv -f makefile makefile.orig2
mv -f makefile.new makefile
|