# This file is part of Cubix, a simple Basic interpreter
# Copyright (C) 1999-2000 Ariya Hidayat, ariya@tf.itb.ac.id
#
# Cubix is free software; you can redistribute it and/or modify it
# under the terms of the Artistic License (see the file LICENSE)

CC = gcc
CFLAGS = -O2 -Wall
LEX = flex -L
BISON = bison -d

TARGET = cubix
FILES = gram.c lex.c main.c cxengine.c

$(TARGET): basic.l basic.y $(FILES)
	$(CC) $(CFLAGS) -o $(TARGET) $(FILES)

lex.c: basic.l
	$(LEX) -olex.c basic.l

gram.c: basic.y
	$(BISON) -o gram.c basic.y

clean:
	rm $(TARGET)
	rm gram.h gram.c
	rm lex.c
