# 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 test program
#
# -----------------------------------------------------------------------------

CFLAGS = $(RCC_CFLAGS) -g

# The set of all test programs

TEST =		testUt testSet testPos testTrans testVm testMq testTgen 		testMisc testJb testSync

testsuite:	$(TEST)

OU =
OC =

# a sort of interactive demonstration test program

rccltest:	$(VOLATILE_RCILIBS)
rccltest:  rccltest.o rccltestCtrl.o $(OU) $(OC)
	$(RCC) $(CFLAGS) -o $@ rccltest.o $(OU) CTRL rccltestCtrl.o $(OC) $(CLIBS)
	# chmod u+s $@

# vanilla test program template to compile any two files named
# test.c and testCtrl.c:

test:	$(VOLATILE_RCILIBS)
test:  test.o testCtrl.o $(OU) $(OC)
	$(RCC) $(CFLAGS) -o $@ test.o $(OU) CTRL testCtrl.o $(OC) $(CLIBS)
	# chmod u+s $@
test.o.o:  test.o.c
	$(RCC) $(CFLAGS) -c $<

# program to test updateTrans()

testUt:	$(VOLATILE_RCILIBS)
testUt:  testUt.o  $(OU) $(OC)
	$(RCC) $(CFLAGS) -o $@ testUt.o $(OU) CTRL  $(OC) $(CLIBS)
	# chmod u+s $@

# program to test the various set and get primitives

testSet:	$(VOLATILE_RCILIBS)
testSet:  testSet.o testSetCtrl.o $(OU) $(OC)
	$(RCC) $(CFLAGS) -o $@ testSet.o $(OU) CTRL testSetCtrl.o $(OC) $(CLIBS)
	# chmod u+s $@

# program to test the makePosition() routine

testPos:	$(VOLATILE_RCILIBS)
testPos:  testPos.o makePosition.to  $(OU) $(OC)
	$(RCC) $(CFLAGS) -o $@ testPos.o makePosition.to $(OU) CTRL  $(OC) $(CLIBS)
	# chmod u+s $@

# program to test the transform primitives

testTrans:	$(VOLATILE_RCILIBS)
testTrans:  testTrans.o testTransCtrl.o $(OU) $(OC)
	$(RCC) $(CFLAGS) -o $@ testTrans.o $(OU) CTRL testTransCtrl.o $(OC) $(CLIBS)
	# chmod u+s $@

# program to test the virtual manipulator code

testVm:	$(VOLATILE_RCILIBS)
testVm:  testVm.o testVmCtrl.o $(OU) $(OC)
	$(RCC) $(CFLAGS) -o $@ testVm.o $(OU) CTRL testVmCtrl.o $(OC) $(CLIBS)
	# chmod u+s $@

# program to check the motion queue mechanism

testMq:	$(VOLATILE_RCILIBS)
testMq:  putQueue.to  $(OU) $(OC)
	$(RCC) $(CFLAGS) -o $@ putQueue.to $(OU) CTRL  $(OC) $(CLIBS)
	# chmod u+s $@

# program to test the basic trajectory generator

testTgen:	$(VOLATILE_RCILIBS)
testTgen:  testTgen.o testTgenCtrl.o $(OU) $(OC)
	$(RCC) $(CFLAGS) -o $@ testTgen.o $(OU) CTRL testTgenCtrl.o $(OC) $(CLIBS)
	# chmod u+s $@

# program to test the basic trajectory generator

testSync:	$(VOLATILE_RCILIBS)
testSync:  testSync.o testSyncCtrl.o $(OU) $(OC)
	$(RCC) $(CFLAGS) -o $@ testSync.o $(OU) CTRL testSyncCtrl.o $(OC) $(CLIBS)
	# chmod u+s $@

# program to test otu some miscellaneous things

testMisc:	$(VOLATILE_RCILIBS)
testMisc:  testMisc.o testMiscCtrl.o $(OU) $(OC)
	$(RCC) $(CFLAGS) -o $@ testMisc.o $(OU) CTRL testMiscCtrl.o $(OC) $(CLIBS)
	# chmod u+s $@

