File: nodebug.sh

package info (click to toggle)
sdlgfx 2.0.9-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,012 kB
  • ctags: 288
  • sloc: ansic: 10,471; sh: 7,935; makefile: 85
file content (23 lines) | stat: -rwxr-xr-x 442 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

#
# Remove the '-g' debug flag from Makefiles to build release versions
# of the libraries in one go.
#
# Run after './configure' and before 'make'.
#

echo "Removing debug flags from Makefile."
echo

TARGET="Makefile"

if [ "$1" != "" ]; then
 TARGET="$1"
fi

for i in `find . -name "$TARGET" -print`; do
 echo "Patching $i ..."
 cat $i | sed 's/-g -O2/-O2 -Wl,-s/' | sed 's/-shared/-shared -Wl,-s/' >$i.new
 cp -f $i.new $i
done