include ../../make.include

CXXFLAGS = $(CXXOPT) \
	-I. -I.. -I../widget -I../vector -I../list -I../util \
	-I../../include -I$(X11INCLUDE)

SRC	= \
	cbgrid.C \
	colorbarbase.C \
	colorbar.C \
	colortag.C \
	colorbartrue.C \
	colorbartruecolor.C \
	colorbartruecolor8.C \
	colorbartruecolor16.C \
	colorbartruecolor24.C \
	colorbarrgb.C \
	colorbarrgbtruecolor.C \
	colorbarrgbtruecolor8.C \
	colorbarrgbtruecolor16.C \
	colorbarrgbtruecolor24.C \
	colormap.C \
	lut.C \
	sao.C \
	default.C \
	parser.C \
	lex.C \
	lutparser.C \
	lutlex.C \
	saoparser.C \
	saolex.C

INCLS	= $(wildcard *.h)
OBJS	= $(SRC:%.C=%.o)

all	: $(OBJS)

clean	: FORCE
	rm -f core *~ *#

distclean : clean
	rm -f *.o parser.output lutparser.output saoparser.output

parsers	: parser lutparser saoparser

parser	: FORCE
	bison -d -p cb -o parser.C parser.Y
	flex -Pcb -olex.C lex.L

lutparser: FORCE
	bison -d -p rgb -o lutparser.C lutparser.Y
	flex -Prgb -olutlex.C lutlex.L

saoparser: FORCE
	bison -d -p li -o saoparser.C saoparser.Y
	flex -Pli -osaolex.C saolex.L

FORCE	:
