# $Id: Makefile 133 2007-05-29 14:32:04Z asmodai $ CC?= gcc COMPRESS= gzip -cn INSTALL= install RM= rm STRIP= -s # Standard directories and files DESTDIR= /usr/local SRC2= ./errors # Dependencies and construction rules PROG= sid MAN= ${PROG}.1 CFLAGS= -g -pipe -O -std=iso9899:199409 -Wall -pedantic -Wmissing-prototypes\ -Wstrict-prototypes OBJS= gen-errors.o\ action.o alt.o arg-parse.o basic.o bitvec.o c-check.o\ c-code.o c-lexer.o c-out-info.o c-out-key.o c-out-nl.o\ c-out-types.o c-output.o c-parser.o cstring-list.o cstring.o\ dalloc.o dstring.o entry-list.o entry.o error-file.o error.o\ exception.o grammar.o istream.o item.o key.o\ lexer.o main.o name.o non-local.o ostream.o output.o parser.o\ rstack.o rule-check.o rule-factor.o rule-firsts.o rule-lre.o\ rule-mutate.o rule-names.o rule-simp.o rule-tail.o rule.o\ scope.o syntax.o table.o type.o types.o # XXX: Do I want to have them removed during clean? #CLEAN_EXTRA= parser.c junk.h c-parser.c c-junk.h CLEAN_EXTRA+= gen-errors.c gen-errors.h SIDOPTS=-l ansi-c -s numeric -s no-lines #PARSER_OUT=${SRC}/parser.c ${SRC}/junk.h #C_OUT=${SRC}/c-parser.c ${SRC}/c-junk.h ERR_OUT=gen-errors.c gen-errors.h EFILES=${SRC2}/arg-parse.e ${SRC2}/c-check.e ${SRC2}/c-code.e\ ${SRC2}/c-lexer.e ${SRC2}/c-parser.e ${SRC2}/error-file.e\ ${SRC2}/for-osif.e ${SRC2}/grammar.e ${SRC2}/lexer.e ${SRC2}/main.e\ ${SRC2}/parser.e ${SRC2}/rule-check.e ${SRC2}/rule-factor.e\ ${SRC2}/rule-firsts.e ${SRC2}/rule-lre.e ${SRC2}/scope.e\ ${SRC2}/table.e ${SRC2}/types.e ${PROG}: ${OBJS} ${CC} ${CFLAGS} -o sid ${OBJS} gen-errors.c: ${BUILD_ERRORS} ${EFILES} rm -f ${ERR_OUT};\ ./errors/BUILD_ERRORS -o gen-errors ${EFILES} all: ${PROG} auto_clobber : rm -f ${PARSER_OUT} ${C_OUT} ${ERR_OUT} clean: rm -f ${OBJS} ${PROG} ${CLEAN_EXTRA} install: ${PROG} install-man ${INSTALL} ${STRIP} ${PROG} ${DESTDIR}/bin/${PROG} install-man: ${MAN} ${INSTALL} ${MAN} ${DESTDIR}/man/man1