
# Cambridge
MMDB    = $(HOME)/build
CLIPPER = $(HOME)/crystal/clipper
MCCP4   = $(HOME)/crystal/clipper/mccp4-0.6.3
FFTW    = $(HOME)/crystal/clipper/fftw
# York
# MMDB    = $(HOME)/mapview
# CLIPPER = $(HOME)/mapview
# CLIPPER = $(HOME)/test/install
# MCCP4   = $(HOME)/mapview
# Glasgow
MMDB    = $(HOME)/mapview
CLIPPER = $(HOME)/mapview
MCCP4   = $(HOME)/mapview
# Oxford:
MMDB    = $(HOME)/crystal
CLIPPER = $(HOME)/crystal
MCCP4   = $(HOME)/crystal

CXX = g++
MMDB_CXXFLAGS = -I$(MMDB)/include 
FFTW_LIBS = -L$(FFTW)/lib -lrfftw -lfftw

MMDB_LIBS = -L$(MMDB)/lib -lmmdb 
CLIPPER_LIBS = -L$(CLIPPER)/lib -lclipper-contrib \
	-lclipper-mtz -lclipper-phs -lclipper -L$(MCCP4)/lib -lmccp4 \
	-L$(CLIPPER)lib -L/h/paule/mapview/lib $(FFTW_LIBS)

MCCP4_CFLAGS = -I$(MCCP4)/include
CLIPPER_CXXFLAGS = -I$(CLIPPER)/include -I$(MCCP4)/include 

INCLUDES = $(CLIPPER_CXXFLAGS) $(MCCP4_CFLAGS) $(MMDB_CXXFLAGS) -I../mini-mol

CXXFLAGS = -g $(INCLUDES)
LDFLAGS = -static -L../mini-mol -lcoot-mini-mol $(CLIPPER_LIBS) $(MMDB_LIBS) 

testdbmain: testdbmain.cc libcoot-db-main.a
	$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)

libcoot-db-main.a: db-main.o
	ar r $@ $^

db-main.o: db-main.cc db-main.hh

testmmdbbits: testmmdbbits.cc
	$(CXX) $(MMDB_CXXFLAGS) $(MMDB_LIBS) $? -o $@
