# Copyright (C) 2005 Affymetrix, Inc.
#
# 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 License 
# along with this program; if not, write to the 
# 
# Free Software Foundation, Inc., 
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

CPPFLAGS:=O2
binDir:=../bin
arch:=$(shell $(binDir)/cpucomsys.sh)
outDir:=$(binDir)/$(arch)
ld_compare:=$(outDir)/ld_compare
ld_compare:=$(ld_compare).$(CPPFLAGS)

ld_compare: ld_compare.cpp SnpData.cpp SnpData.h $(outDir)
	$(CXX) -$(CPPFLAGS) ld_compare.cpp SnpData.cpp -o $(ld_compare)

$(outDir):
	mkdir -p $(outDir)

check: $(ld_compare)
	$(ld_compare) ../examples/Single_Marker/par_linux.txt
	$(ld_compare) ../examples/Multiple_Marker/hap_Chr24_linux.par

clean:
	-rm -rf $(ld_compare)
	-rm -rf ../examples/Multiple_Marker/chr24_TwoMarker_Rsq.txt
	-rm -rf ../examples/Single_Marker/*B_A*
