
export prefix=/usr/local
export milena_dir=$(prefix)/share/milena
export mbrola=$(shell which mbrola)
export mbrola_voice=$(shell ./find_mbrola_voice)
export speechd_dir=$(shell ./find_speechd)
export distro=$(shell uname -o)
export contrast=$(shell ./have_contrast)
all:
ifeq "$(mbrola_voice)" "none"
$(error Nie odnaleziono pl1/pl1)
endif
	make -C src all
	make -C utils all
	make -C speechd all
	make -C milena_ws all

clean:
	rm found_voice
	make -C src clean
	make -C utils clean
	make -C speechd clean
	make -C milena_ws clean
		
install:
	mkdir -p $(milena_dir)
	cp data/*.dat $(milena_dir)
	make -C src install
	ldconfig
	make -C utils install
	make -C speechd install
	make -C milena_ws install
