LIBNAME=$(OUTDIR)/libavbin.$(AVBIN_VERSION).dylib

CFLAGS += -O3 -mmacosx-version-min=10.3.9
LDFLAGS += -dylib \
           -read_only_relocs suppress \
           -single_module \
           -install_name /usr/local/lib/libavbin.dylib

STATIC_LIBS = $(FFMPEG)/libavformat/libavformat.a \
              $(FFMPEG)/libavcodec/libavcodec.a \
              $(FFMPEG)/libavutil/libavutil.a

LIBS = -lSystem \
       -lz \
       -L/usr/lib/gcc/i686-apple-darwin9/4.0.1 -lgcc

$(LIBNAME) : $(OBJNAME) $(OUTDIR)
	$(LD) $(LDFLAGS) -o $@ $< $(STATIC_LIBS) $(LIBS)
