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

#ifndef VxWorksConfig
# program to test transform multiplication
basicProgram(tmtest,tmtest.o $(TMOBJS),$(LCTREE) $(LCTRL) $(LLIBC) -lm)
basicProgram(dspltest,dspltest.o,$(LCTREE) $(LCTRL) $(LLIBC) -lm)
shadowModule(dspltest.o,dspl,-DTEST)
basicProgram(drivetest,drivetest.o,$(LCTREE) $(LCTRL) $(LLIBC) -lm)
shadowModule(drivetest.o,drive,-DTEST)
#endif

rciCtrlModule(drive)
rciCtrlModule(copyTrsf)
rciCtrlModule(trsf)
rciCtrlModule(diff)
rciCtrlModule(vect)
rciCtrlModule(dspl)
rciCtrlModule(printTrsf)
rciCtrlModule(rciPrintObj)
rciCtrlModule(trsfToVel)
#ifdef VaxArch && !defined(VxWorksConfig)
rciCtrlModuleDep(multTrsf)
rciCtrlModuleDep(quaternion)
multTrsf.o:	multTrsf.c
		cc -S multTrsf.c $(CFLAGS)
		mv multTrsf.s multTrsf.p
		/lib/cpp multTrsf.p > multTrsf.s
		rm multTrsf.p
		cc multTrsf.s $(CFLAGS) -c -b
		rm multTrsf.s

quaternion.o:	quaternion.c
		cc -S quaternion.c $(CFLAGS)
		mv quaternion.s quaternion.p
		/lib/cpp quaternion.p > quaternion.s
		rm quaternion.p
		cc quaternion.s $(CFLAGS) -c -b
		rm quaternion.s
#else
rciCtrlModule(multTrsf)
rciCtrlModule(quaternion)
#endif

maintainRciCtrl(libs)
maintainVxwLibs(vxwRobotTypes,vxlibs)

makeDepend()
makeClean(drivetest dspltest tmtest)
maintainVxwSubdir()
