NetBSD/share/mk/sys.mk

199 lines
3.4 KiB
Makefile
Raw Normal View History

# $NetBSD: sys.mk,v 1.43 1998/08/22 18:59:40 tv Exp $
1997-03-29 11:02:45 +03:00
# @(#)sys.mk 8.2 (Berkeley) 3/21/94
1993-03-21 12:45:37 +03:00
1997-03-29 11:02:45 +03:00
unix?= We run NetBSD.
1993-03-21 12:45:37 +03:00
.SUFFIXES: .out .a .ln .o .s .S .c .cc .C .F .f .r .y .l .cl .p .h .sh .m4
1993-03-21 12:45:37 +03:00
.LIBS: .a
AR?= ar
ARFLAGS?= rl
RANLIB?= ranlib
1993-03-21 12:45:37 +03:00
AS?= as
AFLAGS?=
COMPILE.s?= ${CC} ${AFLAGS} -c
LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
CC?= cc
CFLAGS?= -O
COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
1993-03-21 12:45:37 +03:00
CXX?= c++
CXXFLAGS?= ${CFLAGS}
COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
OBJC?= ${CC}
OBJCFLAGS?= ${CFLAGS}
COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
CPP?= cpp
CPPFLAGS?=
1993-03-21 12:45:37 +03:00
FC?= f77
1997-03-29 11:02:45 +03:00
FFLAGS?= -O
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
INSTALL?= install
LEX?= lex
LFLAGS?=
LEX.l?= ${LEX} ${LFLAGS}
1993-03-21 12:45:37 +03:00
LD?= ld
LDFLAGS?=
1993-03-21 12:45:37 +03:00
LINT?= lint
LINTFLAGS?= -chapbxz
1993-03-21 12:45:37 +03:00
LORDER?= lorder
MAKE?= make
1993-03-21 12:45:37 +03:00
NM?= nm
PC?= pc
PFLAGS?=
COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
1993-03-21 12:45:37 +03:00
SHELL?= sh
1993-03-21 12:45:37 +03:00
SIZE?= size
TSORT?= tsort -q
YACC?= yacc
YFLAGS?=
YACC.y?= ${YACC} ${YFLAGS}
1993-03-21 12:45:37 +03:00
# C
.c:
${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
.c.o:
${COMPILE.c} ${.IMPSRC}
.c.a:
${COMPILE.c} ${.IMPSRC}
${AR} ${ARFLAGS} $@ $*.o
rm -f $*.o
.c.ln:
${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
# C++
.cc:
${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
.cc.o:
${COMPILE.cc} ${.IMPSRC}
.cc.a:
${COMPILE.cc} ${.IMPSRC}
${AR} ${ARFLAGS} $@ $*.o
rm -f $*.o
.C:
${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
.C.o:
${COMPILE.cc} ${.IMPSRC}
.C.a:
${COMPILE.cc} ${.IMPSRC}
${AR} ${ARFLAGS} $@ $*.o
rm -f $*.o
# 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
.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
.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
# Pascal
.p:
${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
.p.o:
${COMPILE.p} ${.IMPSRC}
.p.a:
${COMPILE.p} ${.IMPSRC}
${AR} ${ARFLAGS} $@ $*.o
rm -f $*.o
# Assembly
.s:
${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
1993-03-21 12:45:37 +03:00
.s.o:
${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:
${COMPILE.S} ${.IMPSRC}
.S.a:
${COMPILE.S} ${.IMPSRC}
${AR} ${ARFLAGS} $@ $*.o
rm -f $*.o
1993-03-21 12:45:37 +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:
${LEX.l} ${.IMPSRC}
${COMPILE.c} -o ${.TARGET} lex.yy.c
1993-03-21 12:45:37 +03:00
rm -f lex.yy.c
# 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:
${YACC.y} ${.IMPSRC}
1993-03-21 12:45:37 +03:00
mv y.tab.c ${.TARGET}
.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
# Shell
.sh:
rm -f ${.TARGET}
cp ${.IMPSRC} ${.TARGET}