# 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 <rbtname>	- build the "moper" program for a particular robot.
#
# make <prog>		- build a test program for loading into the LSI-11
#
# -----------------------------------------------------------------------------

CC11 = ../Xcompile/bin/cc11
LD11 = ../Xcompile/bin/ld11
CC11FLAGS = -O
CC11LIBS = ../Xcompile/lib/libc.a

SYS =	locore.o exit.o kernel.o serialDev.o

.c.o:	;	$(CC11) $(CC11FLAGS) -c $*.c
.s.o:	;	$(CC11) $(CC11FLAGS) -cppAsm -c $*.s

install:	puma560

MOPER =		moperx.o rbtControl.o sensorIO.o puma.o

goldenChild:  $(MOPER) goldenChild.o drv11.o $(SYS)
	$(LD11) -T 010000 -o goldenChild $(SYS) $(MOPER) goldenChild.o drv11.o $(CC11LIBS)

golden.xy2d:  $(MOPER) goldenChild.o drv11.xy2d.o $(SYS)
	$(LD11) -T 010000 -o golden.xy2d $(SYS) $(MOPER) goldenChild.o drv11.xy2d.o $(CC11LIBS)

frank:  $(MOPER) frank.o drv11.o $(SYS)
	$(LD11) -T 010000 -o frank $(SYS) $(MOPER) frank.o drv11.o $(CC11LIBS)

frank.xy2d:  $(MOPER) frank.o drv11.xy2d.o $(SYS)
	$(LD11) -T 010000 -o frank.xy2d $(SYS) $(MOPER) frank.o drv11.xy2d.o $(CC11LIBS)

puma760:  $(MOPER) puma760.o drv11.o $(SYS)
	$(LD11) -T 010000 -o puma760 $(SYS) $(MOPER) puma760.o drv11.o $(CC11LIBS)

puma560:  $(MOPER) puma560.o drv11.o $(SYS)
	$(LD11) -T 010000 -o puma560 $(SYS) $(MOPER) puma560.o drv11.o $(CC11LIBS)

puma260:  $(MOPER) puma260.o drv11.o $(SYS)
	$(LD11) -T 010000 -o puma260 $(SYS) $(MOPER) puma260.o drv11.o $(CC11LIBS)

drivertest:  drivertest.o drv11.o $(SYS)
	$(LD11) -T 010000 -o drivertest $(SYS) drivertest.o drv11.o $(CC11LIBS)

interrupt:  interrupt.o $(SYS)
	$(LD11) -T 010000 -o interrupt $(SYS) interrupt.o $(CC11LIBS)

test:  test.o $(SYS)
	$(LD11) -T 010000 -o test $(SYS) test.o $(CC11LIBS)

dumpRam:  dumpRam.o $(SYS)
	$(LD11) -T 010000 -o dumpRam $(SYS) dumpRam.o $(CC11LIBS)

pendantTest:  pendantTest.o $(SYS)
	$(LD11) -T 010000 -o pendantTest $(SYS) pendantTest.o $(CC11LIBS)

adc:  adc.o $(SYS)
	$(LD11) -T 010000 -o adc $(SYS) adc.o $(CC11LIBS)

clean::
	rm -f *.o *.BAK
	rm -f puma260 puma560 puma760 frank goldenChild
	rm -f testhostIO drivertest interrupt dumpRam

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

depend::
	@if [ -f DependFile ] ; then 	   echo mv DependFile DependFile.BAK; 	   mv DependFile DependFile.BAK; else exit 0; fi

	   $(CC11) -M *.[cs] | $(BDIR)/packdeps > DependFile

DependFile:
include DependFile

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

depend::

clean::

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

