# Makefile generated by imake - do not edit!
# $Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $

#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# 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 libs	- build library routines and install them in the appropriate
#		  modules in ../lib
#
# make <testprog> - build a test program
#
# -----------------------------------------------------------------------------

CFLAGS = $(RCC_CFLAGS) -O0
TMOBJS = multTrsf.o trsf.o vect.o ../util/vector.o

# program to test transform multiplication
tmtest:  tmtest.o $(TMOBJS)
	$(CC) $(CFLAGS) -o $@ tmtest.o $(TMOBJS) $(LCTREE) $(LCTRL) $(LLIBC) -lm $(CLIBS)

dspltest:  dspltest.o
	$(CC) $(CFLAGS) -o $@ dspltest.o $(LCTREE) $(LCTRL) $(LLIBC) -lm $(CLIBS)

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

drivetest:  drivetest.o
	$(CC) $(CFLAGS) -o $@ drivetest.o $(LCTREE) $(LCTRL) $(LLIBC) -lm $(CLIBS)

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

CLIST := $(CLIST) $(LCTRL)(drive.o)
COBJS := $(COBJS) drive.o
drive.o:  drive.c
	$(RCC) $(CFLAGS) -c CTRL $<

CLIST := $(CLIST) $(LCTRL)(copyTrsf.o)
COBJS := $(COBJS) copyTrsf.o
copyTrsf.o:  copyTrsf.c
	$(RCC) $(CFLAGS) -c CTRL $<

CLIST := $(CLIST) $(LCTRL)(trsf.o)
COBJS := $(COBJS) trsf.o
trsf.o:  trsf.c
	$(RCC) $(CFLAGS) -c CTRL $<

CLIST := $(CLIST) $(LCTRL)(diff.o)
COBJS := $(COBJS) diff.o
diff.o:  diff.c
	$(RCC) $(CFLAGS) -c CTRL $<

CLIST := $(CLIST) $(LCTRL)(vect.o)
COBJS := $(COBJS) vect.o
vect.o:  vect.c
	$(RCC) $(CFLAGS) -c CTRL $<

CLIST := $(CLIST) $(LCTRL)(dspl.o)
COBJS := $(COBJS) dspl.o
dspl.o:  dspl.c
	$(RCC) $(CFLAGS) -c CTRL $<

CLIST := $(CLIST) $(LCTRL)(printTrsf.o)
COBJS := $(COBJS) printTrsf.o
printTrsf.o:  printTrsf.c
	$(RCC) $(CFLAGS) -c CTRL $<

CLIST := $(CLIST) $(LCTRL)(rciPrintObj.o)
COBJS := $(COBJS) rciPrintObj.o
rciPrintObj.o:  rciPrintObj.c
	$(RCC) $(CFLAGS) -c CTRL $<

CLIST := $(CLIST) $(LCTRL)(trsfToVel.o)
COBJS := $(COBJS) trsfToVel.o
trsfToVel.o:  trsfToVel.c
	$(RCC) $(CFLAGS) -c CTRL $<

CLIST := $(CLIST) $(LCTRL)(multTrsf.o)
COBJS := $(COBJS) multTrsf.o
multTrsf.o:  multTrsf.c
	$(RCC) $(CFLAGS) -c CTRL $<

CLIST := $(CLIST) $(LCTRL)(quaternion.o)
COBJS := $(COBJS) quaternion.o
quaternion.o:  quaternion.c
	$(RCC) $(CFLAGS) -c CTRL $<

.PHONY: libs
libs:	$(CLIST) $(LCTRL)(__.SYMDEF)
$(LCTRL)(__.SYMDEF): $(COBJS)
	ranlib $(LCTRL)

depend::
	/bin/ls *.c | sed -e 's/.c$$/.s/' | xargs rm -f
	@if [ -f DependFile ] ; then \
	echo mv DependFile DependFile.BAK; \
	mv DependFile DependFile.BAK; else exit 0; fi
	$(CC) -MM -I$$RCCL/h $(C_INCS) $(C_DEFS)  *.c \
	> DependFile

DependFile:
include DependFile
clean::
	$(RMCMD) $(JUNKFILES) *.o *.to *.tO
	$(RMCMD) drivetest dspltest tmtest

vpath %.h ..
vpath %.c ..
vpath %.s ..
vxw:		$(LDIR)/vxw.o
$(LDIR)/vxw.o:
	(cd $(LDIR); $(MAKE) $(MFLAGS) vxw)

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

depend::

clean::

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

