# ligand/Makefile.simple
# 
# Copyright 2003, The University of York
# Author: Paul Emsley
# 
# This program 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 2 of the License, or (at
# your option) any later version.
# 
# 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA

# Cambridge
PRFX    = $(HOME)/autobuild/build-coot+rdkit-pre-release-gtk2-python
MMDB    = $(PRFX)
CLIPPER = $(PRFX)
MCCP4   = $(PRFX)

# York
MMDB    = $(HOME)/mapview
# CLIPPER = $(HOME)/mapview
# CLIPPER = $(HOME)/test/install
# MCCP4   = $(HOME)/mapview


CPPFLAGS = -g
CXXFLAGS = -I. -I$(MMDB)/include -I$(CLIPPER)/include -I$(MCCP4)/include \
	   -I..

LDFLAGS = \
	-L$(MMDB)/lib -lmmdb \
	-L$(CLIPPER)/lib -lclipper-mtz -lclipper-contrib -lclipper-core \
	-L$(CLIPPER)/fftw/lib -lrfftw -lfftw \
	-L$(MCCP4)/lib -lmccp4 \
	-L../coords -lcoot-coords \
	-L../atom-utils -lcoot-atomutils


OBJS = findligand.o

findligand: findligand.o libcoot-ligand.a
	$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)

findligand.o: find-ligand.cc ligand.hh

libcoot-ligand.a: $(OBJS)
	ar r $@ $^

testmol: testmol.cc 
	$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)


sbase_test: sbase_test.cc mgtree.cc
	$(CXX) $(CXXFLAGS) -o $@ $^ -L$(MMDB)/lib -lmmdb -L../coords -lcoot-coords


test_queue: test_queue.cc
	$(CXX) $(CXXFLAGS) -o $@ $^ 
