
lib_LTLIBRARIES = libpsphot.la
libpsphot_la_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS)

# bin_PROGRAMS = psphot polyfitTest growthTest
bin_PROGRAMS = psphot

psphot_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS)
psphot_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS)
psphot_LDADD = libpsphot.la
psphot_SOURCES = psphot.c		

polyfitTest_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS)
polyfitTest_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS)
polyfitTest_SOURCES = polyfitTest.c		

growthTest_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS)
growthTest_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS)
growthTest_SOURCES = growthTest.c psphotGrowthCurve.c		

libpsphot_la_SOURCES = \
	psphotErrorCodes.c	\
	psphotVersion.c		\
	psphotModelGroupInit.c	\
	psphotArguments.c	\
	psphotParseCamera.c	\
	psphotImageLoop.c	\
	psphotMaskReadout.c	\
	psphotReadout.c		\
	psphotImageMedian.c	\
	psphotFindPeaks.c	\
	psphotSourceStats.c	\
	psphotRoughClass.c	\
	psphotBasicDeblend.c	\
	psphotChoosePSF.c	\
	psphotGuessModels.c     \
	psphotEnsemblePSF.c	\
	psphotBlendFit.c	\
	psphotReplaceUnfit.c	\
	psphotApResid.c		\
	psphotMagnitudes.c	\
	psphotSkyReplace.c	\
	psphotEvalPSF.c		\
	psphotEvalFLT.c		\
	psphotSourceFits.c	\
	psphotRadiusChecks.c	\
	psphotSortBySN.c	\
	psphotOutput.c		\
	psphotGrowthCurve.c	\
	psphotFakeSources.c	\
	psphotModelTest.c	\
	psphotFitSet.c		\
	psphotWeightBias.c	\
	psphotSourceFreePixels.c \
	psphotTestPSF.c         \
	psphotCleanup.c	   	

include_HEADERS = \
	psphot.h \
	psphotErrorCodes.h

clean-local:
	-rm -f TAGS

# Tags for emacs
tags:
	etags `find . -name \*.[ch] -print`
#
# Error codes.
#
BUILT_SOURCES = psphotErrorCodes.h psphotErrorCodes.c
CLEANFILES = psphotErrorCodes.h psphotErrorCodes.c

psphotErrorCodes.h : psphotErrorCodes.dat psphotErrorCodes.h.in
	$(ERRORCODES) --data=psphotErrorCodes.dat --outdir=. psphotErrorCodes.h

psphotErrorCodes.c : psphotErrorCodes.dat psphotErrorCodes.c.in psphotErrorCodes.h
	$(ERRORCODES) --data=psphotErrorCodes.dat --outdir=. psphotErrorCodes.c
