# Imakefile for AthenaTools plotter widget set, V6.0
#
# Destination directories for the library, include files, and man
# pages.  These should be changed to the directories where you
# want to install the plotter widget library, include files, and man pages
# The headers will be in $(ATINCDIR)/At.
# The man pages will have the name $(ATMANDIR)/AtPlot.$(ATMANSUFFIX)

ATLIBDIR        = /usr/lib
ATINCDIR        = /usr/include

# Define one of these to force use of either ansi of traditional compilers.
# Defining neither will use the default compiler.
# The library compiles without warnings with either cc or gcc -Wall (1.40)
# Full prototypes on the library are used if __STDC__ is available, and
# XTFUNCPROTOS are used if USE_GCC is defined.
# USE_GCC is probably incompatable with shared libraries unless you have
# hacked your Imake.rules to use LIB_CC instead of CC wherever -pic is used.
#undef  USE_GCC
#undef  USE_CC
CDEBUGFLAGS = -g

# Define this to allow shared libraries to be built; undef it to forbid them.
#undef SHARED_LIB_VERSION 4.0

# Define this if you don't have strcasecmp and strncasecmp in your C library.
# This is required for SunOs < 4.1.
#undef  NEED_STRCASECMP

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

# 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!
#
# _AtDevelopment_ looks in . for include files, not /usr/include/At
#
# X11R4_INTRINSICS required if Xt is R4 or greater
#       (actually, it probably no longer compiles under R3)
#
# USE_SMALLER_FONTS for using smaller fonts than default. klin
#
# DFLT_FONTFAMILY=\"font_family\" for using another font family than the
#       default family "new century schoolbook". klin
#
DEFINES = -D_AtDevelopment_ -DX11R4_INTRINSICS \
	  -DUSE_SMALLER_FONTS -DDFLT_FONTFAMILY=\"helvetica\"

# Some imake setups have MAKEDIRHIER badly defined in the template file...
MKDIRHIER = mkdirhier.sh

#################################################################
#
#  You shouldn't need to edit from here on
#
#################################################################

# The default build target
all::

# Should be including Library.tmpl but that isn't exported
# A BBY local hack in Imake.rules has $(LIB_CC) instead of $(CC) on every
# line that has -pic in it.  This allows us to use gcc on the non-shared
# library, and cc on the shared library.
LIB_CC = LibraryCcCmd

# Need this so gcc will find its own header files instead of standard ones!
#TOP_INCLUDES=

#ifdef USE_GCC
# GCC has prototypes, so enable them for better error checking
CC = gcc -fpcc-struct-return -Wall -DXTFUNCPROTO
#endif

#ifdef USE_CC
CC = cc
#endif

# 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

#ifdef NEED_STRCASECMP
STRCASECMP = strcasecmp.c
STRCASECMP_O = strcasecmp.o
#else
CASECMP_C = strcasecmp.c
#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)

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.
################

#ifdef SHARED_LIB_VERSION

SharedLibraryObjectRule()

SpecialSharedObjectRule(FontFamilyPS.o, FontFamilyPS.c, -DAFMPATH=$(AFMPATH))

NormalSharedLibraryTarget(At,SHARED_LIB_VERSION, $(OBJS))

InstallSharedLibrary(At,SHARED_LIB_VERSION, $(ATLIBDIR))

#else /* No Shared Libraries */

NormalLibraryObjectRule()

SpecialObjectRule(FontFamilyPS.o, FontFamilyPS.c, -DAFMPATH=$(AFMPATH))

#endif /* Shared Libraries */

NormalLibraryTarget(At,$(OBJS))

MakeDirectories(install, $(ATLIBDIR))
InstallLibrary(At, $(ATLIBDIR))

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

################
# Rule for makedepend
################
DependTarget()
