Add `.sh' suffix and rule.

Enable `.c' rule.  (Null suffix rules were disabled because of bugs in old
versions of make.)

Add ${LDFLAGS} to all rules that involve linking.
This commit is contained in:
bde 1995-10-21 12:46:02 +00:00
parent 13a9fd55bb
commit 967954e194

View File

@ -1,9 +1,9 @@
# from: @(#)sys.mk 8.2 (Berkeley) 3/21/94
# $Id: sys.mk,v 1.9 1994/12/28 03:51:03 ache Exp $
# $Id: sys.mk,v 1.10 1995/08/11 11:47:30 davidg Exp $
unix ?= We run FreeBSD, not UNIX.
.SUFFIXES: .out .a .ln .o .c .cc .cxx .C .F .f .e .r .y .l .S .s .cl .p .h
.SUFFIXES: .out .a .ln .o .c .cc .cxx .C .F .f .e .r .y .l .S .s .cl .p .h .sh
.LIBS: .a
@ -69,10 +69,12 @@ SHELL ?= sh
YACC ?= yacc
YFLAGS ?= -d
# This rule currently causes both make from 1.x and 2.x to have problems,
# and is not being used so disable it for now.
#.c:
# ${CC} ${CFLAGS} ${.IMPSRC} -o ${.TARGET}
.c:
${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
.sh:
cp -p ${.IMPSRC} ${.TARGET}
chmod a+x ${.TARGET}
.c.o:
${CC} ${CFLAGS} -c ${.IMPSRC}
@ -111,21 +113,21 @@ YFLAGS ?= -d
mv lex.yy.c ${.TARGET}
.s.out .c.out .o.out:
${CC} ${CFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
.f.out .F.out .r.out .e.out:
${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${.IMPSRC} \
${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \
${LDLIBS} -o ${.TARGET}
rm -f ${.PREFIX}.o
.y.out:
${YACC} ${YFLAGS} ${.IMPSRC}
${CC} ${CFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET}
${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET}
rm -f y.tab.c
.l.out:
${LEX} ${LFLAGS} ${.IMPSRC}
${CC} ${CFLAGS} lex.yy.c ${LDLIBS} -ll -o ${.TARGET}
${CC} ${CFLAGS} ${LDFLAGS} lex.yy.c ${LDLIBS} -ll -o ${.TARGET}
rm -f lex.yy.c
.include <bsd.own.mk>