# **********************************************************************
#	ALGA: Assembler-Like Grammar trAnslation support.
# **********************************************************************
#***********************************
# (C) Copyright 1992-1993; dit/upm
#  Distributed under the conditions stated in the
#  EPS General Public License (see file LICENSE)
#***********************************
# $Id: makefile,v 1.19 1995/01/17 11:12:43 eps Exp $
#***********************************

TOOL=	alga
TRGT=	lib$(TOOL).a
INST=	inst-lib inst-hdr

INCDIRS= -I$(EPSINC)
LIBDIRS= -L$(EPSLIB)
CFLAGS= $(CF_DBX) $(INCDIRS)

LINTFLAGS= -abhx -Dexit=_exit

DESC=	bsc_dcls.desc  lnt_pass.desc  err_handl.desc prg_error.desc \
	mem_alloc.desc bsc_input.desc fld_basic.desc fld_input.desc \
	rec_basic.desc rec_input.desc rec_query.desc rec_draw.desc  \
	indent.desc
HDRS=	bsc_dcls.hh  lnt_pass.hh  err_handl.hh prg_error.hh \
	mem_alloc.hh bsc_input.hh fld_basic.hh fld_input.hh \
	rec_basic.hh rec_input.hh rec_query.hh rec_draw.hh  \
	indent.hh
CODE=	err_handl.c prg_error.c mem_alloc.c bsc_input.c fld_basic.c \
	fld_input.c rec_basic.c rec_input.c rec_draw.c  indent.c
OBJS=	err_handl.o prg_error.o mem_alloc.o bsc_input.o fld_basic.o \
	fld_input.o rec_basic.o rec_input.o rec_draw.o  indent.o

all::	$(TRGT)

$(TRGT):	$(OBJS)
	ar rcv $@ $(OBJS)
	-ranlib $@

BASIC_HH=	bsc_dcls.hh  lnt_pass.hh  err_handl.hh prg_error.hh
FLD_INPUT_HH=	bsc_input.hh fld_basic.hh fld_input.hh
REC_INPUT_HH=	rec_basic.hh rec_input.hh
REC_DRAW_HH=	rec_basic.hh rec_draw.hh
REC_QUERY_HH=	rec_basic.hh rec_query.hh

err_handl.o:	bsc_dcls.hh lnt_pass.hh err_handl.hh
prg_error.o:	$(BASIC_HH) bsc_input.hh
mem_alloc.o:	$(BASIC_HH) mem_alloc.hh
bsc_input.o:	$(BASIC_HH) mem_alloc.hh bsc_input.hh
fld_basic.o:	$(BASIC_HH) mem_alloc.hh fld_basic.hh
fld_input.o:	$(BASIC_HH) mem_alloc.hh $(FLD_INPUT_HH)
rec_basic.o:	$(BASIC_HH) mem_alloc.hh rec_basic.hh
rec_input.o:	$(BASIC_HH) mem_alloc.hh $(FLD_INPUT_HH) $(REC_INPUT_HH)
rec_draw.o:	$(BASIC_HH) fld_basic.hh $(REC_DRAW_HH)
indent.o:	$(BASIC_HH) mem_alloc.hh indent.hh

install:	$(INST)
	touch $@

inst-lib:	$(TRGT)
	cp $(TRGT) $(EPSLIB)
	-cd $(EPSLIB); ranlib $(TRGT)
	chmod a+r $(EPSLIB)/$(TRGT)
	touch $@

inst-hdr:	$(TOOL).hh
	cp $(TOOL).hh $(EPSINC)
	chmod a+r $(EPSINC)/$(TOOL).hh
	touch $@

clean::
	-rm -f $(OBJS) $(TRGT)
	-rm -f $(INST)
	-rm -f *~ core

#------------------------------------------------------------------
