#-----------------------------------------------------------------------------
#
# 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
rccTestProgram(rccltest,rccltest.o,rccltestCtrl.o,)

# vanilla test program template to compile any two files named
# test.c and testCtrl.c:
rccTestProgram(test,test.o,testCtrl.o,)
rccModule(test.o)

# program to test updateTrans()
rccTestProgram(testUt,testUt.o,,)

# program to test the various set and get primitives
rccTestProgram(testSet,testSet.o,testSetCtrl.o,)

# program to test the makePosition() routine
rccTestProgram(testPos,testPos.o makePosition.to,,)

# program to test the transform primitives
rccTestProgram(testTrans,testTrans.o,testTransCtrl.o,)

# program to test the virtual manipulator code 
rccTestProgram(testVm,testVm.o,testVmCtrl.o,)

# program to check the motion queue mechanism
rccTestProgram(testMq,putQueue.to,,)

# program to test the basic trajectory generator 
rccTestProgram(testTgen,testTgen.o,testTgenCtrl.o,)

# program to test the basic trajectory generator 
rccTestProgram(testSync,testSync.o,testSyncCtrl.o,)

# program to test otu some miscellaneous things
rccTestProgram(testMisc,testMisc.o,testMiscCtrl.o,)

# program to test the joint bias code
rccTestProgram(testJb,testJb.o,testJbCtrl.o,)

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

rciUserModule(makePosition)
rciUserModule(allocTransXyz)
rciUserModule(moves)
rciUserModule(rcclCreate)
rciUserModule(transSetup)
rciUserModule(teach)
rciUserModule(setSig)
rciUserModule(setSpeed)
rciUserModule(setAccel)
rciUserModule(updateTrans)
rciUserModule(motionRequest)
rciUserModule(setJbias)
rciUserModule(defaultValues)
rciUserModule(setLimit)
rciUserModule(setDistance)
rciUserModule(setMisc)
rciUserModule(setMonitors)
rciUserModule(setComply)

rciCtrlModule(cartBlend)
rciCtrlModule(jointBlend)
rciCtrlModule(jnts)
rciCtrlModule(getQueue)
rciCtrlModule(putQueue)
rciCtrlModule(robotIO)
rciCtrlModule(setpointCtrl)
rciCtrlModule(controlFxns)
rciCtrlModule(solveEqn)
rciCtrlModule(transControl)
rciCtrlModule(traject)
rciCtrlModule(constants)
rciCtrlModule(rcclSysTime)
rciCtrlModule(teachCtrl)
rciCtrlModule(setManip)
rciCtrlModule(getManip)
rciCtrlModule(copyPosition)
rciCtrlModule(pendingMotion)
rciCtrlModule(computeAccel)
rciCtrlModule(motionInit)
rciCtrlModule(syncMotions)
rciCtrlModule(rcclOptions)
rciCtrlModule(utility)
rciCtrlModule(getSpeed)
rciCtrlModule(getAccel)
rciCtrlModule(getMisc)
rciCtrlModule(rcclPause)
rciCtrlModule(rcclActive)
rciCtrlModule(solveTrans)
rciCtrlModule(getComply)
rciCtrlModule(getLimit)
rciCtrlModule(rcclErrorMsgs)
rciCtrlModule(setModes)

# special rule to build independent control level modules 

ctrlModule(trtestCtrl)
ctrlModule(ftestCtrl)
ctrlModule(testVmCtrl)
ctrlModule(testSetCtrl)
ctrlModule(testTransCtrl)
ctrlModule(testTgenCtrl)
ctrlModule(testSyncCtrl)
ctrlModule(testMiscCtrl)
ctrlModule(testJbCtrl)

maintainRciUser(libs)
maintainRciCtrl(libs)
maintainVxwLibs(vxwRccl,vxlibs)

clean_testsuite:	
		$(RMCMD) $(TEST)

makeClean(*test $(TEST))
makeDepend()
maintainVxwSubdir()
