#
#       Imakefile for the AthenaTools Plotter Widget Set V6.0
#

# Set the following as desired.

#define DoNormalLib  YES
#define DoDebugLib   NO
#define DoProfileLib NO

#define DoSharedLib  NO
#define SHARED_LIB_VERSION 4.0          /* Don't change this */

/* #include <Library.tmpl>*/

INSTALLFLAGS = $(INSTINCFLAGS)
LINTLIBS = $(LINTXLIB) $(LINTXTOOL)

# Define this if your C library is missing strcasecmp and strncasecmp.
/*#define NEED_STRCASECMP*/

# Cpp define for the PostScript font metrics path.
# This should be changed to the path to the PS font metrics files
# on your system. Don't get rid of the quoted "s -- they're very important!
# AFMPATH = \"/usr/local/X11R5/lib/At/afm\"
AFMPATH = \"/usr/local/lib/ps\"

# Other cpp defines.
#
# DEBUG enables checking of widget classes passed to member functions etc.
#       This should probably be left defined
#
# TRACE gives verbose output of the decision making to stderr.
#       And I mean verbose.  Don't define it!
#
# USE_SMALLER_FONTS for changing font selection algorithm to use smaller fonts.
#
# DFLT_FONTFAMILY=\"font_family\" for using another font family
#       than the  default family "new century schoolbook".
DEFINES = -DUSE_SMALLER_FONTS -DDFLT_FONTFAMILY=\"helvetica\"

# Where to look for the header files while building
EXTRA_INCLUDES = -I.

# Debug flag
CDEBUGFLAGS = -O

CC=cc
#################################################################
#
#  You shouldn't need to edit from here on
#
#################################################################

# The default build target
all::
	if test ! -f ./X11/At/At.h; \
	then $(RM) ./X11; mkdir ./X11; \
	cd ./X11 && $(LN) .. At; \
	else true; fi

# Header files for the library.
HEADERS = \
	At.h\
	AxisCore.h\
	AxisCoreP.h\
	FrameAxis.h\
	FrameAxisP.h\
	Axis.h\
	AxisP.h\
	LabelAxis.h\
	LabelAxisP.h\
	XYAxis.h\
	XYAxisP.h\
	Plot.h\
	PlotP.h\
	SPlot.h\
	SPlotP.h\
	LinePlot.h\
	LinePlotP.h\
	BarPlot.h\
	BarPlotP.h\
	XYPlot.h\
	XYPlotP.h\
	XYLinePlot.h\
	XYLinePlotP.h\
	TextPlot.h\
	TextPlotP.h\
	Plotter.h\
	PlotterP.h\
	Scale.h\
	Shading.h\
	FontFamily.h\
	FontFamilyP.h\
	Text.h\
	AtConverters.h\
	patchlevel.h

#ifdef NEED_STRCASECMP
STRCASECMP_C = strcasecmp.c
STRCASECMP_O = strcasecmp.o
#endif

SRCS = \
	AtConverters.c\
	AxisCore.c\
	FrameAxis.c\
	Axis.c\
	LabelAxis.c\
	XYAxis.c\
	Plot.c\
	SPlot.c\
	LinePlot.c\
	BarPlot.c\
	XYPlot.c\
	XYLinePlot.c\
	TextPlot.c\
	Plotter.c\
	Scale.c\
	Shading.c\
	FontFamily.c\
	Text.c\
	PlotterPS.c\
	TextPS.c\
	FontFamilyPS.c\
	$(STRCASECMP_C)

OBJS = \
	AtConverters.o\
	AxisCore.o\
	FrameAxis.o\
	Axis.o\
	LabelAxis.o\
	XYAxis.o\
	Plot.o\
	SPlot.o\
	LinePlot.o\
	BarPlot.o\
	XYPlot.o\
	XYLinePlot.o\
	TextPlot.o\
	Plotter.o\
	Scale.o\
	Shading.o\
	FontFamily.o\
	Text.o\
	PlotterPS.o\
	TextPS.o\
	FontFamilyPS.o\
	$(STRCASECMP_O)

#################################################################
#
# Rules for library build.
#
#################################################################

#if ProjectX == 4

#if DoSharedLib
SharedLibraryObjectRule()
SpecialSharedObjectRule(FontFamilyPS.o, FontFamilyPS.c, -DAFMPATH=$(AFMPATH))
NormalSharedLibraryTarget(At,SHARED_LIB_VERSION, $(OBJS))
InstallSharedLibrary(At,SHARED_LIB_VERSION, $(USRLIBDIR))
#else /* No Shared Libraries */
NormalLibraryObjectRule()
SpecialObjectRule(FontFamilyPS.o, FontFamilyPS.c, -DAFMPATH=$(AFMPATH))
#endif /* Shared Libraries */

#else    /* ProjectX == 5 */

#include <Library.tmpl>
LibraryObjectRule()
SpecialLibObjectRule(FontFamilyPS.o, FontFamilyPS.c, -DAFMPATH=$(AFMPATH))
/*
#if DoSharedLib && SharedDataSeparation
SpecialObjectRule(sharedlib.o,,$(SHLIBDEF))
#endif
*/
#if DoSharedLib
#if DoNormalLib
SharedLibraryTarget(At,SHARED_LIB_VERSION, $(OBJS),shared,..)
#else
SharedLibraryTarget(At,SHARED_LIB_VERSION, $(OBJS),.,.)
#endif
/* SharedLibraryDataTarget(At,SHARED_LIB_VERSION, $(UNSHAREDOBJS)) */
InstallSharedLibrary(At,SHARED_LIB_VERSION, $(USRLIBDIR))
/* InstallSharedLibraryData(At,SHARED_LIB_VERSION, $(USRLIBDIR)) */
#endif /* Shared Libraries */

#endif /* ProjectX */

#if DoNormalLib
NormalLibraryTarget(At,$(OBJS))
InstallLibrary(At, $(USRLIBDIR))
#endif

#if DoProfileLib
ProfiledLibraryTarget(At,$(OBJS))
InstallLibrary(At_p,$(USRLIBDIR))
#endif

#if DoDebugLib
DebuggedLibraryTarget(At,$(OBJS))
InstallLibrary(At_d,$(USRLIBDIR))
#endif

LintLibraryTarget(At,$(SRCS))
InstallLintLibrary(At,$(LINTLIBDIR))
NormalLintTarget($(SRCS))

BuildIncludes($(HEADERS),At,..)

MakeDirectories(install,$(INCDIR)/At)
InstallMultiple($(HEADERS),$(INCDIR)/At)

#################################################################
#
# Rule for makedepend
#
#################################################################

DependTarget()

#
#       End of Imakefile
#
