-
Notifications
You must be signed in to change notification settings - Fork 6
/
mk-macosx
executable file
·32 lines (25 loc) · 1.08 KB
/
mk-macosx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
# Building on Mac OSX. Note: only compiles in OGG and MP3
# support if the libraries are already setup within libs/,
# otherwise omits them. To get an idea of how to build the
# libraries, see the 'mk-libmad-linux' and 'mk-tremor-linux'
# scripts. The only difference is that on Mac OSX the
# 'authgen.sh' line doesn't work, and you have to run
# './configure' instead. Also it might be necessary to run
# 'ranlib' on the resulting .a files.
CFLAGS="-DT_MACOSX -I/System/Library/Frameworks/Carbon.framework/Headers -fpascal-strings"
LIBS="-framework Carbon -framework CoreAudio"
xx=libs/macosx-libmad.a
[ -f $xx ] && {
CFLAGS="-DMP3_DECODE $CFLAGS"
LIBS="$LIBS $xx"
ranlib $xx # OSX is fussy if you copy .a files and insists you run 'ranlib' on them
}
xx=libs/macosx-libvorbisidec.a
[ -f $xx ] && {
CFLAGS="-DOGG_DECODE $CFLAGS"
LIBS="$LIBS $xx"
ranlib $xx # OSX is fussy if you copy .a files and insists you run 'ranlib' on them
}
CC="cc $CFLAGS -Wall -O3 -s $LIBS -lm -lpthread"
$CC sbagen.c -o sbagen || exit 1