##
##  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/, one of:
##    Makefile.vars.gcc.Sun   -  For gcc on a Sun
##    Makefile.vars.gcc.HP    -  For gcc on an HP
##    Makefile.vars.CC.Sun    -  For ObjectCenter's CC on a Sun
##    Makefile.vars.CC.HP     -  For ObjectCenter's CC on an HP
##

# Default build has these parameters.  Override these to get different
# versions of the library (see, for instance,  the "static:" target below)

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

# AM_SAMPLE_FLAGS: chooses one of the sets of extra compiler flags for
# building all the Amulet sample applications and test programs.
# Use AM_NODEBUGSYM to decrease the size of the applications on
# platforms that produce large amounts of debugging information!
AM_SAMPLE_FLAGS=$(AM_DEVELOP)

# LIB_MAKE: chooses the platform-specific library makefile.  Used to 
# select static or shared linking.
# LIB_MAKE=$(AM_STATIC_LIB_MAKE)
LIB_MAKE=$(AM_SHARED_LIB_MAKE)

# LIB_MODIFIER: appended to library filename to indicate particular OP choice.
# e.g., blank for AM_DEVELOP, -release for AM_RELEASE, -inhouse for AM_INHOUSE,
LIB_MODIFIER=

all: testoutline$(E)

include $(AMULET_DIR)/bin/Makefile.vars

CFLAGS = $(OP) $(AM_CFLAGS) -DDEFAULT_AMULET_DIR=\"$(AMULET_ROOT)\"
.SUFFIXES: .cc

## abbreviations
OUT=$(AM_EXE_OUT)
O=$(AM_OBJ_SUFFIX)
E=$(AM_EXE_SUFFIX)

# Gem: platform-independent graphics and IO
include $(AMULET_DIR)/bin/$(AM_GEM_SOURCE)

# include the platform-specific file
include $(AMULET_DIR)/bin/$(LIB_MAKE)


############################################################

OUTLINE_DIR = $(AMULET_DIR)/contrib/outline

OUTLINE_MODULE = $(OUTLINE_DIR)/testoutline$(O) $(OUTLINE_DIR)/outline$(O)


# testoutline$(E):: # $(NEEDS_ALL)
# testoutline$(E):: #

testoutline:: $(OUTLINE_MODULE)
	$(PURIFY) $(CC) $(CFLAGS) $(OUTLINE_MODULE) \
	$(USES_ALL) $(AM_LIB_LDFLAGS) $(AM_LIBS) $(OUT)testoutline$(E)

#	$(CC) $(AM_CFLAGS) testoutline.o outline.o \
#	-L$(LIB_DIR) -lamulet $(AM_LIBS)   \
#	-o testoutline

# outline.o: outline.cc
# 	$(CC) $(OP) $(AM_CFLAGS) -c outline.cc

# testoutline.o: testoutline.cc
# 	$(CC) $(OP) $(AM_CFLAGS) -c testoutline.cc

clean:
	-rm testoutline *~ *.o
