
CC_FLAGS=$(CFLAGS) $(SYS_ERR) -DINST_DIR='"$(INST_DIR)"'
CC_OPT= -g

YACC_FLAGS= -d


MODS=mod_std.o mod_msql.o
EXTRA_LIBS= ../timelib/libtime.a


all: parser.o symtab.o types.o code-gen.o code-sim.o extern.o fcrypt.o mod_std.o mod_msql.o lib.o


!yacc parser.y

#!object symtab.o symtab.c
#!object types.o types.c
#!object code-gen.o code-gen.c
#!object code-sim.o code-sim.c
#!object extern.o extern.c
#!object fcrypt.o fcrypt.c
#!object lib.o lib.c
!object mod_std.o mod_std.c
!object mod_msql.o mod_msql.c

!library liblite.a symtab.c,types.c,code-gen.c,code-sim.c,extern.c,fcrypt.c,lib.c parser.o

!libinstall liblite.a $(INST_DIR)/lib/liblite.a 744 $(ROOT)
!install mod_std.o $(INST_DIR)/lib/mod_std.o 744 $(ROOT)
!install mod_msql.o $(INST_DIR)/lib/mod_msql.o 744 $(ROOT)
!install mod_std.h $(INST_DIR)/include/mod_std.h 744 $(ROOT)
!install mod_msql.h $(INST_DIR)/include/mod_msql.h 744 $(ROOT)
!install lite.h $(INST_DIR)/include/lite.h 744 $(ROOT)


#
# Debugging compilations
#
# Note : if you want to build lextest and you are using the GNU cpp (for
# example, you are using gcc to compile this code) you'll have to put
# -traditional in the compilation line below.  If you don't, you'll get
# some ANSI cpp garbage that doesn't let you expand a macro param within
# quotes.  In this case you'll get a line of 'x' characters down the left
# side of the screen when you run lextest.
#

lextest: lexer.c
	$(CC) $(CFLAGS) -DLEX_DEBUG -DNOTDEF -g -o lextest lexer.c

lite_lextest: lite_lex.c
	$(CC) $(CFLAGS) -DLEX_DEBUG -DNOTDEF -g -o lite_lextest lite_lex.c


mod_std.o: lite.h ../common/portability.h ../common/config.h 
mod_std.o: ../msql/msql.h ../regexp/regexp.h

mode_msql.o: lite.h ../common/portability.h ../common/config.h 
mode_msql.o: ../msql/msql.h ../regexp/regexp.h

types.o: Memory.h code-gen.h mod_msql.h mod_std.h types.h
types.o: version.h lite.h y.tab.h
types.o: lite.h ../common/portability.h ../common/config.h 

code-gen.o: Memory.h code-gen.h mod_msql.h mod_std.h types.h
code-gen.o: version.h lite.h y.tab.h
code-gen.o: lite.h ../common/portability.h ../common/config.h 

code-sim.o: Memory.h code-gen.h mod_msql.h mod_std.h types.h
code-sim.o: version.h lite.h y.tab.h
code-sim.o: lite.h ../common/portability.h ../common/config.h 

extern.o: Memory.h code-gen.h mod_msql.h mod_std.h types.h
extern.o: version.h lite.h y.tab.h
extern.o: lite.h ../common/portability.h ../common/config.h 

fcrypt.o: Memory.h code-gen.h mod_msql.h mod_std.h types.h
fcrypt.o: version.h lite.h y.tab.h
fcrypt.o: lite.h ../common/portability.h ../common/config.h 
