BASE_DIR = ../..
include $(BASE_DIR)/include.mak

TARGET=VIS_Sample

OBJS = VisSample.o dummyimport.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=$(PLUGINS_DIR)/VIS_Exports.exp

INCDIR = ./ $(PLUGINS_DIR)/ $(PLUGINS_DIR)/Common
CFLAGS = $(GLOBAL_CFLAGS) -G0 -O0 -g -Wall $(SET_F)
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS += -mno-crt0 -nostartfiles
LIBS =

all: $(TARGET).prx

make_in_pspradio_repo:
	cp ../VIS_Plugin.h ../VIS_Exports.exp .
	make all clean_objs
	mkdir -p ../../release/PSPRadio/Sample_Visualizer_Sources
	cp -vf * ../../release/PSPRadio/Sample_Visualizer_Sources
	rm VIS_Plugin.h VIS_Exports.exp

clean_objs:
	rm -Rf *.o *.elf 

clobber:
	rm -Rf *.o *.elf *.prx

install: all
	cp -vf *.prx $(PSPRADIO_RELEASE_DIR)

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