#
# Copyright (C) 2003 Klaus Frahm <frahm@irsamc.ups-tlse.fr>
# Quantware MIPS Center, Laboratoire de Physique Theorique
# University Paul Sabatier, Toulouse III
# 118, route de Narbonne, 31062 Toulouse Cedex 4 - FRANCE
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public Licens
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
# 
# 

######################################################################
#### compile options for g++ compiler, comment when swichting to icc
######################################################################
LIBCFLAGS=-O3 -c 
CFLAGS=-O3 -lm 
GCC=g++
######################################################################
#### compile options for the intel C++ compiler, icc, uncomment when using and
#### comment above options for g++
#### the option "-ipo" may give trouble with icc 9.0 on very recent systems 
#### based on gcc 4.x.y, in that case don't use this option 
#### or only "-ip" or not 
######################################################################
#LIBCFLAGS=-O3 -ipo -c 
#CFLAGS=-O3 -ipo -lm 
#GCC=icc
######################################################################

all: complex.o quantum.o random.o fidelity.out strip 

strip : 
	strip -p *.out

random.o : random.cc random.h
	$(GCC) $(LIBCFLAGS) random.cc

complex.o : complex.cc complex.h
	$(GCC) $(LIBCFLAGS) complex.cc

quantum.o : quantum.cc quantum.h 
	$(GCC) $(LIBCFLAGS) quantum.cc


fidelity.out : fidelity.cc quantum.o complex.o random.o 
	$(GCC) fidelity.cc quantum.o complex.o random.o -o fidelity.out $(CFLAGS) 

clean: 
	rm -f *.o 
	rm -f *.out
	rm -f *~


