RSS Git Download  Clone
Raw Blame History
################################################################################
#	Makefile	For tmsSigGen utility
#			T.Barnaby,	BEAM Ltd,	2006-12-07
################################################################################
#

TOP	= $(shell pwd)/..

include ${TOP}/Makefile.config

# Main bits
VERSION 	= 0.1.0

PROGS		= tmsSigGen tmsSigGenGui
OBJS1		= main.o Da8150.o Tests.o
OBJS2		= mainGui.o Gui.o Gui.mo AppGui.o AppGui.mo Da8150.o Tests.o
LDLIBS		:= -lTms ${LDLIBS}

ifeq ("$(TARGET)", "fc6")
	LDLIBS	:= -lda8150 ${LDLIBS}
	CXXFLAGS	+= -DHAVE_GETIFADDRS -DHAVE_DA8150
endif

LDLIBS1		= ${LDLIBS}
LDLIBS2		:= -lqt-mt ${LDLIBS1}

#DEBUGFLAGS	= -g -pg
#DEBUGFLAGS	= -O2 -g

.PHONY: dox

# QT Applications
.SUFFIXES: .mo .ui

.h.mo:
	$(MOC) -o $@.cpp $<
	$(CXX) $(CXXFLAGS) -c -o $@ $@.cpp
#	rm -f $@.cpp

%.h: %.ui
	uic $< -o $@

%.cpp: %.ui
	uic -impl $*.h $< -o $@

MOC		= $(QTDIR)/bin/moc
#CXXFLAGS	+= -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
CXXFLAGS	+= -I$(QTDIR)/include
CXXFLAGS	+= -Wno-non-virtual-dtor
LDFLAGS		+= -L$(QTDIR)/lib

all:	$(PROGS)


clean:
	rm -f *.o *.mo *.mo.cpp *~ *.txt *.psd $(PROGS)

includes:

install:	includes all
	mkdir -p $(BINDIR)
	cp $(PROGS) $(BINDIR)
	mkdir -p $(DESKTOPDIR)
	cp tmsSigGen.desktop $(DESKTOPDIR)
	mkdir -p $(ICONSDIR)
	cp tmsSigGen.png $(ICONSDIR)

depend:
	makedepend -fMakefile.depend -Y -I. *.cpp


tmsSigGen:	$(OBJS1)
	$(CXX) $(LDFLAGS) -o tmsSigGen $(OBJS1) $(LDLIBS1)

tmsSigGenGui:	$(OBJS2)
	$(CXX) $(LDFLAGS) -o tmsSigGenGui $(OBJS2) $(LDLIBS2)

fpgaSignals:
	tmsSigGen -t beam1 -s 125000000 -p 4 -c 0 -i 1 -o beam1-437000-8-sigma.txt
	tmsSigGen -t beam1 -s 125000000 -p 4 -c 1 -i 1 -o beam1-437000-8-deltax.txt
	tmsSigGen -t beam1 -s 125000000 -p 4 -c 2 -i 1 -o beam1-437000-8-deltay.txt
	tmsSigGen -t beam1 -s 125000000 -p 4 -b beam1-437000-8.psd

	tmsSigGen -t beam2 -s 125000000 -p 4 -c 0 -i 1 -o beam2-437000-8-sigma.txt
	tmsSigGen -t beam2 -s 125000000 -p 4 -c 1 -i 1 -o beam2-437000-8-deltax.txt
	tmsSigGen -t beam2 -s 125000000 -p 4 -c 2 -i 1 -o beam2-437000-8-deltay.txt
	tmsSigGen -t beam2 -s 125000000 -p 4 -b beam2-437000-8.psd

	tmsSigGen -t beam3 -s 125000000 -p 4 -c 0 -i 1 -o beam3-437000-8-sigma.txt
	tmsSigGen -t beam3 -s 125000000 -p 4 -c 1 -i 1 -o beam3-437000-8-deltax.txt
	tmsSigGen -t beam3 -s 125000000 -p 4 -c 2 -i 1 -o beam3-437000-8-deltay.txt
	tmsSigGen -t beam3 -s 125000000 -p 4 -b beam3-437000-8.psd

test:
	tmsSigGen -t beam3 -s 150000000 -p 4 -o d.txt

t1:	t1.o 
	$(CXX) $(LDFLAGS) -o t1 t1.o $(LDLIBS1)

include Makefile.depend