EPICS = ../../../..
include Target.include
include $(EPICS)/config/CONFIG_BASE

USR_LDLIBS = -lDb -lCom
USR_LDFLAGS = -L.

LEX = $(ELEX)
YACC = $(EYACC)
YACCOPT = -l
LEXOPT = -L

DEPLIBS_BASE = $(EPICS_BASE_LIB)
DEPLIBS = ./libDb.a\
	$(DEPLIBS_BASE)/libCom.a
#	$(DEPLIBS_BASE)/libDb.a


SRCS.c = \
	../dbStaticLib.c \
	atdb_yacc.c \
	../dbta.c \
	../dbl.c \
	../dbls.c


LIBOBJS = dbStaticLib.o

LIBNAME = libDb.a

PROD = atdb dbl dbls dbta

include $(EPICS)/config/RULES.Unix

atdb: atdb_yacc.o $(DEPLIBS)
	$(LINK.c) -o $@ atdb_yacc.o $(LDLIBS)

# Extra rule since atdb_lex.c is included in atdb_yacc.c
#   In my opinion, these objects should really be built
#   independently.
atdb_yacc.o: atdb_lex.c ../atdb.c

clean::
	@$(RM) atdb_lex.c atdb_yacc.c 

