1# $FreeBSD$ 2 3# Posix 1003.2 mandated rules 4# 5# Quoted directly from the Posix 1003.2 draft, only the macros 6# $@, $< and $* have been replaced by ${.TARGET}, ${.IMPSRC}, and 7# ${.PREFIX}, resp. 8 9# SINGLE SUFFIX RULES 10.c: 11 ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} 12 13.f: 14 ${FC} ${FFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} 15 16.sh: 17 cp -f ${.IMPSRC} ${.TARGET} 18 chmod a+x ${.TARGET} 19 20# DOUBLE SUFFIX RULES 21 22.c.o: 23 ${CC} ${CFLAGS} -c ${.IMPSRC} 24 25.f.o: 26 ${FC} ${FFLAGS} -c ${.IMPSRC} 27 28.y.o: 29 ${YACC} ${YFLAGS} ${.IMPSRC} 30 ${CC} ${CFLAGS} -c y.tab.c 31 rm -f y.tab.c 32 mv y.tab.o ${.TARGET} 33 34.l.o: 35 ${LEX} ${LFLAGS} ${.IMPSRC} 36 ${CC} ${CFLAGS} -c lex.yy.c 37 rm -f lex.yy.c 38 mv lex.yy.o ${.TARGET} 39 40.y.c: 41 ${YACC} ${YFLAGS} ${.IMPSRC} 42 mv y.tab.c ${.TARGET} 43 44.l.c: 45 ${LEX} ${LFLAGS} ${.IMPSRC} 46 mv lex.yy.c ${.TARGET} 47 48.c.a: 49 ${CC} ${CFLAGS} -c ${.IMPSRC} 50 ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o 51 rm -f ${.PREFIX}.o 52 53.f.a: 54 ${FC} ${FFLAGS} -c ${.IMPSRC} 55 ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o 56 rm -f ${.PREFIX}.o 57