# FLAC Plugin for GameMusicGear by gama
#   Based on LibFLAC
#    2004,2005,2006,2007,2008 Josh Coalson.
#   And LibOGG
#    2002, Xiph.org Foundation

TARGET = in_flac

OBJS = in_flac.o

# Define to build this as a prx (instead of a static elf)
BUILD_PRX = 1
# Define the name of our custom exports (minus the .exp extension)
PRX_EXPORTS = ../Input_Exports.exp

CFLAGS = -O2 -G0 -Wall -funroll-loops -finline-functions -Winline \
         -DHAVE_CONFIG_H \
		 -DNDEBUG \
		 -DFLAC__INTEGER_ONLY_LIBRARY \
		 -DFLAC__LPC_UNROLLED_FILTER_LOOPS \
		 -DFLAC__HAS_OGG \
		 -DFLaC__INLINE=inline \

CXXFLAGS = $(CFLAGS) -fno-exceptions
ASFLAGS = $(CFLAGS)

LDFLAGS = -mno-crt0 -nostartfiles

LIBS = -lflac -logg -ltaglib  \
	   -lconfig \
	   -lz -lstdc++

INCDIR = ../SharedLib/taglib ../SharedLib/taglib/flac \
	     ../SharedLib/taglib/ogg ../SharedLib/taglib/ogg/flac \
		 ../SharedLib/taglib/toolkit ../SharedLib/libflac/global_include
LIBDIR = ../SharedLib/taglib ../Sharedlib/libconfig

all: exports $(TARGET).prx

exports:
	psp-build-exports -s ../Input_Exports.exp

PSPSDK = $(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
