# Generated automatically from Makefile.in by configure.
#
# Makefile for Fl_Editor widgets and example programs.
# Copyright 1999, 2000 by Robert Kesterson.
#
# Makefile based on Widget Contribution Kit
# Copyright 1999 by Michael Sweet.
#
# Permission is granted to use, copy, modify, and redistribute this file as
# needed.
#

#
# Programs...
#

AR	=	/usr/bin/ar
CC	=	gcc
CXX	=	c++
RANLIB	=	ranlib
RM	=	/bin/rm -f
SHELL	=	/bin/sh
DSOCOMMAND	=       
DSONAME         =       
GLLIB	=	 -lGLU -lGL
FLTKROOT	=	/home/robertk/development/fltk_2.x/fltk
FLTKLIBDIR	=	/home/robertk/development/fltk_2.x/fltk/lib

#
# Program options...
#

ARFLAGS	=	crvs
CFLAGS	=	-I. -I$(FLTKROOT) -g -O2 -I/usr/X11R6/include -DFLTK2
CXXFLAGS =	-I. -I$(FLTKROOT) -g -O2 -I/usr/X11R6/include -DFLTK2
LIBS	=	$(FLTKLIBDIR)/libfltk.a -L$(FLTKROOT)/lib  -lXext -lX11 -lm  $(GLLIB)
LDFLAGS	=	-g -O2 -L/usr/X11R6/lib

#
# Rules...
#

.SILENT:
.SUFFIXES:	.c .cxx .h .o
.c.o:
	echo Compiling $<...
	$(CC) $(CFLAGS) -c $< -o $(<D)/$(basename $(<F)).o 
.cxx.o:
	echo Compiling $<...
	echo $(CXX) $(CXXFLAGS) -c $< -o $(<D)/$(basename $(<F)).o
	$(CXX) $(CXXFLAGS) -c $< -o $(<D)/$(basename $(<F)).o


#
# Local include files
#

INCLUDEDEPS = FL/Fl_Editor.H FL/Fl_FancyEditor.H FL/Fl_ProgressBox.H \
        FL/Fl_StatusPanel.H FL/editengine.h FL/editvars.h FL/lists.h \
        FL/stringsup.h FL/wstring.h        

#
# Make all targets...
#

all:	libfleditor.a $(DSONAME) test

#
# Remove object and target files...
#

clean:
	$(RM) src/*.o
	$(RM) test/*.o
	$(RM) test/multiple
	$(RM) test/single
	$(RM) test/simple
	$(RM) test/progress
	$(RM) test/status
	$(RM) libfleditor.a
	$(RM) libfleditor.so*

distclean: clean
	$(RM) config.cache
	$(RM) config.log
	$(RM) config.status

install: libfleditor.a
	echo "Installing library to $(FLTKLIBDIR)"
	cp libfleditor.a $(FLTKLIBDIR)	

#
# Make the test programs.
#

test: test/progress test/simple test/single test/status test/multiple 

test/progress: test/progress.o 
	echo Building $@ test program
	echo $(CXX) $(LDFLAGS) $^ libfleditor.a $(LIBS) -o $@
	$(CXX) $(LDFLAGS) $^ libfleditor.a $(LIBS) -o $@

test/simple: test/simple.o 
	echo Building $@ test program
	$(CXX) $(LDFLAGS) $^ libfleditor.a $(LIBS) -o $@

test/status: test/status.o 
	echo Building $@ test program
	$(CXX) $(LDFLAGS) $^ libfleditor.a $(LIBS) -o $@

test/single: test/single.o 
	echo Building $@ test program
	$(CXX) $(LDFLAGS) $^ libfleditor.a $(LIBS) -o $@

test/multiple: test/multiple.o test/multfunc.o
	echo Building $@ test program
	$(CXX) $(LDFLAGS) $^ libfleditor.a $(LIBS) -o $@

#
# Make the editor widget library.
#

EDITOR_OBJS = src/Fl_Editor.o src/Fl_FancyEditor.o src/Fl_FancyMultiEditor.o \
        src/Fl_MultiEditor.o src/Fl_ProgressBox.o src/Fl_StatusPanel.o \
        src/editengine.o src/lists.o src/wstring.o

libfleditor.a:	$(EDITOR_OBJS)
	echo Building library $@...
	$(RM) libfleditor.a
	$(AR) $(ARFLAGS) libfleditor.a $(EDITOR_OBJS)
	$(RANLIB) libfleditor.a

libfleditor.so:	$(EDITOR_OBJS)
	echo Building library $@...
	$(RM) libfleditor.so
	  $(EDITOR_OBJS)
#        echo $(DSOCOMMAND) $(DSONAME)
#	$(LD) -shared $(LDFLAGS) -o $@ $^ 


$(EDITOR_OBJS):	$(INCLUDEDEPS)

#
# End of Makefile.
#
