1994-07-26 23:42:37 +04:00
|
|
|
# $NetBSD: sys.mk,v 1.20 1994/07/26 19:42:42 mycroft Exp $
|
1994-06-30 09:31:04 +04:00
|
|
|
# @(#)sys.mk 5.11 (Berkeley) 3/13/91
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1994-06-30 09:31:04 +04:00
|
|
|
unix= We run NetBSD.
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1994-06-30 10:47:38 +04:00
|
|
|
.SUFFIXES: .out .a .ln .o .c .cc .C .F .f .r .y .l .s .S .cl .p .h .sh .m4
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
.LIBS: .a
|
|
|
|
|
|
|
|
AR= ar
|
|
|
|
ARFLAGS= rl
|
|
|
|
RANLIB= ranlib
|
|
|
|
|
|
|
|
AS= as
|
|
|
|
AFLAGS=
|
1994-03-24 19:01:24 +03:00
|
|
|
COMPILE.s= ${AS} ${AFLAGS}
|
|
|
|
LINK.s= ${CC} ${AFLAGS} ${LDFLAGS}
|
|
|
|
COMPILE.S= ${CC} ${AFLAGS} ${CPPFLAGS} -c
|
|
|
|
LINK.S= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
|
1994-07-06 08:12:24 +04:00
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
CC= cc
|
|
|
|
CFLAGS= -O
|
1994-03-24 19:01:24 +03:00
|
|
|
COMPILE.c= ${CC} ${CFLAGS} ${CPPFLAGS} -c
|
|
|
|
LINK.c= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1993-06-17 07:48:59 +04:00
|
|
|
CXX= g++
|
|
|
|
CXXFLAGS= ${CFLAGS}
|
1994-03-24 19:01:24 +03:00
|
|
|
COMPILE.cc= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
|
|
|
|
LINK.cc= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
|
1993-06-17 07:48:59 +04:00
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
CPP= cpp
|
1994-07-06 08:12:24 +04:00
|
|
|
.if defined(DESTDIR)
|
|
|
|
CPPFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include
|
|
|
|
.endif
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
FC= f77
|
|
|
|
FFLAGS= -O
|
1994-03-24 19:01:24 +03:00
|
|
|
RFLAGS=
|
|
|
|
COMPILE.f= ${FC} ${FFLAGS} -c
|
|
|
|
LINK.f= ${FC} ${FFLAGS} ${LDFLAGS}
|
|
|
|
COMPILE.F= ${FC} ${FFLAGS} ${CPPFLAGS} -c
|
|
|
|
LINK.F= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
|
|
|
|
COMPILE.r= ${FC} ${FFLAGS} ${RFLAGS} -c
|
|
|
|
LINK.r= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
LEX= lex
|
|
|
|
LFLAGS=
|
1994-03-24 19:01:24 +03:00
|
|
|
LEX.l= ${LEX} ${LFLAGS}
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
LD= ld
|
|
|
|
LDFLAGS=
|
|
|
|
|
|
|
|
LINT= lint
|
|
|
|
LINTFLAGS= -chapbx
|
|
|
|
|
|
|
|
MAKE= make
|
|
|
|
|
|
|
|
PC= pc
|
|
|
|
PFLAGS=
|
1994-03-24 19:01:24 +03:00
|
|
|
COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c
|
|
|
|
LINK.p= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
SHELL= sh
|
|
|
|
|
|
|
|
YACC= yacc
|
1993-12-29 21:44:36 +03:00
|
|
|
YFLAGS= -d
|
1994-03-24 19:01:24 +03:00
|
|
|
YACC.y= ${YACC} ${YFLAGS}
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1994-03-24 19:01:24 +03:00
|
|
|
# C
|
1994-03-24 04:39:28 +03:00
|
|
|
.c:
|
1994-03-24 19:01:24 +03:00
|
|
|
${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
|
|
|
|
.c.o:
|
|
|
|
${COMPILE.c} ${.IMPSRC}
|
|
|
|
.c.a:
|
|
|
|
${COMPILE.c} ${.IMPSRC}
|
|
|
|
${AR} ${ARFLAGS} $@ $*.o
|
|
|
|
rm -f $*.o
|
1994-03-24 04:39:28 +03:00
|
|
|
|
1994-03-24 19:01:24 +03:00
|
|
|
# C++
|
|
|
|
.cc:
|
|
|
|
${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
|
|
|
|
.cc.o:
|
|
|
|
${COMPILE.cc} ${.IMPSRC}
|
|
|
|
.cc.a:
|
|
|
|
${COMPILE.cc} ${.IMPSRC}
|
|
|
|
${AR} ${ARFLAGS} $@ $*.o
|
|
|
|
rm -f $*.o
|
1993-12-29 21:44:36 +03:00
|
|
|
|
1994-03-24 19:01:24 +03:00
|
|
|
.C:
|
|
|
|
${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
|
|
|
|
.C.o:
|
|
|
|
${COMPILE.cc} ${.IMPSRC}
|
|
|
|
.C.a:
|
|
|
|
${COMPILE.cc} ${.IMPSRC}
|
|
|
|
${AR} ${ARFLAGS} $@ $*.o
|
|
|
|
rm -f $*.o
|
1993-12-29 21:44:36 +03:00
|
|
|
|
1994-03-24 19:01:24 +03:00
|
|
|
# Fortran/Ratfor
|
|
|
|
.f:
|
|
|
|
${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
|
|
|
|
.f.o:
|
|
|
|
${COMPILE.f} ${.IMPSRC}
|
|
|
|
.f.a:
|
|
|
|
${COMPILE.f} ${.IMPSRC}
|
|
|
|
${AR} ${ARFLAGS} $@ $*.o
|
|
|
|
rm -f $*.o
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1994-03-24 19:01:24 +03:00
|
|
|
.F:
|
|
|
|
${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
|
|
|
|
.F.o:
|
|
|
|
${COMPILE.F} ${.IMPSRC}
|
|
|
|
.F.a:
|
|
|
|
${COMPILE.F} ${.IMPSRC}
|
|
|
|
${AR} ${ARFLAGS} $@ $*.o
|
|
|
|
rm -f $*.o
|
1993-07-17 16:09:51 +04:00
|
|
|
|
1994-03-24 19:01:24 +03:00
|
|
|
.r:
|
|
|
|
${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
|
|
|
|
.r.o:
|
|
|
|
${COMPILE.r} ${.IMPSRC}
|
|
|
|
.r.a:
|
|
|
|
${COMPILE.r} ${.IMPSRC}
|
|
|
|
${AR} ${ARFLAGS} $@ $*.o
|
|
|
|
rm -f $*.o
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1994-03-24 19:01:24 +03:00
|
|
|
# Pascal
|
|
|
|
.p:
|
|
|
|
${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
|
1993-12-29 21:44:36 +03:00
|
|
|
.p.o:
|
1994-03-24 19:01:24 +03:00
|
|
|
${COMPILE.p} ${.IMPSRC}
|
|
|
|
.p.a:
|
|
|
|
${COMPILE.p} ${.IMPSRC}
|
|
|
|
${AR} ${ARFLAGS} $@ $*.o
|
|
|
|
rm -f $*.o
|
1993-12-29 21:44:36 +03:00
|
|
|
|
1994-03-24 19:01:24 +03:00
|
|
|
# Assembly
|
|
|
|
.s:
|
|
|
|
${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
|
1993-03-21 12:45:37 +03:00
|
|
|
.s.o:
|
1994-03-24 19:01:24 +03:00
|
|
|
${COMPILE.s} ${.IMPSRC}
|
|
|
|
.s.a:
|
|
|
|
${COMPILE.s} ${.IMPSRC}
|
|
|
|
${AR} ${ARFLAGS} $@ $*.o
|
|
|
|
rm -f $*.o
|
|
|
|
.S:
|
|
|
|
${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
|
1993-09-08 17:13:46 +04:00
|
|
|
.S.o:
|
1994-03-24 19:01:24 +03:00
|
|
|
${COMPILE.S} ${.IMPSRC}
|
|
|
|
.S.a:
|
|
|
|
${COMPILE.S} ${.IMPSRC}
|
|
|
|
${AR} ${ARFLAGS} $@ $*.o
|
|
|
|
rm -f $*.o
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1994-03-24 19:01:24 +03:00
|
|
|
# Lex
|
|
|
|
.l:
|
|
|
|
${LEX.l} ${.IMPSRC}
|
|
|
|
${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
|
|
|
|
rm -f lex.yy.c
|
|
|
|
.l.c:
|
|
|
|
${LEX.l} ${.IMPSRC}
|
|
|
|
mv lex.yy.c ${.TARGET}
|
1993-03-21 12:45:37 +03:00
|
|
|
.l.o:
|
1994-03-24 19:01:24 +03:00
|
|
|
${LEX.l} ${.IMPSRC}
|
|
|
|
${COMPILE.c} -o ${.TARGET} lex.yy.c
|
1993-03-21 12:45:37 +03:00
|
|
|
rm -f lex.yy.c
|
|
|
|
|
1994-03-24 19:01:24 +03:00
|
|
|
# Yacc
|
|
|
|
.y:
|
|
|
|
${YACC.y} ${.IMPSRC}
|
|
|
|
${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
|
|
|
|
rm -f y.tab.c
|
1993-03-21 12:45:37 +03:00
|
|
|
.y.c:
|
1994-03-24 19:01:24 +03:00
|
|
|
${YACC.y} ${.IMPSRC}
|
1993-03-21 12:45:37 +03:00
|
|
|
mv y.tab.c ${.TARGET}
|
1994-03-24 19:01:24 +03:00
|
|
|
.y.o:
|
|
|
|
${YACC.y} ${.IMPSRC}
|
|
|
|
${COMPILE.c} -o ${.TARGET} y.tab.c
|
1993-03-21 12:45:37 +03:00
|
|
|
rm -f y.tab.c
|
|
|
|
|
1994-03-24 19:01:24 +03:00
|
|
|
# Shell
|
|
|
|
.sh:
|
|
|
|
rm -f ${.TARGET}
|
|
|
|
cp ${.IMPSRC} ${.TARGET}
|