# Makefile
#  Makefile for generating full version of creature files
#
# $Id$
#
# This file is part of the RiSE Simulation Library
#  Copyright (c) 2003 
#    Regents of The University of Michigan,
#    Carnegie Mellon University,
#    Stanford University
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the RiSE Simulator License version
# 1.0. You should have received a copy of this license along with
# this program; if not, write to <ulucs+risesim@cs.cmu.edu>.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# LICENSE file for more details.

# First, check whether we can access the RHexLib directory.
ifndef SIMLIB_DIR
$(error SIMLIB_DIR environment variable is not defined!)
endif

include $(SIMLIB_DIR)/tools/tooldefs.mk

MPP = m4

M4SOURCES = rhex.cdl

M4OBJECTS = rhex.ocdl rhexspring.ocdl

all: $(M4OBJECTS)

rhex.ocdl: rhex.cdl ground.cdl
	$(MPP) $< > $@

rhexspring.ocdl: rhex.cdl ground.cdl
	$(MPP) -DUSESPRING $< > $@

clean:
	@rm -f *.ocdl *~


