# Makefile options for Projection Genomics Toolkit

# DATA_DIR specifies the default path where the toolkit programs will
# look for for score function and simulation files.
#
# You can override this path at run-time by setting the environment
# variable PROJECTION_DATA_DIR to the path you want to use.
#
DATA_DIR = /home/cs/faculty/jbuhler/lsh-src/data

# Don't enable this unless you know what you're doing 
#   -- see doc/README.lsh.
GLOB_CFLAGS = # -DONE_SEQ_ONLY

###################################################
# Edit one of the following sections to specify
# your preferred compiler and its options.
###################################################
# Linux GCC/G++
# This setup will likely work for most any architecture, so long
# as you set the ARCH variable to an appropriate value.  If you're
# not sure what to put, leave it unset.  The value shown is suitable
# for the x86 architecture.

CC        = gcc
CXX       = g++
AR        = ar
RANLIB    = ranlib

ARCH      = -march=pentium3 -fomit-frame-pointer

OPTCFLAGS = -O2 -funroll-loops
#OPTCFLAGS = -O2 -funroll-loops -pg 
#OPTCFLAGS = -g

CFLAGS   = $(OPTCFLAGS) $(ARCH) -ffast-math -fshort-enums -Wall -ansi -pedantic -D_GNU_SOURCE
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti

DEPCFLAGS = -MM

LDFLAGS   = # -pg

####################################################
# Alpha DEC C/C++

#CC        = cc
#CXX       = cxx

#AR        = ar
#RANLIB    = ranlib

#ARCH      = -arch host

#OPTCFLAGS = -fast
##OPTCFLAGS = -g

#CFLAGS = $(OPTCFLAGS) $(ARCH) -Wall
#CXXFLAGS = $(CFLAGS) -noexceptions -nortti -std gnu

#DEPCFLAGS = -M

#LDFLAGS   =

###################################################
# Sparc Solaris GCC/G++

#CC        = gcc
#CXX       = g++
#AR        = ar
#RANLIB    = ranlib

#ARCH       = -mcpu=ultrasparc -DSOLARIS_MATH

#OPTCFLAGS = -O3 -funroll-loops -fomit-frame-pointer
##OPTCFLAGS = -O2 -funroll-loops -pg 
##OPTCFLAGS = -g

#CFLAGS   = $(OPTCFLAGS) $(ARCH) -ffast-math -fshort-enums -Wall
#CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti

#DEPCFLAGS = -MM

##LDFLAGS   = -pg

####################################################
# no user-servicable parts below this line
####################################################

       LSH_EXE = lsh
    PICKLD_EXE = pickld
 MERGEHITS_EXE = mergehits
 FINDMOTIF_EXE = findmotif
   GENSEQS_EXE = genseqs
   FINDSIM_EXE = findsim
    COMMON_LIB = libcommon.a
PROJECTION_LIB = libprojection.a
 
################

.depend:
	-$(CXX) $(CXXFLAGS) $(COMMON_CFLAGS) $(DEPCFLAGS) $(INCPATH) *.c *.cc > .depend

include .depend

#################

COMMON_CFLAGS = $(GLOB_CFLAGS) -DDATA_DIR=\"$(DATA_DIR)\" $(APP_CFLAGS)

.cc.o:
	$(CXX) $(CXXFLAGS) $(COMMON_CFLAGS) $(INCPATH) -c $<

.c.o:
	$(CC) $(CFLAGS) $(COMMON_CFLAGS) $(INCPATH) -c $< 
