#
# Makefile for the yage program.
#
# This file is based on the one from the contribkit for FLTK by Michael Sweet.
#
# Permission is granted to use, copy, modify, and redistribute this file as
# needed.
#

#
# Programs...
#

AR	=	/usr/bin/ar
CC	=	gcc
CXX	=	g++
RANLIB	=	ranlib
RM	=	/bin/rm -f
SHELL	=	/bin/sh

#
# Program options...
#

ARFLAGS	=	crvs
CFLAGS	=	-g -O2 -I/usr/X11R6/include  -I./
CXXFLAGS =	-g -O2 -I/usr/X11R6/include -I./
LIBS	=	-lfltk  -lXext -lX11 -lm
LDFLAGS	=	-g -O2 -L/usr/X11R6/lib

# 
# sources
#
CPPFILES =\
	Fl_Multi_Value_Slider.cxx \
	Fl_Color_Chooser_A.cxx \
	Fl_Color_Button.cxx \
	Fl_Color_Menu.cxx \
	Fl_Value_Input_Spin.cxx \
	Fl_Gradient_Box.cxx \
	fl_named_rgb.cxx \
	gradient.cxx \
	gradientmain.cxx \
	gradientui.cxx
#
# Rules...
#

.SILENT:
.SUFFIXES:	.c .cxx .h .H .o .fl .cpp
.c.o:
	echo Compiling $<...
	$(CC) $(CFLAGS) -c $<
.cxx.o:
	echo Compiling $<...
	$(CXX) $(CXXFLAGS) -c $<

.cpp.o:
	echo Compiling $<...
	$(CXX) $(CXXFLAGS) -c $<

.fl.cxx:
	echo Compiling $<...
	fluid  -c $<

.fl.cpp:
	echo Compiling c$<...
	fluid  -c $<

#
# Make all targets...
#

all:	yage

#
# Remove object and target files...
#

clean:
	$(RM) *.o
	$(RM) yage

#
# Make the yage program.
#

OBJECTS= $(CPPFILES:.cxx=.o)

yage:	$(OBJECTS)
	echo Linking $@...
	$(CXX) $(LDFLAGS) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBS)

#
# End of Makefile.
#
