include Makefile.cfg

all :
	make -C src

clean :
	make clean -C src
	rm -rf dist

install : all
ifeq ($(PLATFORM_LINUX), Y)
	cp -Rf dist/* $(INSTALLDIR)
	ldconfig
else
ifeq ($(PLATFORM_PSPDEV), Y)
	rm -rf dist/include
	rm -rf dist/lib
	mkdir -p dist/psp/game
	cp -Rf dist/bin/xynth dist/psp/game
ifeq ($(PSP-VERSION), 1.5)
	cp -Rf dist/bin/xynth% dist/psp/game
endif
	rm -rf dist/bin
endif
endif

test: clean all install

pspdev:
	mount /mnt/sdb1
	cp -Rf dist/psp/game/xynth* /mnt/sdb1/psp/game/
	cp -Rf dist/share /mnt/sdb1/
	umount /mnt/sdb1
