1# @(#)sys.mk 5.14 (Berkeley) 05/12/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 ?= gcc 17 18.if ${MACHINE} == "sparc" 19CFLAGS ?= -O4 20.else 21CFLAGS ?= -O2 22.endif 23 24CPP ?= /usr/libexec/gcc2/cpp -traditional 25 26FC ?= f77 27FFLAGS ?= -O 28EFLAGS ?= 29 30LEX ?= lex 31LFLAGS ?= 32 33LD ?= ld 34LDFLAGS ?= 35 36LINT ?= lint 37LINTFLAGS ?= -chapbx 38 39MAKE ?= make 40 41PC ?= pc 42PFLAGS ?= 43 44RC ?= f77 45RFLAGS ?= 46 47SHELL ?= sh 48 49YACC ?= yacc 50YFLAGS ?= -d 51 52.c.o: 53 ${CC} ${CFLAGS} -c ${.IMPSRC} 54 55.p.o: 56 ${PC} ${PFLAGS} -c ${.IMPSRC} 57 58.e.o .r.o .F.o .f.o: 59 ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} -c ${.IMPSRC} 60 61.s.o: 62 ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} 63 64.y.o: 65 ${YACC} ${YFLAGS} ${.IMPSRC} 66 ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET} 67 rm -f y.tab.c 68 69.l.o: 70 ${LEX} ${LFLAGS} ${.IMPSRC} 71 ${CC} ${CFLAGS} -c lex.yy.c -o ${.TARGET} 72 rm -f lex.yy.c 73 74.y.c: 75 ${YACC} ${YFLAGS} ${.IMPSRC} 76 mv y.tab.c ${.TARGET} 77 78.l.c: 79 ${LEX} ${LFLAGS} ${.IMPSRC} 80 mv lex.yy.c ${.TARGET} 81 82.s.out .c.out .o.out: 83 ${CC} ${CFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} 84 85.f.out .F.out .r.out .e.out: 86 ${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${.IMPSRC} \ 87 ${LDLIBS} -o ${.TARGET} 88 rm -f ${.PREFIX}.o 89 90.y.out: 91 ${YACC} ${YFLAGS} ${.IMPSRC} 92 ${CC} ${CFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET} 93 rm -f y.tab.c 94 95.l.out: 96 ${LEX} ${LFLAGS} ${.IMPSRC} 97 ${CC} ${CFLAGS} lex.yy.c ${LDLIBS} -ll -o ${.TARGET} 98 rm -f lex.yy.c 99