1# @(#)sys.mk 5.13 (Berkeley) 02/16/93 2 3unix ?= We run UNIX. 4 5.SUFFIXES: .out .a .ln .o .c .F .f .e .r .y .l .s .cl .p .h 6 7.LIBS: .a 8 9AR ?= ar 10ARFLAGS ?= rl 11RANLIB ?= ranlib 12 13AS ?= as 14AFLAGS ?= 15 16CC ?= cc 17.if ${MACHINE} == "sparc" 18CFLAGS ?= -O4 19.else 20CFLAGS ?= -O 21.endif 22 23CPP ?= cpp 24 25FC ?= f77 26FFLAGS ?= -O 27EFLAGS ?= 28 29LEX ?= lex 30LFLAGS ?= 31 32LD ?= ld 33LDFLAGS ?= 34 35LINT ?= lint 36LINTFLAGS ?= -chapbx 37 38MAKE ?= make 39 40PC ?= pc 41PFLAGS ?= 42 43RC ?= f77 44RFLAGS ?= 45 46SHELL ?= sh 47 48YACC ?= yacc 49YFLAGS ?= -d 50 51.c.o: 52 ${CC} ${CFLAGS} -c ${.IMPSRC} 53 54.p.o: 55 ${PC} ${PFLAGS} -c ${.IMPSRC} 56 57.e.o .r.o .F.o .f.o: 58 ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} -c ${.IMPSRC} 59 60.s.o: 61 ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} 62 63.y.o: 64 ${YACC} ${YFLAGS} ${.IMPSRC} 65 ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET} 66 rm -f y.tab.c 67 68.l.o: 69 ${LEX} ${LFLAGS} ${.IMPSRC} 70 ${CC} ${CFLAGS} -c lex.yy.c -o ${.TARGET} 71 rm -f lex.yy.c 72 73.y.c: 74 ${YACC} ${YFLAGS} ${.IMPSRC} 75 mv y.tab.c ${.TARGET} 76 77.l.c: 78 ${LEX} ${LFLAGS} ${.IMPSRC} 79 mv lex.yy.c ${.TARGET} 80 81.s.out .c.out .o.out: 82 ${CC} ${CFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} 83 84.f.out .F.out .r.out .e.out: 85 ${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${.IMPSRC} \ 86 ${LDLIBS} -o ${.TARGET} 87 rm -f ${.PREFIX}.o 88 89.y.out: 90 ${YACC} ${YFLAGS} ${.IMPSRC} 91 ${CC} ${CFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET} 92 rm -f y.tab.c 93 94.l.out: 95 ${LEX} ${LFLAGS} ${.IMPSRC} 96 ${CC} ${CFLAGS} lex.yy.c ${LDLIBS} -ll -o ${.TARGET} 97 rm -f lex.yy.c 98