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

bin_PROGRAMS = psphot

psphot_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS)
psphot_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(PSPHOT_LIBS)
psphot_LDADD = libpsphot.la

psphot_SOURCES = \
        psphot.c                \
	psphotArguments.c	\
	psphotCleanup.c	   	\
	psphotImageLoop.c	\
	psphotMosaicChip.c	\
	psphotSetMaskBits.c	\
	psphotParseCamera.c

libpsphot_la_SOURCES = \
	psphotErrorCodes.c	       \
	psphotCullPeaks.c	       \
	psphotVersion.c		       \
	psphotModelGroupInit.c	       \
	psphotMaskReadout.c	       \
	psphotDefineFiles.c	       \
	psphotReadout.c		       \
	psphotModelBackground.c	       \
	psphotSubtractBackground.c     \
	psphotFindDetections.c	       \
	psphotFindPeaks.c	       \
	psphotFindFootprints.c	       \
	psphotSignificanceImage.c      \
	psphotSourceStats.c	       \
	psphotRoughClass.c	       \
	psphotBasicDeblend.c	       \
	psphotChoosePSF.c	       \
	psphotGuessModels.c            \
	psphotFitSourcesLinear.c       \
	psphotBlendFit.c	       \
	psphotReplaceUnfit.c	       \
	psphotApResid.c		       \
	psphotMagnitudes.c	       \
	psphotSkyReplace.c	       \
	psphotEvalPSF.c		       \
	psphotEvalFLT.c		       \
	psphotSourceFits.c	       \
	psphotRadiusChecks.c	       \
	psphotOutput.c		       \
	psphotFakeSources.c	       \
	psphotModelWithPSF.c           \
	psphotExtendedSourceAnalysis.c \
	psphotExtendedSourceFits.c     \
	psphotRadialProfile.c	       \
	psphotPetrosian.c	       \
	psphotIsophotal.c	       \
	psphotAnnuli.c		       \
	psphotKron.c		       \
	psphotKernelFromPSF.c	       \
	psphotPSFConvModel.c	       \
	psphotModelTest.c	       \
	psphotFitSet.c		       \
	psphotSourceFreePixels.c       \
	psphotSummaryPlots.c           \
	psphotMergeSources.c	       \
	psphotLoadPSF.c	               \
	psphotReadoutCleanup.c	       \
	psphotSourcePlots.c	       \
	psphotRadialPlot.c	       \
	psphotDeblendSatstars.c	       \
	psphotMosaicSubimage.c	       \
	psphotMakeResiduals.c	       \
	psphotSourceSize.c	       \
	psphotDiagnosticPlots.c	       \
	psphotMakeFluxScale.c	       \
	psphotCheckStarDistribution.c  \
	psphotAddNoise.c

# dropped? psphotGrowthCurve.c

include_HEADERS = \
	psphot.h \
	psphotErrorCodes.h

noinst_HEADERS = \
	psphotInternal.h \
	psphotStandAlone.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
EXTRA_DIST = psphotErrorCodes.dat psphotErrorCodes.c.in psphotErrorCodes.h.in \
	models/pmModel_STRAIL.c \
	models/pmModel_TEST1.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
