#
#       Makefile.simple for the AthenaTools Plotter Widget Set V6.0
#

# Define this if you don't have strcasecmp and strncasecmp in your C library.
#
#STRCASECMP_C=strcasecmp.c
#STRCASECMP_O=strcasecmp.o

# 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/X11/lib/afm\"

# Local includes
#
INCL=

# Local defines
#
LDEF=   -g

# 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 using smaller fonts than default.
# DFLT_FONTFAMILY=\"font_family\" for using another font family than the
#       default family "new century schoolbook".
PDEF=   -I.

# ------------------------------------------------------------

# Other defines
RM=     rm -f
LN=     ln -s
AR=     ar cq
RANLIB= ranlib
CC=     gcc
CFLAGS= $(INCL) $(LDEF) $(PDEF)

# ------------------------------------------------------------

# The default build target
all::
	$(RM) ./X11/At
	cd ./X11 && $(LN) .. At

# 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

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)

# ------------------------------------------------------------

.c.o:
	$(RM) $@
	$(CC) -c $(CFLAGS) $*.c

FontFamilyPS.o:  FontFamilyPS.c
	$(RM) $@
	$(CC) -c $(CFLAGS) -DAFMPATH=$(AFMPATH) $*.c

all:: libAt.a

libAt.a: $(OBJS)
	$(RM) $@
	$(AR) $@ $(OBJS)
	$(RANLIB) $@

clean:
	$(RM) core
	$(RM) libAt*.a
	$(RM) $(OBJS)
	$(RM) X11/At
#
#       End of Makefile.simple
#
