prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
mandir = @mandir@

all:	config.log bin/gtkwave bin/mvl2vcd bin/tex2vcd bin/mvl2lxt bin/vcd2lxt bin/vcd2lxt2 bin/lxt2vcd

config.log:
	./configure;

clean:	
	cd src;make clean;cd helpers;make clean

install:
	cd bin;\
	install -m 0755 gtkwave  $(bindir)/gtkwave;\
	install -m 0755 mvl2vcd  $(bindir)/mvl2vcd;\
	install -m 0755 mvl2lxt  $(bindir)/mvl2lxt;\
	install -m 0755 tex2vcd  $(bindir)/tex2vcd;\
	install -m 0755 vcd2lxt  $(bindir)/vcd2lxt;\
	install -m 0755 vcd2lxt2 $(bindir)/vcd2lxt2;\
	install -m 0755 lxt2vcd  $(bindir)/lxt2vcd;\
	cd ../man;\
	install -m 0644 gtkwave.1 $(mandir)/man1/gtkwave.1;\
	install -m 0644 lxt2vcd.1 $(mandir)/man1/lxt2vcd.1;\
	install -m 0644 mvl2lxt.1 $(mandir)/man1/mvl2lxt.1;\
	install -m 0644 mvl2vcd.1 $(mandir)/man1/mvl2vcd.1;\
	install -m 0644 tex2vcd.1 $(mandir)/man1/tex2vcd.1;\
	install -m 0644 vcd2lxt.1 $(mandir)/man1/vcd2lxt.1;\
	install -m 0644 vcd2lxt2.1 $(mandir)/man1/vcd2lxt2.1

dist:
	make clean
	rm -f config.* Makefile src/Makefile src/helpers/Makefile

bin/gtkwave:
	# Compiling GTKWave...
	cd src;make all

bin/mvl2vcd:
	# Compiling mvl2vcd/tex2vcd...
	cd src/helpers;make all

bin/mvl2lxt:
	# Compiling mvl2vcd/tex2vcd...
	cd src/helpers;make all

bin/tex2vcd:
	# Compiling tex2vcd/mvl2vcd...
	cd src/helpers;make all

bin/vcd2lxt:
	# Compiling tex2vcd/mvl2vcd...
	cd src/helpers;make all

bin/vcd2lxt2:
	# Compiling tex2vcd/mvl2vcd...
	cd src/helpers;make all

bin/lxt2vcd:
	# Compiling tex2vcd/mvl2vcd...
	cd src/helpers;make all

