##
##  Set your AMULET_DIR environment variable to the top-level directory for
##  the Amulet hierarchy -- all other paths are computed from this.
##
##  Set your AMULET_VARS_FILE environment variable to the name of the file
##  that describes the compiler flags you want to use.  The value of this
##  variable is the name of a file in amulet/bin

## Sets pathname variables and loads $(AMULET_VARS_FILE) to set
## compiler variables
include $(AMULET_DIR)/bin/Makefile.vars

## OP chooses one of the sets of compiler flags, defined in
## AMULET_VARS_FILE: AM_DEVELOP, AM_RELEASE, AM_INHOUSE, AM_NODEBUGSYM
OP=$(AM_DEVELOP)

## LIB_MODIFIER is appended to library filename to indicate particular
## OP choice: blank for AM_DEVELOP, -release for AM_RELEASE
LIB_MODIFIER=

## To link with the release library, invoke make as follows
##	Make OP='$(AM_RELEASE)' LIB_MODIFIER=-release

CFLAGS = $(OP) $(AM_CFLAGS)
AMULET_LIBRARY = amulet$(LIB_MODIFIER)

all: rectangle_test

objects = rectangle_test.o RectangleWidgets.o

%.o: %.cc
	$(CC) -c $(CFLAGS) $< -o $@

rectangle_test: $(objects)
	$(CC) $(CFLAGS) $(objects) -L$(LIB_DIR) -l$(AMULET_LIBRARY) $(AM_LIBS) \
	-o rectangle_test

clean:
	/bin/rm -f rectangle_test *.o *~ core
