#
# Imakefile for xtapemon : X11 based tape monitoring utility for IRAF.
#

X11IRAFDIR = ../
#include <../X11IRAF.tmpl>


    CDEBUGFLAGS = -g
         XAWLIB = LibXaw3d

##############################################################################
# Nothing to change below here...

SRCS=			classnames.c types.c xtapemon.c
OBJS=			classnames.o types.o xtapemon.o
DEFINES=		-DXTAPEMON
INCLUDES=		-I. $(X11IRAF_INCLUDES)
DEPLIBS=		XawClientDepLibs
LOCAL_LIBRARIES=	XawClientLibs
LOCAL_LDFLAGS=		-L../lib $(X11IRAF_LDFLAGS)
OBMLIBS =               LibObm LibXpm
MATHLIB =               -lm

# Hack to compile under SunPRO V4 on Solaris
#if defined (SunArchitecture) && HasSunC && OSMajorVersion >= 5
        CCOPTIONS = -Xs
  EXTRA_LDOPTIONS = -xildoff
#endif


AllTarget(xtapemon)

NormalProgramTarget(xtapemon,$(OBJS),,${OBMLIBS} XawClientLibs,$(MATHLIB))

#if InstallAppdefs
install:: XTapemon.ad
	MakeDir(X11irafAppDir)
	$(CP) XTapemon.ad X11irafAppDir/XTapemon
#endif

#if InstallManuals
install:: 
	MakeDir(X11irafManDir)
	$(CP) xtapemon.man X11irafManDir/xtapemon.1
#endif

#if InstallBinaries
install:: xtapemon
	-@if [ -d X11irafBinDir ]; then set +x; \
	        else (set -x; $(MKDIRHIER) X11irafBinDir); fi
	$(CP) xtapemon X11irafBinDir
#endif

xtapemon.o:	XTapemon.ad.h
xtapemon.c:	XTapemon.ad.h

XTapemon.ad.h: XTapemon.ad
	ad2c.sh XTapemon.ad > XTapemon.ad.h

clean::
	rm -f *.o xtapemon

DependTarget()
