#
# This makefile is used in place of the one in Paul Sydneys' tarball
# 
# XXX integrate with the build system
#
TARGETS = RemoveStreaks
SSA_SRC_DIR = ../ssa-core-cpp/src
CFITSIO_DIR = ../cfitsio
CFITSIO_DIR = $(PSCONFDIR)/$(PSCONFIG)
INCLUDEDIRS = -I$(SSA_SRC_DIR) -I$(CFITSIO_DIR)/include
# INCLUDEDIRS = -I$(SSA_SRC_DIR)

CXX = c++
CXXFLAGS = -Wall -O3 -DNDEBUG
#CXXFLAGS = -Wall -g

SRCS = $(TARGETS).cpp $(SSA_SRC_DIR)/math/Constants.cpp
LIBS = -L$(CFITSIO_DIR) -lcfitsio
LIBS = -L$(CFITSIO_DIR)/lib -lcfitsio
# LIBS = -lcfitsio

$(TARGETS) : $(SRCS)
	   $(CXX) $(CXXFLAGS) $(INCLUDEDIRS) $(SRCS) $(LIBS) -o $@

clean :
	   - rm $(TARGETS)

DESTDIR=$(PSCONFDIR)/$(PSCONFIG)

install:	$(TARGETS)
	cp RemoveStreaks $(DESTDIR)/bin
	chmod 755  $(DESTDIR)/bin/RemoveStreaks
