# Makefile for CONTACT

# Use `make contact'      to build the normal distribution.
# Use `make clean'    to remove objects and executable

# Change next line to define another target directory for the contact
# executable and dictionary files
CONTACT = `cd ..;pwd`

BIN = $(CONTACT)/bin
DIC = $(CONTACT)/dic

F77 = f77

OBJS =  main_contact.o contact.o

contact: cn_edit contct

cn_edit:
	sed -e "s|+'|+'$(CONTACT)|" \
	contact_path.fh > temp_contact_path.fh

clean:
	rm -f temp_contact_path.fh
	rm -f $(BIN)/*
	rm -f ./*.o
	rm -f ./#* ./*~

contact.o: contact.f crd-com.fh atom-com.fh CIF-com.fh
	$(F77) -c -O2 contact.f 

main_contact.o: main_contact.f 
	$(F77) -c -O2 main_contact.f 

contct: $(OBJS)
	$(F77) -O2 -o $(BIN)/contact $(OBJS)











