
if BUNDLE
  MFLAGS= -DMUNIPACK_LIBEXEC_DIR=\"$(BUNDLEDIR)/libexec/munipack\" \
	  -DMUNIPACK_DATA_DIR=\"$(BUNDLEDIR)/share/munipack\"
else
  MFLAGS= -DMUNIPACK_LIBEXEC_DIR=\"$(pkglibexecdir)\" \
          -DMUNIPACK_DATA_DIR=\"$(pkgdatadir)\"
endif

M_CPPFLAGS = -I$(top_srcdir)/include -DwxUSE_GUI=0 $(MFLAGS) $(WX_CXXFLAGS_CLI)

bin_PROGRAMS = munipack

pkglibexec_PROGRAMS = growreport

noinst_LIBRARIES = libmprocess.a

munipack_SOURCES = munipack.cpp cmd.cpp common.cpp fitsfn.cpp \
                   bias.cpp dark.cpp flat.cpp phcorr.cpp \
                   colouring.cpp cone.cpp timeseries.cpp fits.cpp \
                   astrometry.cpp phcal.cpp votable.cpp find.cpp \
		   kombine.cpp aphot.cpp gphot.cpp grow_report.cpp \
                   phfotran.cpp cross.cpp artificial.cpp sesame.cpp
# calibrate.cpp list.cpp

munipack_CPPFLAGS = $(M_CPPFLAGS)
munipack_LDFLAGS = @LIBGCC@ @LIBSTDCPP@
munipack_LDADD = libmprocess.a $(top_srcdir)/vo/libvocatconf.a \
                 $(top_srcdir)/vo/libvotable.a $(top_srcdir)/lib/libmfitsio.a \
                 $(WX_LIBS_VO) $(WX_LIBS_CLI) $(LIBCFITSIO) $(LIBM)

growreport_SOURCES = growreport.cpp
growreport_LDFLAGS = @LIBGCC@ @LIBSTDCPP@
growreport_LDADD = $(LIBCFITSIO) $(LIBM)

libmprocess_a_SOURCES = mpipe.cpp mprocess.cpp
libmprocess_a_CPPFLAGS = $(M_CPPFLAGS)

man_MANS = munipack.1
