# Makefile for FbaDecoder
# @authors  Prashanth Gujjeti (prashanth.gujjeti@sun.com)
# @ 03/27/2003

#
# Include path
#
INCLUDE_PATH=-I. -I./../Include  -I./../Decoder -I./../Core
CC = CC 
DEBUG_FLAG = -g
#Sources
SOURCES:sh = ls *.cpp  
SOURCES1:sh = ls *.c 
OBJ1=${SOURCES1:%.c=%.o} 
OBJS=${SOURCES:%.cpp=%.o} 
#
# TARGET
#

TARGET=../../library_player3d/libFbaDecoder.so

all: ${TARGET} 
$(TARGET):${OBJ1} ${OBJS} thread
	$(CC) -o ../../library_player3d/libFbaDecoder.so -G -KPIC -L./../../library_player3d -lztl ${OBJ1} ${OBJS} ../Include/thread_utils.o ../Decoder/Decoder.o

%.o:%.cpp
	$(CC)  $(INCLUDE_PATH) $(DEBUG_FLAG) -c -DPLAYER3D -DADV_AUDIO -KPIC  $?
%.o:%.c
	$(CC)  $(INCLUDE_PATH) $(DEBUG_FLAG) -c -DPLAYER3D -DADV_AUDIO -KPIC  $?

thread: ../Include/thread_utils.cpp
	$(CC)  $(INCLUDE_PATH) $(DEBUG_FLAG) -c -KPIC  ../Include/thread_utils.cpp -o ../Include/thread_utils.o

clean:
	rm -rf *.o ../../library_player3d/libFbaDecoder.so
