
# $Id: Makefile,v 1.21 1998/10/25 23:39:44 cthulhu Exp $

TARGET = nxlc
OBJECTS = tcl_interf.o cell.o sheet.o  string.o tkappinit.o array.o \
	utils.o canvas_interf.o cutils.o format.o sheet_calc.o event.o list.o \
	checkargs.o interf_aux.o
CCSOURCES = tcl_interf.cc cell.cc sheet_calc.cc sheet.cc string.cc   \
		tkappinit.cc array.cc utils.cc canvas_interf.cc format.cc \
		event.cc list.cc checkargs.cc interf_aux.cc
CSOURCES = cutils.c
INCLUDES = cell.hh sheet.hh etc.hh canvas.hh format.hh list.hh event.hh \
	canvas.h checkargs.hh interf_aux.hh
OTHERSOURCES = 
SOURCES = $(CSOURCES) $(OTHERSOURCES)
XXL_LIBS = $(LIBDIR)/libcalc.a $(LIBDIR)/libio.a $(LIBDIR)/libcanvas.a
LIBS =  -ltk8.0 -ltcl8.0 -lX11 -ldl -lm 

include ../Makefile.options

$(TARGET) : $(OBJECTS) $(CANVASOBJECTS) $(XXL_LIBS)
	$(CCC)  $(CCFLAGS) $(LFLAGS) -o $(TARGET) $(TARGETMAIN) $(OBJECTS) $(XXL_LIBS) $(LIBS)

test: tkappinit.o
	$(CCC)  $(LFLAGS) -o test $(TARGETMAIN) tkappinit.o $(XXL_LIBS) $(LIBS)

clean:
	rm -f *.o nxlc *~ .depend gmon.out

depend dep: 
	$(CPP) -M $(CCFLAGS) $(IFLAGS) $(CCSOURCES) $(CSOURCES) > .depend

.cc.o:
	$(CCC) $(CCFLAGS)  $(IFLAGS) -c $<

.c.o:
	$(CC) $(CCFLAGS)  $(IFLAGS) -c $<

scan.c: scan.l
	$(LEX) -i -t scan.l -oscan.c

gram.o: gram.c
	$(CCC) $(IFLAGS) -g -x c++ gram.c -o gram.o -c

gram.c: gram.y scan.c
	$(YACC) -d gram.y -o gram.c

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif

# $Log: Makefile,v $
# Revision 1.21  1998/10/25 23:39:44  cthulhu
# Added interf_aux.cc.
#
# Revision 1.20  1998/10/20 13:42:51  cthulhu
# Makefiles now support centralized preferences via Makefile.options file.
#
# Revision 1.19  1998/09/30 00:45:57  cthulhu
# Added checkargs.o.
#
# Revision 1.18  1998/08/06 21:08:39  aml
# Released alpha version of Abacus.
#
# Revision 1.17  1996/10/07 12:35:33  aml
# First cut at error handling.
# Date formats are in.
# Fixed problem with blank cell drawing.
#
# Revision 1.16  1996/09/02  10:51:23  aml
# Cell fonts created, loaded and saved.
# Row height created.
#
# Revision 1.15  1996/08/26  12:08:48  aml
# Fixed problem with several sheets. Each canvas now has its own
# canvas info.
# Fixed scroll up and down. Implemented max_row and max_col.
# Fairly stable version.
#
# Revision 1.14  1996/07/23  14:01:13  aml
# Changed canvas widget to handle special items like cell borders.
# Seems to work well. Spreadsheet size is no more limited now.
#
# Revision 1.13  1996/07/18 10:19:28  aml
# Created formats for cells.
# Load cell now makes copy of old file.
#
# Revision 1.12  1996/04/27 11:12:39  aml
# Inserted check and delete button.
# Font selection widget created.
# Fixed bug canvas_information destructor.
#
# Revision 1.11  1996/04/19 10:46:37  aml
# First cut at speeding up canvas critical functions.
# CanvasWidgetCommand is now called directly from draw_sheet.
# Fixed bug in reading values from datafiles. Also works
# for Suns now.
# Created canvas directory, replacing builtin command canvas.
#
# Revision 1.10  1996/02/13  21:55:24  aml
# Fixed problems with change to elf.
# RangeCopy created. Works !
# Pressed mouse leaving canvas will cause scroll. Works, but needs to
# keep moving.
#
# Revision 1.9  1996/02/13 12:03:48  aml
# Fixed bug with range definition via mouse.
# Fixed bug in range iterators.
#
# Revision 1.8  1996/01/07 09:07:40  aml
# Sheet::save and Sheet::load created.
# Program can now write and read wk1 files.
# Slight changes made to relative references. Bit 14 is now always 0.
#
# Revision 1.7  1996/01/03  23:07:14  aml
# Absolute and relative references to cells introduced.
# They are parsed and reverse parsed, not yet evaluated.
#
# Revision 1.6  1996/01/02  16:22:10  aml
# Formula compilation, evaluation and decompilation now work.
# Cells can be of type label, numerical formula or numbers.
#
# Revision 1.5  1995/12/30  16:41:41  aml
# First cut of formula compilation.
#
# Revision 1.4  1995/12/28  19:20:38  aml
# Created skeleton to merge calculation engine
#
# Revision 1.3  1995/12/27  23:12:37  aml
# First draft of Sheet::display
#
# Revision 1.2  1995/12/14  12:13:08  aml
# Version 0.4.2
#
# Revision 1.1  1995/12/13  14:32:17  aml
# Initial revision
#
# Revision 1.14  1995/10/23  23:09:19  aml
# Version 2.0.1
#
# Revision 1.13  1995/09/18  09:25:21  aml
# Last working release with inline expressions.
# Move to wk1 format will start after this.
#
# Revision 1.12  1995/08/18 19:37:40  aml
# Modularized to allow for multiple spreadsheets.
# Introduced bindings for cursors in main canvas.
# Introduced range_opers. Copy redone, cut created.
# Automatic positioning of active cell.
#
# Revision 1.11  1995/08/09 21:13:13  aml
# Created modular toolbars
# Changes in mouse state machine
# Completed format toolbar
#
# Revision 1.10  1995/08/09 03:41:26  aml
# Changed to tk4.0
# Changed mouse state machine to use right button
# Created standard and format toolbars.
#
# Revision 1.9  1995/08/08 02:36:15  aml
# Removed scan.c from C source files.
#
# Revision 1.8  1995/08/08 02:26:36  aml
# Fixed evaluation for loop-free spreadsheets.
# Got first version of cursor state machine working.
#
# Revision 1.7  1995/06/26  22:53:43  aml
# Bug
#
# Revision 1.6  1995/06/26  22:52:19  aml
# Change to C++
#
# Revision 1.5  1995/06/26  22:51:08  aml
# Change to C++
#
# Revision 1.4  1995/06/25  09:49:22  aml
# Minor fixes
#
# Revision 1.3  1995/06/25  00:32:39  aml
# Fixed Includes
#
# Revision 1.2  1995/06/25  00:09:10  aml
# First version of copy.
#
# Revision 1.1  1995/06/23  15:39:16  aml
# Initial revision
#
