bin_PROGRAMS = oggSplit oggDump oggJoin oggCut oggLength oggCat

SRC_CORE = mediaUnit.cpp mediaRepository.cpp fileRepository.cpp rawMediaPacket.cpp \
           mediaDecoder.cpp mediaEncoder.cpp mediaConverter.cpp \
           oggDecoder.cpp oggStreamDecoder.cpp \
           oggPage.cpp oggPacket.cpp ringbuffer.cpp oggRingbuffer.cpp crc.cpp \
           granulePosInterpreter.cpp mediaOutputDecoder.cpp mediaInputEncoder.cpp \
           streamSerializer.cpp oggBOSExtractorFactory.cpp \
           oggStreamEncoder.cpp oggEncoder.cpp streamExtractor.cpp streamParameter.cpp \
           streamMux.cpp bufferRepository.cpp oggComment.cpp

SRC_ADDITIONAL = cmdlineextractor.cpp basePlane.cpp rgbPlane.cpp blendElement.cpp

SRC_OUTPUT = SDLvideoOutput.cpp

# Theora independed information
SRC_THEORA_INDEP = theoraPosInterpreter.cpp theoraStreamParameter.cpp theoraExtractor.cpp
SRC_THEORA_DEP =  theoraDecoder.cpp theoraEncoder.cpp

HDR_THEORA = theoraHeader.h

SRC_VORBIS_INDEP = vorbisPosInterpreter.cpp vorbisStreamParameter.cpp vorbisExtractor.cpp
# SRC_VORBIS_DEP = vorbisDecoder.cpp audioPacket.cpp

SRC_VORBIS_DEP = vorbisDecoder.cpp vorbisEncoder.cpp audioPacket.cpp audioConverter.cpp

HDR_VORBIS = vorbisHeader.h

SRC_KATE_INDEP = katePosInterpreter.cpp kateStreamParameter.cpp kateExtractor.cpp

SRC_SDL = SDLvideoOutput.cpp
HDR_SDL = SDLvideoOutput.h

LIBRESAMPLE = libresample/filterkit.c libresample/resample.c libresample/resamplesubs.c

EFFECTORS =  effector.cpp crossfader.cpp plainPicture.cpp lowpassEffect.cpp kenburnseffect.cpp \
	pictureResize.cpp pictureBlend.cpp pictureLoader.cpp

HOOKS = hookHandler.cpp videoHook.cpp audioHook.cpp

ADDHEADERS = refObject.h definition.h oggHeader.h oggTypes.h audioPacket.h \
             streamConfig.h $(HDR_VORBIS) $(HDR_THEORA)  $(HDR_SDL)

oggSplit_SOURCES = $(SRC_CORE) $(SRC_ADDITIONAL) $(SRC_THEORA_INDEP) $(SRC_VORBIS_INDEP) $(SRC_KATE_INDEP) oggSplit.cpp

oggDump_SOURCES = $(SRC_CORE) $(SRC_ADDITIONAL) $(SRC_THEORA_INDEP) $(SRC_VORBIS_INDEP) $(SRC_KATE_INDEP) oggDump.cpp

oggJoin_SOURCES = $(SRC_CORE) $(SRC_ADDITIONAL) $(SRC_THEORA_INDEP) $(SRC_VORBIS_INDEP) $(SRC_KATE_INDEP) oggJoin.cpp

oggCut_SOURCES = $(SRC_CORE) $(SRC_ADDITIONAL) $(SRC_THEORA_INDEP) $(SRC_VORBIS_INDEP) $(SRC_KATE_INDEP) oggCut.cpp

oggCat_SOURCES = $(SRC_CORE) $(SRC_THEORA_INDEP) $(SRC_VORBIS_INDEP) $(SRC_KATE_INDEP) $(SRC_THEORA_DEP) $(SRC_VORBIS_DEP) $(SRC_GD) $(LIBRESAMPLE) $(SRC_ADDITIONAL) $(EFFECTORS) $(HOOKS) oggCat.cpp
oggCat_CXXFLAGS = $(OGG_CFLAGS) $(THEORAENC_CFLAGS) $(THEORADEC_CFLAGS) $(VORBIS_CFLAGS) $(VORBISENC_CFLAGS) $(GD_CFLAGS)
oggCat_LDADD = $(OGG_LIBS) $(THEORAENC_LIBS) $(THEORADEC_LIBS) $(VORBIS_LIBS) $(VORBISENC_LIBS) $(GD_LIBS)

