Skip to content

Instantly share code, notes, and snippets.

@shibukawa
Last active December 11, 2015 23:39
Show Gist options
  • Save shibukawa/4678257 to your computer and use it in GitHub Desktop.
Save shibukawa/4678257 to your computer and use it in GitHub Desktop.
Makefile for building oggenc/oggdec command.
TOPDIR := $(shell pwd)
LIBPOS := $(TOPDIR)/libs
RESULTPOS := $(TOPDIR)/result
LIBS := $(TOPDIR)/libs/lib
HEADERS := $(TOPDIR)/libs/include
build: libs/lib/libvorbis.a libs/lib/libiconv.a libs/lib/libintl.a result
cd vorbis-tools-1.4.0; ./configure --prefix=$(RESULTPOS) --enable-static --with-libiconv-prefix=$(LIBPOS) --without-curl --disable-shared --disable-ogg123 --disable-ogginfo --disable-vcut --disable-vorbiscomment --disable-oggtest --disable-vorbistest --disable-curltest --with-ogg=$(LIBPOS) --with-vorbis=$(LIBPOS) LDFLAGS="-mmacosx-version-min=10.6" --with-libintl-prefix=$(LIBPOS)
cd vorbis-tools-1.4.0; make;
build2:
cd vorbis-tools-1.4.0/oggdec; make
cd vorbis-tools-1.4.0/oggenc; gcc -fno-common -O4 -Wall -fsigned-char -ffast-math -g -O2 -mmacosx-version-min=10.6 -o oggenc oggenc.o audio.o encode.o platform.o resample.o skeleton.o -Wl,-framework -Wl,CoreFoundation -L$(LIBS) ../share/libutf8.a ../share/libgetopt.a -lvorbisenc -lvorbis -lm -logg -lintl -lc -liconv; cp oggenc $(RESULTPOS)/
cd vorbis-tools-1.4.0/oggdec; gcc -fno-common -O4 -Wall -fsigned-char -ffast-math -g -O2 -mmacosx-version-min=10.6 -L$(LIBS) -o oggdec oggdec.o -liconv ../share/libutf8.a ../share/libgetopt.a -lvorbisfile -lvorbis -lm -logg -lintl -liconv -Wl,-framework -Wl,CoreFoundation; cp oggdec $(RESULTPOS)/
libs/lib/libogg.a: libs
cd libogg-1.3.0; ./configure --enable-static --disable-shared --prefix=$(LIBPOS)
cd libogg-1.3.0; make; make install
libs/lib/libiconv.a: libs
cd libiconv-1.14; ./configure --enable-static --disable-shared --prefix=$(LIBPOS)
cd libiconv-1.14; make; make install
libs/lib/libvorbis.a: libs libs/lib/libogg.a
cd libvorbis-1.3.3; ./configure --enable-static --disable-shared --with-ogg-libraries=$(LIBS) --with-ogg-includes=$(HEADERS) --prefix=$(LIBPOS)
cd libvorbis-1.3.3; make; make install
libs/lib/libintl.a: libs
cd gettext-0.18.2; ./configure --disable-java --disable-native-java --enable-static --disable-shared --prefix=$(LIBPOS)
cd gettext-0.18.2; make; make install
result:
mkdir result
libs:
mkdir libs
wget:
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz
wget http://downloads.xiph.org/releases/vorbis/vorbis-tools-1.4.0.tar.gz
wget ftp://mirrors.kernel.org/gnu/libiconv/libiconv-1.14.tar.gz
wget ftp://mirrors.kernel.org/gnu/gettext/gettext-0.18.2.tar.gz
tar xvzf libogg-1.3.0.tar.gz
tar xvzf libvorbis-1.3.3.tar.gz
tar xvzf vorbis-tools-1.4.0.tar.gz
tar xvzf libiconv-1.14.tar.gz
tar xvzf gettext-0.18.2.tar.gz
clean:
cd libogg-1.3.0; make clean; make uninstall
cd libvorbis-1.3.3; make clean; make uninstall
cd libiconv-1.14; make clean; make uninstall
cd gettext-0.18.2; make clean; make uninstall
cd vorbis-tools-1.4.0; make clean
@shibukawa
Copy link
Author

run make (it become error) then make build2.

oggenc and oggdec commands built by this Makefile on 10.8 can't run on 10.6 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment