mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
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:
parent
ee911e5456
commit
a9076ea0bc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11613
1 changed files with 12 additions and 10 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue