default: libdatacmd

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

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

# data user commands ########################
srcs = \
$(SRC)/init.$(ARCH).o          \
$(SRC)/accum.$(ARCH).o		\
$(SRC)/applyfit2d.$(ARCH).o	\
$(SRC)/applyfit.$(ARCH).o	\
$(SRC)/box.$(ARCH).o		\
$(SRC)/book.$(ARCH).o		\
$(SRC)/book_commands.$(ARCH).o	\
$(SRC)/center.$(ARCH).o	\
$(SRC)/clear.$(ARCH).o		\
$(SRC)/clip.$(ARCH).o		\
$(SRC)/close.$(ARCH).o		\
$(SRC)/concat.$(ARCH).o	\
$(SRC)/contour.$(ARCH).o	\
$(SRC)/create.$(ARCH).o	\
$(SRC)/cumulative.$(ARCH).o	\
$(SRC)/cursor.$(ARCH).o	\
$(SRC)/cut.$(ARCH).o		\
$(SRC)/delete.$(ARCH).o	\
$(SRC)/device.$(ARCH).o	\
$(SRC)/dimendown.$(ARCH).o	\
$(SRC)/dimenup.$(ARCH).o	\
$(SRC)/dbconnect.$(ARCH).o	\
$(SRC)/dbselect.$(ARCH).o	\
$(SRC)/erase.$(ARCH).o		\
$(SRC)/extract.$(ARCH).o	\
$(SRC)/fft1d.$(ARCH).o		\
$(SRC)/fft2d.$(ARCH).o		\
$(SRC)/fit2d.$(ARCH).o		\
$(SRC)/fit.$(ARCH).o		\
$(SRC)/gaussj.$(ARCH).o	\
$(SRC)/gaussdeviate.$(ARCH).o	\
$(SRC)/grid.$(ARCH).o		\
$(SRC)/gridify.$(ARCH).o       \
$(SRC)/grow.$(ARCH).o		\
$(SRC)/ungridify.$(ARCH).o     \
$(SRC)/histogram.$(ARCH).o	\
$(SRC)/imcut.$(ARCH).o	 	\
$(SRC)/imhist.$(ARCH).o	\
$(SRC)/imsmooth.$(ARCH).o	\
$(SRC)/integrate.$(ARCH).o	\
$(SRC)/interpolate.$(ARCH).o	\
$(SRC)/jpeg.$(ARCH).o		\
$(SRC)/kern.$(ARCH).o		\
$(SRC)/keyword.$(ARCH).o	\
$(SRC)/labels.$(ARCH).o	\
$(SRC)/limits.$(ARCH).o	\
$(SRC)/line.$(ARCH).o		\
$(SRC)/list_buffers.$(ARCH).o	\
$(SRC)/list_header.$(ARCH).o	\
$(SRC)/list_vectors.$(ARCH).o	\
$(SRC)/load.$(ARCH).o		\
$(SRC)/lookup.$(ARCH).o	\
$(SRC)/mkrgb.$(ARCH).o	\
$(SRC)/mcreate.$(ARCH).o	\
$(SRC)/medacc.$(ARCH).o	\
$(SRC)/mget.$(ARCH).o		\
$(SRC)/minterpolate.$(ARCH).o	\
$(SRC)/mset.$(ARCH).o		\
$(SRC)/peak.$(ARCH).o		\
$(SRC)/periodogram.$(ARCH).o	\
$(SRC)/plot.$(ARCH).o		\
$(SRC)/dot.$(ARCH).o		\
$(SRC)/point.$(ARCH).o		\
$(SRC)/ps.$(ARCH).o		\
$(SRC)/queuedelete.$(ARCH).o	\
$(SRC)/queuedrop.$(ARCH).o	\
$(SRC)/queuelist.$(ARCH).o	\
$(SRC)/queueload.$(ARCH).o	\
$(SRC)/queuesize.$(ARCH).o	\
$(SRC)/queuepush.$(ARCH).o	\
$(SRC)/queuepop.$(ARCH).o	\
$(SRC)/queueprint.$(ARCH).o	\
$(SRC)/queueinit.$(ARCH).o	\
$(SRC)/radial.$(ARCH).o	\
$(SRC)/rd.$(ARCH).o		\
$(SRC)/rdseg.$(ARCH).o		\
$(SRC)/read_vectors.$(ARCH).o	\
$(SRC)/rebin.$(ARCH).o		\
$(SRC)/resize.$(ARCH).o	\
$(SRC)/roll.$(ARCH).o		\
$(SRC)/rotate.$(ARCH).o	\
$(SRC)/save.$(ARCH).o		\
$(SRC)/section.$(ARCH).o	\
$(SRC)/select.$(ARCH).o	\
$(SRC)/set.$(ARCH).o		\
$(SRC)/shift.$(ARCH).o		\
$(SRC)/sort.$(ARCH).o		\
$(SRC)/spline_apply.$(ARCH).o	\
$(SRC)/spline_construct.$(ARCH).o \
$(SRC)/stats.$(ARCH).o		   \
$(SRC)/style.$(ARCH).o		   \
$(SRC)/subraster.$(ARCH).o	   \
$(SRC)/subset.$(ARCH).o	   \
$(SRC)/svd.$(ARCH).o		   \
$(SRC)/swapbytes.$(ARCH).o	   \
$(SRC)/textline.$(ARCH).o	   \
$(SRC)/tv.$(ARCH).o		   \
$(SRC)/tvchannel.$(ARCH).o	   \
$(SRC)/tvcolors.$(ARCH).o	   \
$(SRC)/tvcontour.$(ARCH).o	   \
$(SRC)/tvgrid.$(ARCH).o	   \
$(SRC)/uniq.$(ARCH).o		   \
$(SRC)/unsign.$(ARCH).o	   \
$(SRC)/vbin.$(ARCH).o		   \
$(SRC)/vclip.$(ARCH).o		   \
$(SRC)/vgauss.$(ARCH).o           \
$(SRC)/vmaxwell.$(ARCH).o           \
$(SRC)/vgrid.$(ARCH).o		   \
$(SRC)/vload.$(ARCH).o		   \
$(SRC)/vpop.$(ARCH).o		   \
$(SRC)/vroll.$(ARCH).o		   \
$(SRC)/vsmooth.$(ARCH).o	\
$(SRC)/vstat.$(ARCH).o		   \
$(SRC)/wd.$(ARCH).o		   \
$(SRC)/write_vectors.$(ARCH).o	   \
$(SRC)/zap.$(ARCH).o		   \
$(SRC)/zplot.$(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)/libdatacmd.$(ARCH).a: $(srcs)
$(LIB)/libdatacmd.$(ARCH).$(DLLTYPE): $(srcs)

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

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

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