CFLAGS_ALL	= -D${MACH_OS} -DMOTIF -DSYSV -DXT_CODE -DXOPEN_CATALOG \
                   -I../../include -I${IRIS_ROOT}/include

CFLAGS		= -c ${DEBUGFLAG} ${C_OPT}  ${CFLAGS_ALL}

CXXFLAGS        = -c ${DEBUGFLAG} ${CC_OPT} ${CFLAGS_ALL}
CCFLAGS = ${CXXFLAGS}

CFLAGS_RELAXED	= -c ${DEBUGFLAG} ${C_OPT_RELAXED}  ${CFLAGS_ALL}
CCFLAGS_RELAXED = -c ${DEBUGFLAG} ${CC_OPT_RELAXED} ${CFLAGS_ALL}

LDFLAGS =      -L../../libs/lib       -L../../iris/lib \
               -L${IRIS_ROOT}/libs/lib -L${IRIS_ROOT}/iris/lib

EXES =		xmag

MKDEPEND_CSRCS = \
		xmag.c

all: ${EXES}

depend:; makedepend -- ${CFLAGS} -- ${MKDEPEND_CSRCS}

xmag : xmag.o
		${CXX} ${LD_OPT} ${LPATH_X11} -o xmag xmag.o \
			-lXm -lXt -lX11 ${LSEARCH_BSD}
		rootchmod 775 xmag ; rootchown operator xmag

install : all
	( case `uname -s` in \
	    HP-UX )       cp xv_hpux   ${IRIS_ROOT}/config_template/extras/xv.uu  ;;  \
	    Linux )       cp xv_linux  ${IRIS_ROOT}/config_template/extras/xv.uu  ;;  \
	    IRIX|IRIX64 ) cp xv_irix   ${IRIS_ROOT}/config_template/extras/xv.uu  ;;  \
	  esac ; \
	  cd ${IRIS_ROOT}/config_template/extras ; \
	  rm -f xv xv.gz  ; uudecode xv.uu ; gunzip xv.gz ; \
	  rm -f xv.uu ; \
	  rootchmod      775 xv ; \
	  rootchown operator xv ; \
	)

# Note that the protection of the sudo files in the config_template/extras directory is
# not important.
	( case `uname -s` in \
	    HP-UX )       cp hdp_hpux11 ${IRIS_ROOT}/config_template/extras/hdp.uu ;;  \
	    Linux )       cp hdp_linux  ${IRIS_ROOT}/config_template/extras/hdp.uu ;;  \
	    IRIX|IRIX64 ) cp hdp_irix   ${IRIS_ROOT}/config_template/extras/hdp.uu ;;  \
	  esac ; \
	  cd ${IRIS_ROOT}/config_template/extras ; \
	  rm -f hdp hdp.gz  ; uudecode hdp.uu ; gunzip hdp.gz ; \
	  rm -f hdp.uu ; \
	  rootchmod      775 hdp ; \
	  rootchown operator hdp ; \
	)
	( case `uname -s` in \
	    HP-UX )       cp sudo_hpux   ${IRIS_ROOT}/config_template/extras/sudo.uu ;;  \
	    Linux )       cp sudo_linux  ${IRIS_ROOT}/config_template/extras/sudo.uu ;;  \
	    IRIX|IRIX64 ) cp sudo_irix   ${IRIS_ROOT}/config_template/extras/sudo.uu ;;  \
	  esac ; \
	  cd ${IRIS_ROOT}/config_template/extras ; \
	  rm -f sudo sudo.gz  ; uudecode sudo.uu ; gunzip sudo.gz ; \
	  rm -f sudo.uu ; \
	  rootchmod      775 sudo ; \
	  rootchown operator sudo ; \
	)
	rootcp -p sudoers ${IRIS_ROOT}/config_template/extras
	( cd ${IRIS_ROOT}/config_template/extras ; \
	  rootchmod      775 sudoers ; \
	  rootchown operator sudoers ; \
	)
	rootcp -p ${EXES} ${IRIS_ROOT}/config_template/extras
	( cd ${IRIS_ROOT}/config_template/extras ; strip ${EXES} ; \
	  rootchmod      775 ${EXES} ; \
	  rootchown operator ${EXES} ; \
	)

cleanexe:;	rm -f ${EXES} core
clean:		cleanexe
		rm -f *.o *.usg *.cat*
# DO NOT DELETE

xmag.o: /usr/include/X11/Xos.h /usr/include/X11/Xosdefs.h
xmag.o: /usr/include/sys/types.h /usr/include/sys/stdsyms.h
xmag.o: /usr/include/sys/_inttypes.h /usr/include/machine/vmtypes.h
xmag.o: /usr/include/sys/_fd_macros.h /usr/include/string.h
xmag.o: /usr/include/sys/_null.h /usr/include/sys/_size_t.h
xmag.o: /usr/include/fcntl.h /usr/include/sys/fcntl.h
xmag.o: /usr/include/sys/_flock_body.h /usr/include/unistd.h
xmag.o: /usr/include/sys/unistd.h /usr/include/utime.h
xmag.o: /usr/include/sys/_time_t.h /usr/include/sys/time.h
xmag.o: /usr/include/sys/sigevent.h /usr/include/time.h
xmag.o: /usr/include/X11/Xlib.h /usr/include/X11/X.h
xmag.o: /usr/include/X11/Xfuncproto.h /usr/include/stddef.h
xmag.o: /usr/include/sys/_wchar_t.h /usr/include/X11/Xutil.h
xmag.o: /usr/include/X11/cursorfont.h /usr/include/X11/Xatom.h
xmag.o: /usr/include/stdlib.h /usr/include/sys/wait.h
xmag.o: /usr/include/sys/resource.h /usr/include/sys/_rlimit_body.h
xmag.o: /usr/include/sys/signal.h /usr/include/sys/siginfo.h
xmag.o: /usr/include/sys/newsig.h /usr/include/machine/save_state.h
xmag.o: /usr/include/machine/frame.h /usr/include/sys/syscall.h
xmag.o: /usr/include/sys/scall_define.h /usr/include/machine/sys/syscall.h
xmag.o: /usr/include/machine/sys/sigcontext.h /usr/include/pwd.h
xmag.o: /usr/include/stdio.h /usr/include/errno.h /usr/include/sys/errno.h
