#
#	Makefile for libtsp/AF
#
SHELL = /bin/sh

prefix=../..

exec_prefix = $(prefix)
libdir = $(exec_prefix)/lib
includedir = $(prefix)/include

CFLAGS = -O -I$(includedir)

LIB = $(libdir)/libtsp.a

.PHONY: all nucleus_routines

all:	$(LIB) nucleus_routines

.PRECIOUS: $(LIB)
$(LIB):	$(LIB)(AFclose.o) $(LIB)(AFgetHinfo.o) $(LIB)(AFopenRead.o) \
	$(LIB)(AFopenWrite.o) $(LIB)(AFreadData.o) $(LIB)(AFsetHinfo.o) \
	$(LIB)(AFsetNH.o) $(LIB)(AFwriteData.o)
	ranlib $(LIB)

nucleus_routines:
	(cd nucleus; $(MAKE))

$(LIB)(AFclose.o): $(includedir)/libtsp/AFparms.h
$(LIB)(AFgetHinfo.o): $(includedir)/libtsp/AFparms.h \
	$(includedir)/libtsp/AUparms.h
$(LIB)(AFopenRead.o): $(includedir)/libtsp/AFparms.h
$(LIB)(AFopenWrite.o): $(includedir)/libtsp/AFparms.h
$(LIB)(AFreadData.o): $(includedir)/libtsp/AFparms.h
$(LIB)(AFsetHinfo.o): $(includedir)/libtsp/AFparms.h \
	$(includedir)/libtsp/AUparms.h
$(LIB)(AFsetNH.o): $(includedir)/libtsp/AFparms.h
$(LIB)(AFwriteData.o): $(includedir)/libtsp/AFparms.h
