# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.72 92/09/14 11:44:22 rws Exp $


#
# Use 'make makeconfigs' to run config.status in every directory
# Run 'make makedepends' to make depend in each directory
# Run 'make all' to make install.incs in each dir, then make install in each
#     dir

# The cpp used on this machine replaces all newlines and multiple tabs and
# spaces in a macro expansion with a single space.  Imake tries to compensate
# for this, but is not always successful.
#

###########################################################################
# Makefile generated from "Imake.tmpl" and </tmp/IIf.a002WM>
# $Id: Makefile,v 1.2 1997/02/23 00:46:53 sib Exp $
#
# Platform-specific parameters may be set in the appropriate .cf
# configuration files.  Site-wide parameters may be set in the file
# site.def.  Full rebuilds are recommended if any parameters are changed.
#
# If you absolutely can't get imake to work, you'll need to set the
# variables at the top of each Makefile as well as the dependencies at the
# bottom (makedepend will do this automatically).
#

###########################################################################
# Platform-specific configuration parameters - edit vx68k.cf to change
###########################################################################

# Platform:  $Id: Makefile,v 1.2 1997/02/23 00:46:53 sib Exp $

VXWORKS_DIR			= /usr/vxworks/vx5.2
VXWORKS_COMP_DIR		= /usr/rti/gnu/sparcSol2-m68k/bin

###########################################################################
# Site-specific configuration parameters - edit site.def to change
###########################################################################

# Site:  $Id: Makefile,v 1.2 1997/02/23 00:46:53 sib Exp $

###########################################################################
# Configured Parameters
# $Id: Makefile,v 1.2 1997/02/23 00:46:53 sib Exp $
###########################################################################

RELEASE_DIR	= /usr/sib/lri/software/vx68k

CURRENT_DIR	= .

CC		= $(VXWORKS_COMP_DIR)/g++
CCC		= $(VXWORKS_COMP_DIR)/g++
CFG_CFLAGS	= -B/usr/rti/gnu/sparcSol2-m68k/lib/gcc-lib/ -DCPU=MC68030 -DVXWORKS -DVX68K -I$(VXWORKS_DIR)/h
CFG_CPPFLAGS.cfg=

LD		= $(VXWORKS_COMP_DIR)/m68k-ld
CFG_LDFLAGS	=

RANLIB		= $(VXWORKS_COMP_DIR)/m68k-ranlib

AR		= $(VXWORKS_COMP_DIR)/m68k-ar

INSTALL		= install
RM		= rm -f
MV		= mv -f

COMPILE.c	= $(CC) $(CFLAGS) $(CPPFLAGS) -c

COMPILE.cc	= $(CCC) $(CFLAGS) $(CPPFLAGS) -c

LINK.c		= $(LD) $(LDFLAGS) -r

###########################################################################
# Imake rules for building libraries, programs, scripts, and data files
# rules:  $Id: Makefile,v 1.2 1997/02/23 00:46:53 sib Exp $

###########################################################################
# start of Imakefile
###########################################################################

# ############################################################################
#       $Id: Makefile,v 1.2 1997/02/23 00:46:53 sib Exp $
# $Revision: 1.2 $
#     $Date: 1997/02/23 00:46:53 $
#   $Author: sib $
#    $State: Exp $
#
# PROJECT:	Carnegie Mellon Lunar Rover Terestrial Prototype
#
# FILE:		Imakefile (Imakefile.proto,v 1.11 1994/03/10 21:16:17 jwest)
#
# DESCRIPTION:
#  This imakefile is for building the objects for the gait planning.
#  Note: RELEASE_DIR and CFG_* are predefined.
#
# EXPORTS:
#  First use configure [vx68k, sun4, etc] and a make file will be created.
#  Make targets available after configure: all, libs, bins, install,
#  install.bins, install.incs,install.libs install.mans clean and objects.
#
# HISTORY:
#  Use "cvs log".
#
# (c) Copyright 1994 Carnegie Mellon University. All rights reserved.
# ############################################################################

.KEEP_STATE:

# Subdirectories
DEV_SUBDIRS   = devices/vadc devices/vadm devices/vcpu devices/vmio devices
INTER_SUBDIRS = interfaces/dac interfaces/di interfaces/do interfaces/encoder \
		interfaces/relay interfaces/serial interfaces/adc interfaces 
COMPON_SUBDIRS= components/pid components/traject components/compass \
		components/amps components/gps components/imu \
		components/misc components/pots components/temps components 