oggLength_SOURCES = $(SRC_CORE) $(SRC_ADDITIONAL) $(SRC_THEORA_INDEP) $(SRC_VORBIS_INDEP) $(SRC_KATE_INDEP) oggLength.cpp

if WANT_OGGSCROLL
bin_PROGRAMS += oggScroll
oggScroll_SOURCES = $(SRC_CORE) $(SRC_THEORA_INDEP) $(SRC_VORBIS_INDEP) $(SRC_THEORA_DEP) $(SRC_KATE_INDEP) $(SRC_SDL)  $(SRC_ADDITIONAL) oggScroll.cpp
oggScroll_CXXFLAGS = $(OGG_CFLAGS) $(VORBIS_CFLAGS) $(THEORAENC_CFLAGS) $(THEORADEC_CFLAGS) $(SDL_CFLAGS)
oggScroll_LDADD = $(OGG_LIBS) $(VORBIS_LIBS) $(THEORAENC_LIBS) $(THEORADEC_LIBS) $(SDL_LIBS)
endif

if WANT_OGGSLIDESHOW
bin_PROGRAMS += oggSlideshow
oggSlideshow_SOURCES = $(SRC_CORE) $(SRC_THEORA_INDEP) $(SRC_VORBIS_INDEP) $(SRC_KATE_INDEP) $(SRC_THEORA_DEP) $(SRC_GD) $(EFFECTORS) $(SRC_ADDITIONAL) oggSlideshow.cpp
oggSlideshow_CXXFLAGS = $(OGG_CFLAGS) $(THEORAENC_CFLAGS) $(THEORADEC_CFLAGS) $(GD_CFLAGS)
oggSlideshow_LDADD = $(OGG_LIBS) $(THEORAENC_LIBS) $(THEORADEC_LIBS) $(GD_LIBS)
endif

if WANT_OGGTHUMB
bin_PROGRAMS += oggThumb
oggThumb_SOURCES = $(SRC_CORE) $(SRC_THEORA_INDEP) $(SRC_VORBIS_INDEP) $(SRC_KATE_INDEP) $(SRC_THEORA_DEP) $(SRC_GD) $(EFFECTORS) $(SRC_ADDITIONAL) oggThumb.cpp
oggThumb_CXXFLAGS = $(OGG_CFLAGS) $(THEORAENC_CFLAGS) $(THEORADEC_CFLAGS) $(GD_CFLAGS)
oggThumb_LDADD = $(OGG_LIBS) $(THEORAENC_LIBS) $(THEORADEC_LIBS) $(GD_LIBS)
endif

if WANT_OGGRESIZE
bin_PROGRAMS += oggTranscode
oggTranscode_SOURCES = $(SRC_CORE) $(SRC_THEORA_INDEP) $(SRC_VORBIS_INDEP) $(SRC_KATE_INDEP) $(SRC_THEORA_DEP) $(SRC_VORBIS_DEP) $(SRC_GD) $(LIBRESAMPLE) $(SRC_ADDITIONAL) $(EFFECTORS) $(HOOKS) oggTranscode.cpp
oggTranscode_CXXFLAGS = $(OGG_CFLAGS) $(THEORAENC_CFLAGS) $(THEORADEC_CFLAGS) $(VORBIS_CFLAGS) $(VORBISENC_CFLAGS) $(GD_CFLAGS)
oggTranscode_LDADD = $(OGG_LIBS) $(THEORAENC_LIBS) $(THEORADEC_LIBS) $(VORBIS_LIBS) $(VORBISENC_LIBS) $(GD_LIBS)
endif

if WANT_OGGSILENCE
bin_PROGRAMS += oggSilence
oggSilence_SOURCES = $(SRC_CORE) $(SRC_THEORA_INDEP) $(SRC_VORBIS_INDEP) $(SRC_KATE_INDEP) $(SRC_VORBIS_DEP) $(LIBRESAMPLE) $(SRC_ADDITIONAL) oggSilence.cpp
oggSilence_CXXFLAGS = $(OGG_CFLAGS) $(VORBIS_CFLAGS) $(VORBISENC_CFLAGS)
oggSilence_LDADD = $(OGG_LIBS) $(VORBIS_LIBS) $(VORBISENC_LIBS)
endif