# program to test the joint bias code

testJb:	$(VOLATILE_RCILIBS)
testJb:  testJb.o testJbCtrl.o $(OU) $(OC)
	$(RCC) $(CFLAGS) -o $@ testJb.o $(OU) CTRL testJbCtrl.o $(OC) $(CLIBS)
	# chmod u+s $@

# 'make libs' maintains both the libraries rciUser.a and rciCtrl.a

ULIST := $(ULIST) $(LUSER)(makePosition.o)
UOBJS := $(UOBJS) makePosition.o

ULIST := $(ULIST) $(LUSER)(allocTransXyz.o)
UOBJS := $(UOBJS) allocTransXyz.o

ULIST := $(ULIST) $(LUSER)(moves.o)
UOBJS := $(UOBJS) moves.o

ULIST := $(ULIST) $(LUSER)(rcclCreate.o)
UOBJS := $(UOBJS) rcclCreate.o

ULIST := $(ULIST) $(LUSER)(transSetup.o)
UOBJS := $(UOBJS) transSetup.o

ULIST := $(ULIST) $(LUSER)(teach.o)
UOBJS := $(UOBJS) teach.o

ULIST := $(ULIST) $(LUSER)(setSig.o)
UOBJS := $(UOBJS) setSig.o

ULIST := $(ULIST) $(LUSER)(setSpeed.o)
UOBJS := $(UOBJS) setSpeed.o

ULIST := $(ULIST) $(LUSER)(setAccel.o)
UOBJS := $(UOBJS) setAccel.o

ULIST := $(ULIST) $(LUSER)(updateTrans.o)
UOBJS := $(UOBJS) updateTrans.o

ULIST := $(ULIST) $(LUSER)(motionRequest.o)
UOBJS := $(UOBJS) motionRequest.o

ULIST := $(ULIST) $(LUSER)(setJbias.o)
UOBJS := $(UOBJS) setJbias.o

ULIST := $(ULIST) $(LUSER)(defaultValues.o)
UOBJS := $(UOBJS) defaultValues.o

ULIST := $(ULIST) $(LUSER)(setLimit.o)
UOBJS := $(UOBJS) setLimit.o

ULIST := $(ULIST) $(LUSER)(setDistance.o)
UOBJS := $(UOBJS) setDistance.o

ULIST := $(ULIST) $(LUSER)(setMisc.o)
UOBJS := $(UOBJS) setMisc.o

ULIST := $(ULIST) $(LUSER)(setMonitors.o)
UOBJS := $(UOBJS) setMonitors.o

ULIST := $(ULIST) $(LUSER)(setComply.o)
UOBJS := $(UOBJS) setComply.o

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

# special rule to build independent control level modules

trtestCtrl.o:  trtestCtrl.c
	$(RCC) $(CFLAGS) -c CTRL $<

ftestCtrl.o:  ftestCtrl.c
	$(RCC) $(CFLAGS) -c CTRL $<

testVmCtrl.o:  testVmCtrl.c
	$(RCC) $(CFLAGS) -c CTRL $<

testSetCtrl.o:  testSetCtrl.c
	$(RCC) $(CFLAGS) -c CTRL $<

testTransCtrl.o:  testTransCtrl.c
	$(RCC) $(CFLAGS) -c CTRL $<

testTgenCtrl.o:  testTgenCtrl.c
	$(RCC) $(CFLAGS) -c CTRL $<

testSyncCtrl.o:  testSyncCtrl.c
	$(RCC) $(CFLAGS) -c CTRL $<

testMiscCtrl.o:  testMiscCtrl.c
	$(RCC) $(CFLAGS) -c CTRL $<

testJbCtrl.o:  testJbCtrl.c
	$(RCC) $(CFLAGS) -c CTRL $<

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

clean_testsuite:
		$(RMCMD) $(TEST)

clean::
	$(RMCMD) $(JUNKFILES) *.o *.to *.tO
	$(RMCMD) *test $(TEST)

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

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

