default: libastrocmd

include ../../../Makefile.System
HOME    =       $(ROOT)/src/opihi
BIN     =       $(HOME)/bin
LIB     =       $(HOME)/lib
INC     =       $(HOME)/include
SRC     =       $(HOME)/cmd.astro
include ../Makefile.Common

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

# astro user commands ########################
srcs = \
$(SRC)/init.$(ARCH).o             \
$(SRC)/altaz.$(ARCH).o	           \
$(SRC)/biassub.$(ARCH).o	   \
$(SRC)/cgrid.$(ARCH).o		   \
$(SRC)/coords.$(ARCH).o	   \
$(SRC)/cplot.$(ARCH).o		   \
$(SRC)/csystem.$(ARCH).o	   \
$(SRC)/coord_systems.$(ARCH).o	   \
$(SRC)/ctimes.$(ARCH).o	   \
$(SRC)/cval.$(ARCH).o		   \
$(SRC)/czplot.$(ARCH).o	   \
$(SRC)/drizzle.$(ARCH).o	   \
$(SRC)/flux.$(ARCH).o		   \
$(SRC)/fixwrap.$(ARCH).o	   \
$(SRC)/fixcols.$(ARCH).o	   \
$(SRC)/gauss.$(ARCH).o		   \
$(SRC)/getvel.$(ARCH).o	   \
$(SRC)/getlst.$(ARCH).o	   \
$(SRC)/medianmap.$(ARCH).o	   \
$(SRC)/mkgauss.$(ARCH).o	   \
$(SRC)/multifit.$(ARCH).o	   \
$(SRC)/objload.$(ARCH).o	   \
$(SRC)/outline.$(ARCH).o	   \
$(SRC)/polar.$(ARCH).o		   \
$(SRC)/precess.$(ARCH).o	   \
$(SRC)/profile.$(ARCH).o	   \
$(SRC)/radec.$(ARCH).o	   \
$(SRC)/region.$(ARCH).o	   \
$(SRC)/rotcurve.$(ARCH).o	   \
$(SRC)/scale.$(ARCH).o		   \
$(SRC)/sexigesimal.$(ARCH).o	   \
$(SRC)/spec.$(ARCH).o		   \
$(SRC)/star.$(ARCH).o		   \
$(SRC)/transform.$(ARCH).o        \
$(SRC)/imsub.$(ARCH).o		   \
$(SRC)/imfit.$(ARCH).o		   \
$(SRC)/imfit-fgauss.$(ARCH).o	   \
$(SRC)/imfit-pgauss.$(ARCH).o	   \
$(SRC)/imfit-pgauss-psf.$(ARCH).o	   \
$(SRC)/imfit-qgauss.$(ARCH).o	   \
$(SRC)/imfit-qgauss-psf.$(ARCH).o	   \
$(SRC)/imfit-sgauss.$(ARCH).o	   \
$(SRC)/imfit-sgauss-psf.$(ARCH).o	   \
$(SRC)/imfit-qfgauss.$(ARCH).o	   \
$(SRC)/imfit-qrgauss.$(ARCH).o	   

# dependancy rules for include files ########################
incs = \
$(INC)/opihi.h \
$(INC)/external.h \
$(INC)/shell.h \
$(INC)/dvomath.h \
$(INC)/convert.h \
$(INC)/display.h 

$(srcs): $(incs)

$(LIB)/libastrocmd.$(ARCH).a: $(srcs)
$(LIB)/libastrocmd.$(ARCH).$(DLLTYPE): $(srcs)

$(DESTLIB)/libastrocmd.a: $(LIB)/libastrocmd.$(ARCH).a
$(DESTLIB)/libastrocmd.$(DLLTYPE): $(LIB)/libastrocmd.$(ARCH).$(DLLTYPE)

libastrocmd: $(DESTLIB)/libastrocmd.a $(DESTLIB)/libastrocmd.$(DLLTYPE)

uninstall:
	rm -f $(DESTLIB)/libastrocmd.a
	rm -f $(DESTLIB)/libastrocmd.$(DLLTYPE)

