# Copyright (c) 2012 David Munger, Pierre L'Ecuyer, Université de Montréal.
# 
# This file is part of Lattice Builder.
# 
# Lattice Builder is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# Lattice Builder 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 Lattice Builder.  If not, see <http://www.gnu.org/licenses/>.

# Example Makefile

# installation prefix of Lattice Builder
LATBUILDER_PREFIX = /part/01/Tmp/mungerd/build/latsoft.pack/linux64/latbuilder

INCLUDES = -I$(LATBUILDER_PREFIX)/include -I"/part/01/Tmp/mungerd/build/latsoft.pack/linux64/boost/include" -I"/part/01/Tmp/mungerd/build/latsoft.pack/linux64/fftw/include"
LIBS = -L$(LATBUILDER_PREFIX)/lib -llatbuilder -llatcommon -L"/part/01/Tmp/mungerd/build/latsoft.pack/linux64/boost/lib" -L"/part/01/Tmp/mungerd/build/latsoft.pack/linux64/fftw/lib" -l"fftw3"

# release
CXXFLAGS = -std=c++11 -Wall -Wno-unused-local-typedefs -Wno-unused-function -Wnon-virtual-dtor -O2

# debugging
#CXXFLAGS = -Wall -O0 -g

LDFLAGS = -Wl,-R,"$(LATBUILDER_PREFIX)/lib"

%.o: %.cc
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES) -std=c++11 -c $< -o $@

myproject: myproject.o
	$(CXX) $(LDFLAGS) $< $(LIBS) -o $@

clean:
	- rm myproject.o
