################################################################################
#	Makefile	For tmsStateGen utility
#			T.Barnaby,	BEAM Ltd,	2007-03-14
################################################################################
#
TOP	= $(shell pwd)/..
include ${TOP}/Makefile.config
# Main bits
VERSION 	= 0.1.0
PROGS		= tmsStateGen
OBJS1		= main.o Gen.o
LDLIBS		:= -lTms $(LDLIBS)
#DEBUGFLAGS	= -g -pg
DEBUGFLAGS	= -O2 -g
.PHONY: dox
all:	$(PROGS)
clean:
	rm -f *.o *.mo *.mo.cpp *~ *.txt $(PROGS) SimBeam3Delay_0_0.spt
includes:
install:	includes all
	mkdir -p $(BINDIR)
	cp $(PROGS) $(BINDIR)
depend:
	makedepend -fMakefile.depend -Y -I. *.cpp
tmsStateGen:	$(OBJS1)
	$(CXX) $(LDFLAGS) -o tmsStateGen $(OBJS1) $(LDLIBS)
test:
#	./tmsStateGen -t Beam1 -p state.spt
	./tmsStateGen -t Beam3Delay -fd 0 -fref 437063 -phaseDelayAll 381 -name SimBeam3-Delay -info "For simulated data with delay state." SimBeam3Delay_0_0.spt
kst:
	kst -m 1 -y 1 -y 2 -y 3 -y 4 -y 5 -y 6 phaseTable3.txt
include Makefile.depend