# Makefile generated by imake - do not edit!
# $TOG: imake.c /main/97 1997/06/20 20:23:51 kaleb $

#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This Makefile was generated automatically from Imakefile, using imake,
# which is provided as part of the X Windows distribution. imake was
# written by Todd Brunhoff and Jim Fulton from the Mit X Consortium.
#
# The rules for turning an Imakefile into a Makefile are located in
# conf/Imake.tmpl and conf/Imake.rules. Platform specific parameters
# are set in the .cf files. Site specific parameters are set in the
# system's CONFIG file. Rules and templates for RCCL/RCI created by
# John Lloyd, McGill University, November 27, 1990.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

      TARGET_DEFS = -D"LINUX_CFG"
              RCC = rcc

               CC = gcc
               LD = ld
             LDIR = ../lib
             BDIR = ../bin

             FCMD = undefined

            RMCMD = /bin/rm -f
        JUNKFILES = *.BAK .*.BAK *.CKP .*.CKP \\\#* *.o *.to *.tO core makelog

C_INCS :=
C_DEFS :=  $(TARGET_DEFS)
C_OPNS :=

C_DEFS := $(C_DEFS) -D"RWU"

       RCC_CFLAGS = $(C_OPNS) $(C_INCS) $(C_DEFS) $(TRACE)

            LUSER = $(LDIR)/rciUser.a
            LCTRL = $(LDIR)/rciCtrl.a
            LPUMA = $(LDIR)/libPuma.a

            LAUXK =

            LLIBC = $(LDIR)/libC.a
           LCTREE = $(LDIR)/libCtree.a
 VOLATILE_RCILIBS = $(LUSER) $(LCTRL)
      ALL_RCILIBS = $(LUSER) $(LCTREE) $(LCTRL) $(LAUXK) $(LLIBC)

.SUFFIXES:	.to .tO

.c.to:
	@if [ -f $*.o ] ; then \
	tmp=\#obj_tmp$$$$; mv $*.o $$tmp; fi; \
	echo $(CC) $(CFLAGS) -c -DTEST $^ '[' -o $*.to ']' ; $(CC) $(CFLAGS) -c -DTEST $^; mv $*.o $*.to; \
	if [ "$$tmp" != "" ] ; then mv $$tmp $*.o; else exit 0; fi
.c.tO:
	@if [ -f $*.o ] ; then \
	tmp=\#obj_tmp$$$$; mv $*.o $$tmp; fi; \
	echo $(RCC) $(CFLAGS) -c -DTEST CTRL $^ '[' -o $*.tO ']' ; $(RCC) $(CFLAGS) -c -DTEST CTRL $^; mv $*.o $*.tO; \
	if [ "$$tmp" != "" ] ; then mv $$tmp $*.o; else exit 0; fi

ULIST :=
CLIST :=
PLIST :=
UOBJS :=
COBJS :=
POBJS :=
UTARGS :=
VXWLO :=
VXWBO :=

define CheckForVXWDir
	if [ ! -d VXW ] ; then
	   if [ -f VXW ] ; then
	      echo error: VXW exits, but is not a directory; exit 1
	   fi
	   echo mkdir VXW
	   mkdir VXW
	fi
endef

#=-=-=-=-=-=-=-=-=-=-=-=- Imakefile starts here -=-=-=-=-=-=-=-=-=-=-=-=-=

# -----------------------------------------------------------------------------
#
# make man -	convert all the tex source files into nroff files, using
#		texman.
#
# -----------------------------------------------------------------------------

CFLAGS = -O $(TRACE)

.SUFFIXES: .tex .nr

.tex.nr: ;	texman < $*.tex > $*.nr

texman:  texman.o $(LLIBC)
	$(CC) $(CFLAGS) -o $@ texman.o $(LLIBC)  $(CLIBS)

texman.c: texman.l
	flex  -t texman.l > texman.c
	gcc -O -o texman texman.c

MANLIST	= 1 3 5 7

man:	texman
	- cd tex1 ;	for i in $(MANLIST) ; do	  cd ../tex$$i ; echo $$i -- ;	     for k in `/bin/ls *.tex .*.tex | sed -e 's/.tex$$//'` ; do		../../bin/tcmp -s -f ../man$$i/$$k.$$i $$k.tex ; 		case $$? in 		255) echo texman '<' $$k.tex '>' ../man$$i/$$k.$$i ; 		    for j in `../texman -N < $$k.tex` ; do 		      if [ $$k != $$j ] ; then 		         echo + $$j.$$i ; 		         (cd ../man$$i; rm -f $$j.$$i; 					ln -s $$k.$$i $$j.$$i) ; 		      fi 		    done ; 		    ../texman < $$k.tex > ../man$$i/$$k.$$i;;		*) : echo no ../texman $$k;;		esac	     done	done

	@if test -r /etc/catman ; then					   echo /etc/catman -w -M . ; 					   /etc/catman -w -M . ; 					elif test -r /usr/etc/catman ; then				   echo /usr/etc/catman -w -M . ;				   /usr/etc/catman -w -M . ; 					else								   echo can\'t find catman to make whatis database ;		fi

clean::
	rm -f *.BAK texman texman.o texman.c whatis
	for i in $(MANLIST) ; do	   rm -r -f man$$i ; mkdir man$$i ; 	   rm -r -f cat$$i ; mkdir cat$$i ; 	   rm -f tex$$i/$(EMPTY)*.CKP tex$$i/$(EMPTY)*.BAK ; 	done

#=-=-=-=-=-=-=-=-=-=-=-=-= Imakefile ends here =-=-=-=-=-=-=-=-=-=-=-=-=-=

depend::

clean::

# XXX line used by make depend - DO NOT DELETE XXX

