#
# Imakefile for cli
#

#include "../Imakefile.def"

INCLUDES = \
-I../include -I${ATFUNCTIONS_INC} -I${CFITSIO_INC} \
-I${CFORTRAN_INC} -I${CERN_INC}

OBJ =	aste_coord_teldef.o aste_coord_core.o aste_coord_ch2mm.o \
	aste_coord_xrt.o aste_coord_xrs.o aste_coord_xis.o aste_coord_hxd.o \
	aste_time.o aste_time_tt.o attfile.o aste_att.o \
	aste_rand.o hrndm.o hrndm_dbl.o hrndmb.o hrndmrmf.o \
	aste_hdouble.o aste_telescop.o aste_instrume.o aste_rpt.o

TEST_PROG = test-aste_coord test-aste_att

NormalLibraryTarget(astetool,$(OBJ))

InstallLibrary(astetool,$(INSTALL_LIB_PATH))

DependTarget()

test: ${TEST_PROG}

test-aste_coord: test-aste_coord.o ${LIB}
	${CC} -o $@ $@.o -L. -lastetool -L${ATFUNCTIONS_INC}/../${EXT} -latFunctions -L${CFITSIO_INC}/../${EXT} -lcfitsio -lm

test-aste_att: test-aste_att.o ${LIB}
	${CC} -o $@ $@.o -L. -lastetool -L${ATFUNCTIONS_INC}/../${EXT} -latFunctions -L${CFITSIO_INC}/../${EXT} -lcfitsio -lm

test-aste_rpt: test-aste_rpt.o ${LIB}
	${CC} -o $@ $@.o -L. -lastetool -L${ATFUNCTIONS_INC}/../${EXT} -latFunctions -L${CFITSIO_INC}/../${EXT} -lcfitsio -lm

clean::
	${RM} ${TEST_PROG}
