PRAAT = praat
UNAME := $(shell uname -s)

ifeq ($(UNAME), Darwin)
PRAAT = /Applications/Praat.app/Contents/MacOS/Praat
endif

all: PraatDemoFrameexpanded.h manual_PraatDemoFrame.cpp
	bash makePraat.sh 2>&1
	bash makePraat.sh MinGW 2>&1

PraatDemoFrameexpanded.praat: ../*.praat
	perl ./expandPraatScripts.pl ../praatdemoframe.praat > PraatDemoFrameexpanded.praat
	perl ./WhatsNew.pl

%.h: %.praat
	perl ./praatscript2cprogram.pl $<  > $@

manual_PraatDemoFrame.cpp: ../ManPages/*.man
	perl ManPages2CPP.pl ../ManPages/*.man > manual_PraatDemoFrame.cpp

clean:
	rm -f *expanded.h
	rm -f *expanded.praat
	rm -f *ManPages.cpp
