# file: GNUmakefile
#

# define the source files
#
ISIP_FILES = *.cc

# don't define the compilation flags, leave them for the calling makefile
# 
# ISIP_CFLAGS = 

# define the installation directory (done in the calling script)
#
#ISIP_BIN = ./bin

# figure out the class name from the command line, set normal options
# automatically from this option
#

DIAG_CLASS_NAME = $(CLASS_NAME)

ifeq "$(ISIP_DIAGNOSE_MODE)" "template-diagnose"
	DIAG_CLASS_NAME = "$(CLASS_NAME)<$(TEMPLATE_DIAGNOSE_CLASS)>"
	ISIP_CFLAGS += -DTEMPLATE_DIAGNOSE $(TEMPLATE_DIAGNOSE_HEADER)
endif

ifeq "$(ISIP_DIAGNOSE_MODE)" "template-diagnose-2"
	DIAG_CLASS_NAME = "$(CLASS_NAME)<$(TEMPLATE_DIAGNOSE_CLASS),$(TEMPLATE_DIAGNOSE_CLASS)>"
	ISIP_CFLAGS += -DTEMPLATE_DIAGNOSE $(TEMPLATE_DIAGNOSE_HEADER)
endif

ifeq "$(ISIP_DIAGNOSE_MODE)" "template-diagnose-3"
	DIAG_CLASS_NAME = "$(CLASS_NAME)<$(TEMPLATE_DIAGNOSE_CLASS),$(TEMPLATE_DIAGNOSE_CLASS),$(TEMPLATE_DIAGNOSE_CLASS)>"
	ISIP_CFLAGS += -DTEMPLATE_DIAGNOSE $(TEMPLATE_DIAGNOSE_HEADER)
endif

ifeq "$(origin CLASS_NAME)" "command line"

	ISIP_CFLAGS += -include $(DIAG_HEADER)

	# define the name of the executable file (*.exe)
	#
	ISIP_EXE := $(CLASS_NAME).exe

	# define the files these source files depend on (usually include files)
	#
	ISIP_DEPS += clean
	ISIP_CFLAGS +=  -DDIAG_CLASS_NAME=$(DIAG_CLASS_NAME) 
else
	ISIP_DEPS := /ERROR/you/must/define/a/class/name
endif

# include the isip standard make template
#
include $(ISIP_DEVEL)/lib/scripts/make/compile_and_link.make

#
# end of file


