#*****************************************************************************
#makefile
#Copyright (C) 2006 K.Tsuchiya ltd.
#2006/08/29
#... fridge makefile.
#*****************************************************************************

LEX=flex
YACC=bison
CFLAGS=-O3 -g -lm -lfl -ly -lreadline 
OBJ=fridge.tab.o fridge.yy.o fgraph.o fgsysobj.o\
    fgstd.o fish.o



FRIDGE=fridge

$(FRIDGE):$(OBJ)
	$(CC) -o $@ $(OBJ) $(CFLAGS)

.SUFFIXES:.c.o
.c.o:
	$(CC) -c $<

$(FRIDGE).yy.c : $(FRIDGE).l $(FRIDGE).tab.h
	$(LEX) -l $< 

$(FRIDGE).tab.c $(FRIDGE).tab.h : $(FRIDGE).y
	$(YACC) $< -d


#install
install:
	./fridge ./install.fg

#depend
depend:
	makedepend *.c $(INC)

#clean
clean:
	rm -fr *.o *.bak *.yy.c *.tab.c *.tab.h *.exe fridge

# NOT DELETE THIS LINE -- make depend depends on it.
# DO NOT DELETE

