Rev 7 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
# $Id$
# Standard directories and files
.include "../Makefile.inc"
SRCX=${.CURDIR}/../shared
# Standard variables
WARNS?= 3
TCCOPTS= -Yansi -Xs
CCOPTS= ${TCCOPTS} -I${BASE_DIR}/${INCLUDE} -I${.CURDIR} -I${SRCX}
LIBS=
CFLAGS+= -I../shared
# Dependencies and construction rules
PROG= ${.CURDIR:T}
OBJS= char.o error.o lex.o main.o output.o syntax.o xalloc.o
.c.o:
$(CC) -c $(CFLAGS) -o $@ $<
$(PROG): syntax.sid syntax.act syntax.c syntax.h $(OBJS)
$(CC) -o $(PROG) $(LDFLAGS) $(OBJS)
depend:
mkdep $(CFLAGS) *.c
clean:
rm -f $(OBJS)
rm -f $(PROG)
rm -f syntax.c
rm -f syntax.h
syntax:
$(SID) ${SIDOPTS} syntax.sid syntax.act syntax.c syntax.h
syntax.c: syntax.sid syntax.act
$(MAKE) syntax
syntax.h: syntax.sid syntax.act
$(MAKE) syntax
.PATH: ${SRCX}
SIDOPTS=-l ansi-c -s no-lines
#SID_OUT=${SRC}/syntax.c ${SRC}/syntax.h
#LEXI_OUT=${SRC}/lexer.h ${SRC}/keyword.h
#${SRC}/syntax.c : ${SRC}/syntax.sid ${SRC}/syntax.act
# @${REMOVE} ${SID_OUT}
# ${SID} ${SIDOPTS} ${SRC}/syntax.sid ${SRC}/syntax.act ${SID_OUT}
#
#${SRC}/lexer.h : ${SRC}/lexer.lxi
# @${REMOVE} ${SRC}/lexer.h
# ${LEXI} ${SRC}/lexer.lxi ${SRC}/lexer.h
#
#${SRC}/keyword.h : ${SRC}/lexer.lxi
# @${REMOVE} ${SRC}/keyword.h
# ${LEXI} -k ${SRC}/lexer.lxi ${SRC}/keyword.h
#
#auto_clobber :
# ${REMOVE} ${SID_OUT} ${LEXI_OUT}