2001-02-25 17:39:58 +00:00
|
|
|
|
2001-10-14 23:17:26 +00:00
|
|
|
.SUFFIXES: .o .c .l .y
|
2001-02-25 17:39:58 +00:00
|
|
|
|
|
|
|
first_rule : all
|
|
|
|
|
2001-10-14 23:17:26 +00:00
|
|
|
.y.o:
|
|
|
|
${YACC} ${YFLAGS} ${.IMPSRC}
|
|
|
|
${CC} ${CFLAGS} -c y.tab.c
|
|
|
|
rm -f y.tab.c
|
|
|
|
mv y.tab.o ${.TARGET}
|
|
|
|
|
2001-02-25 17:39:58 +00:00
|
|
|
|
|
|
|
.depend : .PHONY
|
|
|
|
@echo "# dependencies generated `date +'%D %T'`" > .depend
|
|
|
|
@echo >> .depend
|
|
|
|
@echo "# SUBDIR=`pwd`" >> .depend
|
|
|
|
@echo >> .depend
|
|
|
|
@echo >> .depend
|
|
|
|
@echo "SRCS = \\" >> .depend
|
|
|
|
@for i in *.S *.c; do \
|
|
|
|
if [ -f "$$i" ]; then \
|
|
|
|
echo " $$i \\" >> .depend; \
|
|
|
|
fi ; \
|
|
|
|
done
|
|
|
|
@echo >> .depend
|
|
|
|
@echo "OBJS = \\" >> .depend
|
|
|
|
@for i in *.S *.c; do \
|
|
|
|
if [ -f "$$i" ]; then \
|
|
|
|
echo " $${i%%.*}.o \\" >> .depend; \
|
|
|
|
fi ; \
|
|
|
|
done
|
|
|
|
@echo >> .depend
|
|
|
|
@for i in *.S *.c; do \
|
|
|
|
if [ -f "$$i" ]; then \
|
|
|
|
$(CC) -E $(CFLAGS) -M $$i >> .depend; \
|
|
|
|
fi ; \
|
|
|
|
done
|
|
|
|
@echo >> .depend
|
|
|
|
|
|
|
|
.if exists(.depend)
|
|
|
|
.include ".depend"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
depend : .depend
|
|
|
|
|