MODULE_SUBDIRS= modules/drive modules/pointing modules/netcomm modules
SUBDIRS       = common $(DEV_SUBDIRS) $(INTER_SUBDIRS) $(COMPON_SUBDIRS) \
		$(MODULE_SUBDIRS) robot test


# Paths
INSTALL_DIR   = ..

INC_PATH      = -I. \
		-I$(INSTALL_DIR)/include \
		-I$(RELEASE_DIR)/include \
		-I$(GNU_DIR)/include/gcc \
		-I/usr/local/include \
		-I/usr/include

LIB_PATH      = -L. \
		-L$(INSTALL_DIR)/lib \
		-L$(RELEASE_DIR)/lib \

# Compiler Options
DEFINES	      = -DVERBOSE \
		-DBOMBASTIC
CFLAGS        = -g -Wall -Wshadow -Wpointer-arith -Wcast-qual $(CFG_CFLAGS)
CPPFLAGS      = $(DEFINES) $(INC_PATH) $(CFG_CPPFLAGS)

# Loader Options - NONE

# Sources and Objects - NONE

FILES_TO_CLEAN	      = core \#*\# *~ .*~ *.o *.bak .*.state

# ############################################################################
# Targets
# ############################################################################

configure := RECURSE_CMD = \
	cd $@; make

all: makeinstallincs makeinstall

makeinstallincs:: emptyrule
	for i in $(SUBDIRS) -dummy-; do \
	  if [ -f ./$$i/Makefile ]; then \
            if (cd ./$$i; make install.incs); \
	    then true; else exit 1; fi \
	  else true; fi; \
	done

makeinstall:: emptyrule
	for i in $(SUBDIRS) -dummy-; do \
	  if [ -f ./$$i/Makefile ]; then \
            if (cd ./$$i; make install); \
	    then true; else exit 1; fi \
	  else true; fi; \
	done

makedepends:: emptyrule
	for i in $(SUBDIRS) -dummy-; do \
	  if [ -f ./$$i/Makefile ]; then \
            if (cd ./$$i; make depend); \
	    then true; else exit 1; fi \
	  else true; fi; \
	done

makeconfigs:: emptyrule
	for i in $(SUBDIRS) -dummy-; do \
	  if [ -f ./$$i/Makefile ]; then \
            if (cd ./$$i; ./config.status); \
	    then true; else exit 1; fi \
	  else true; fi; \
	done


$(SUBDIRS): emptyrule
	cd $@; make



###########################################################################
# common rules for all Makefiles - do not edit

emptyrule::

bins:: emptyrule
libs:: emptyrule

clean:: $(SUBDIRS)

clean::
	$(RM) $(FILES_TO_CLEAN)

uninstall:: $(SUBDIRS)
	$(RM_INSTALL_CMD) $(INSTALL_FILE_LIST)

.c.o:
	$(COMPILE.c) -o $@ $<

# C++ support

.SUFFIXES: suffixes .cc .cxx
.cc:
	$(LINK.c) -o $@ $< $(LDLIBS)
.cc.o:
	$(COMPILE.cc) -o $@ $<
.cxx:
	$(LINK.c) -o $@ $< $(LDLIBS)
.cxx.o:
	$(COMPILE.cc) -o $@ $<

###########################################################################
# rules for building in SUBDIRS - do not edit

allSubdirs:: $(SUBDIRS)

installFiles.bins:: emptyrule
installFiles.incs:: emptyrule
installFiles.libs:: emptyrule
installFiles.mans:: emptyrule

install: install.incs install.libs install.binsMans

install.binsMans: $(SUBDIRS) installFiles.bins installFiles.mans
install.incs: $(SUBDIRS) installFiles.incs
install.libs: $(SUBDIRS) installFiles.libs

all := RECURSE_CMD = \
	cd $@; \
	$(MAKE)

allSubdirs := RECURSE_CMD = \
	cd $@; \
	$(MAKE)

install := RECURSE_CMD = \
	cd $@; \
	$(MAKE) install

install.binsMans := RECURSE_CMD = \
	cd $@; \
	$(MAKE) install.binsMans

install.incs := RECURSE_CMD = \
	cd $@; \
	$(MAKE) install.incs

install.libs := RECURSE_CMD = \
	cd $@; \
	$(MAKE) install.libs

uninstall := RECURSE_CMD = \
	cd $@; \
	$(MAKE) uninstall

clean := RECURSE_CMD = \
	cd $@; \
	$(MAKE) clean

depend:
	makedepend $(INC_PATH) -I$(VXWORKS_DIR)/h *.cxx *.c *.cc *.c++ *.cpp

$(SUBDIRS): emptyrule
	$(RECURSE_CMD)

