#!/usr/bin/make -f


%:
	dh $@

override_dh_auto_build:
	cd ScorchcrafterGUI/dpf/dgl && make
	cd ScorchcrafterGUI/dpf/utils/ && python ./png2rgba.py DistrhoArtworkScorch ../../plugins/Scorch/artwork
	cp ScorchcrafterGUI/dpf/utils/DistrhoArtworkScorch.cpp ScorchcrafterGUI/plugins/Scorch
	cp ScorchcrafterGUI/dpf/utils/DistrhoArtworkScorch.hpp ScorchcrafterGUI/plugins/Scorch
	cd ScorchcrafterGUI/plugins/Scorch/Guitar_Amplifier_Heads && g++ -fPIC -O3 -c -ffast-math -finline-functions -fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fno-trapping-math -fno-signed-zeros -fno-rtti -fno-exceptions -Wno-write-strings -Wno-narrowing -I../ -DSCRFT_STATIC -DSCORCHCRAFTER_USE_NONSTANDARD_OR_NO_GUI -DSCORCHCRAFTER_COMPILE_64 JykWrakker.cpp -o ../scorchcrafter.o
	cd ScorchcrafterGUI/plugins/Scorch && make
	chmod +x ScorchcrafterGUI/bin/lvmake
	./ScorchcrafterGUI/bin/lvmake ./ScorchcrafterGUI/bin/Scorch.lv2/Scorch_dsp.so

override_dh_auto_install:
	mv *.ttl ScorchcrafterGUI/bin/Scorch.lv2/
	ls -laR
	dh_auto_install
