1# $NetBSD: IRIX.sys.mk,v 1.2 2002/12/24 23:03:27 jschauma Exp $ 2# @(#)sys.mk 8.2 (Berkeley) 3/21/94 3 4.if ${.PARSEFILE} == "sys.mk" 5.ifndef ROOT_GROUP 6OS!= uname -s 7ROOT_GROUP!= sed -n /:0:/s/:.*//p /etc/group 8.MAKEOVERRIDES+= OS ROOT_GROUP 9.endif 10unix ?= We run ${OS}. 11.endif 12 13.SUFFIXES: .out .a .ln .o .s .S .c ${CXX_SUFFIXES} .F .f .r .y .l .cl .p .h 14.SUFFIXES: .sh .m4 15 16.LIBS: .a 17 18AR ?= ar 19ARFLAGS ?= rl 20RANLIB ?= ranlib 21 22AS ?= as 23AFLAGS ?= 24COMPILE.s ?= ${CC} ${AFLAGS} -c 25LINK.s ?= ${CC} ${AFLAGS} ${LDFLAGS} 26COMPILE.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp 27LINK.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} 28 29CC ?= cc 30NOGCCERROR ?= # defined 31DBG ?= -O2 32CFLAGS ?= ${DBG} 33COMPILE.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} -c 34LINK.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} 35 36CXX ?= CC 37CXXFLAGS ?= ${CFLAGS} 38COMPILE.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c 39LINK.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} 40 41OBJC ?= ${CC} 42OBJCFLAGS ?= ${CFLAGS} 43COMPILE.m ?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c 44LINK.m ?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS} 45 46CPP ?= CC 47CPPFLAGS ?= 48 49FC ?= f77 50FFLAGS ?= -O 51RFLAGS ?= 52COMPILE.f ?= ${FC} ${FFLAGS} -c 53LINK.f ?= ${FC} ${FFLAGS} ${LDFLAGS} 54COMPILE.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} -c 55LINK.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} 56COMPILE.r ?= ${FC} ${FFLAGS} ${RFLAGS} -c 57LINK.r ?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} 58 59INSTALL ?= ${PREFIX}/bin/install-sh 60 61LEX ?= lex 62LFLAGS ?= 63LEX.l ?= ${LEX} ${LFLAGS} 64 65LD ?= ld 66LDFLAGS ?= 67 68LINT ?= lint 69LINTFLAGS ?= -chapbxzF 70 71LORDER ?= lorder 72 73NM ?= nm 74 75PC ?= pc 76PFLAGS ?= 77COMPILE.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} -c 78LINK.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} 79 80SIZE ?= size 81 82TSORT ?= tsort -q 83 84YACC ?= yacc 85YFLAGS ?= 86YACC.y ?= ${YACC} ${YFLAGS} 87 88# C 89.c: 90 ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 91.c.o: 92 ${COMPILE.c} ${.IMPSRC} 93.c.a: 94 ${COMPILE.c} ${.IMPSRC} 95 ${AR} ${ARFLAGS} $@ $*.o 96 rm -f $*.o 97.c.ln: 98 ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC} 99 100# C++ 101${CXX_SUFFIXES}: 102 ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 103${CXX_SUFFIXES:%=%.o}: 104 ${COMPILE.cc} ${.IMPSRC} 105${CXX_SUFFIXES:%=%.a}: 106 ${COMPILE.cc} ${.IMPSRC} 107 ${AR} ${ARFLAGS} $@ $*.o 108 rm -f $*.o 109 110# Fortran/Ratfor 111.f: 112 ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 113.f.o: 114 ${COMPILE.f} ${.IMPSRC} 115.f.a: 116 ${COMPILE.f} ${.IMPSRC} 117 ${AR} ${ARFLAGS} $@ $*.o 118 rm -f $*.o 119 120.F: 121 ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 122.F.o: 123 ${COMPILE.F} ${.IMPSRC} 124.F.a: 125 ${COMPILE.F} ${.IMPSRC} 126 ${AR} ${ARFLAGS} $@ $*.o 127 rm -f $*.o 128 129.r: 130 ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 131.r.o: 132 ${COMPILE.r} ${.IMPSRC} 133.r.a: 134 ${COMPILE.r} ${.IMPSRC} 135 ${AR} ${ARFLAGS} $@ $*.o 136 rm -f $*.o 137 138# Pascal 139.p: 140 ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 141.p.o: 142 ${COMPILE.p} ${.IMPSRC} 143.p.a: 144 ${COMPILE.p} ${.IMPSRC} 145 ${AR} ${ARFLAGS} $@ $*.o 146 rm -f $*.o 147 148# Assembly 149.s: 150 ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 151.s.o: 152 ${COMPILE.s} ${.IMPSRC} 153.s.a: 154 ${COMPILE.s} ${.IMPSRC} 155 ${AR} ${ARFLAGS} $@ $*.o 156 rm -f $*.o 157.S: 158 ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 159.S.o: 160 ${COMPILE.S} ${.IMPSRC} 161.S.a: 162 ${COMPILE.S} ${.IMPSRC} 163 ${AR} ${ARFLAGS} $@ $*.o 164 rm -f $*.o 165 166# Lex 167.l: 168 ${LEX.l} ${.IMPSRC} 169 ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll 170 rm -f lex.yy.c 171.l.c: 172 ${LEX.l} ${.IMPSRC} 173 mv lex.yy.c ${.TARGET} 174.l.o: 175 ${LEX.l} ${.IMPSRC} 176 ${COMPILE.c} -o ${.TARGET} lex.yy.c 177 rm -f lex.yy.c 178 179# Yacc 180.y: 181 ${YACC.y} ${.IMPSRC} 182 ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS} 183 rm -f y.tab.c 184.y.c: 185 ${YACC.y} ${.IMPSRC} 186 mv y.tab.c ${.TARGET} 187.y.o: 188 ${YACC.y} ${.IMPSRC} 189 ${COMPILE.c} -o ${.TARGET} y.tab.c 190 rm -f y.tab.c 191 192# Shell 193.sh: 194 rm -f ${.TARGET} 195 cp ${.IMPSRC} ${.TARGET} 196