## Process this file with automake to produce Makefile.in

##   This file is part of the UVES Pipeline Library
##   Copyright (C) 2002,2003 European Southern Observatory

##   This library 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

AUTOMAKE_OPTIONS = 1.6 foreign

DISTCLEANFILES = *~


if MAINTAINER_MODE

MAINTAINERCLEANFILES = Makefile.in

endif

AM_CPPFLAGS = $(all_includes)

LDADD = $(LIBFLAMES) $(LIBUVES) $(LIBCPLCORE) $(LIBCPLUI) $(LIBCPLDRS)
LDFLAGS = $(CPL_LDFLAGS)
#AM_LDFLAGS = -static

pkginclude_HEADERS =

noinst_HEADERS =

check_PROGRAMS = flames-test \
                 flames_add_extra_des-test \
                 flames_dfs-test \
                 flames_drs-test \
		flames_cal_prep_sff_ofpos-test \
		flames_fibremask-test \
		flames_set_fibremask_from_file-test \
		flames_obs_scired-test flames_corvel-test
#		flames_midas_def-test 


flames_test_SOURCES = flames-test.c
flames_test_DEPENDENCIES = $(LIBFLAMES)

flames_add_extra_des_test_SOURCES = flames_add_extra_des-test.c
flames_add_extra_des_test_DEPENDENCIES = $(LIBFLAMES)

#flames_midas_def_test_SOURCES = flames_midas_def-test.c
#flames_midas_def_test_DEPENDENCIES = $(LIBFLAMES)

flames_dfs_test_SOURCES = flames_dfs-test.c
flames_dfs_test_DEPENDENCIES = $(LIBFLAMES)

flames_drs_test_SOURCES = flames_drs-test.c
flames_drs_test_DEPENDENCIES = $(LIBFLAMES)

flames_cal_prep_sff_ofpos_test_SOURCES = flames_cal_prep_sff_ofpos-test.c
flames_cal_prep_sff_ofpos_test_DEPENDENCIES = $(LIBFLAMES)

flames_corvel_test_SOURCES = flames_corvel-test.c
flames_corvel_test_DEPENDENCIES = $(LIBFLAMES)

flames_obs_scired_test_SOURCES = flames_obs_scired-test.c
flames_obs_scired_test_DEPENDENCIES = $(LIBFLAMES)

flames_fibremask_test_SOURCES = flames_fibremask-test.c
flames_fibremask_test_DEPENDENCIES = $(LIBFLAMES)

flames_set_fibremask_from_file_test_SOURCES = flames_set_fibremask_from_file-test.c
flames_set_fibremask_from_file_test_DEPENDENCIES = $(LIBFLAMES)

TESTS          = $(check_PROGRAMS)

# Expected failures
# XFAIL_TESTS =

# Be sure to reexport important environment variables.
TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
        CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
        LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
        OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \
        MALLOC_PERTURB_=227 MALLOC_CHECK_=2

# We need to remove any files that the above tests created.
clean-local: 
	 $(RM) *.fits *.log

if PURIFY
include $(top_builddir)/Makefile.purify
endif
