LIBS=-latmd -lfl # lex may want  -ll  here
INCLUDES=-I../qgen -I.
OBJS=atmsigd.o io.o kernel.o mess.o proto.o q2931.o saal.o sap.o sscf.o \
  sscop.o timeout.o q.out.o lex.yy.o y.tab.o
SSCOP_OBJS=sscop.o
PGMS=atmsigd svc #test doesn't work anymore
TRASH=q.out.h q.out.o mess.c
MANS=

include ../Rules.make


test:			$(SSCOP_OBJS)

atmsigd:		$(OBJS)
			$(CC) $(LDFLAGS) -o atmsigd $(OBJS) $(LDLIBS) $(LIBS)

lex.yy.c:		cfg.l y.tab.h ../lib/atm.h
			$(LEX) cfg.l

y.tab.c y.tab.h:	cfg.y ../lib/atmd.h proto.h io.h
			$(YACC) -d cfg.y

q.out.o:
			ln -s ../qgen/q.out.o

svc:			svc.o  # don't collapse compile and link phase

depend:			fake_q.out.h

mess.c:			../qgen/q2931.h mkmess.pl
			./mkmess.pl <../qgen/q2931.h >mess.c

fake_q.out.h:
			echo "! This must not compile" >q.out.h
