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