default: dvomerge
help:
	@echo "make options: dvomerge (default)"

include ../../Makefile.System
HOME 	=	$(ROOT)/src/dvomerge
BIN	=	$(HOME)/bin
LIB	=	$(HOME)/lib
SRC	=	$(HOME)/src
MAN	=	$(HOME)/doc
INC	= 	$(HOME)/include
include ../../Makefile.Common

# programs may add their own internal requirements here
FULL_CFLAGS   = $(BASE_CFLAGS)
FULL_CPPFLAGS = $(BASE_CPPFLAGS)
FULL_LDFLAGS  = -lkapa -ldvo -lFITS -lohana $(BASE_LDFLAGS)

dvomerge     : $(BIN)/dvomerge.$(ARCH)
all: dvomerge

DVOMERGE = \
$(SRC)/dvomerge.$(ARCH).o \
$(SRC)/dvomergeUpdate.$(ARCH).o \
$(SRC)/dvomergeCreate.$(ARCH).o \
$(SRC)/dvo_image_merge_dbs.$(ARCH).o \
$(SRC)/SetSignals.$(ARCH).o \
$(SRC)/ConfigInit.$(ARCH).o \
$(SRC)/Shutdown.$(ARCH).o \
$(SRC)/help.$(ARCH).o \
$(SRC)/args.$(ARCH).o \
$(SRC)/psps_ids.$(ARCH).o \
$(SRC)/SkyTablePopulatedRange.$(ARCH).o \
$(SRC)/LoadCatalog.$(ARCH).o \
$(SRC)/build_links.$(ARCH).o \
$(SRC)/merge_catalogs_new.$(ARCH).o \
$(SRC)/merge_catalogs_old.$(ARCH).o

$(DVOMERGE)  : $(INC)/dvomerge.h

$(BIN)/dvomerge.$(ARCH) : $(DVOMERGE)

INSTALL = dvomerge

# dependancy rules for binary code #########################
$(INSTALL): % : $(BIN)/%.$(ARCH)

%.clean :
	rm -f $(BIN)/$*.$(ARCH)

%.install:
	make $(DESTBIN)/$*

install:
	for i in $(INSTALL); do make $$i.install || exit; done
