1# $Id: UnixWare.mk,v 1.1 2005/10/09 22:56:40 sjg Exp $ 2# based on "Id: SunOS.5.sys.mk,v 1.6 2003/09/30 16:42:23 sjg Exp " 3# $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ 4# @(#)sys.mk 5.11 (Berkeley) 3/13/91 5 6OS?= UnixWare 7unix?= We run ${OS}. 8ROOT_GROUP= root 9 10# can't fine one anywhere, so just stop the dependency 11LIBCRT0= /dev/null 12 13PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/ccs/lib:/usr/ucb:/usr/local/bin 14 15.SUFFIXES: .out .a .ln .o .c .cc .C .F .f .r .y .l .s .S .cl .p .h .sh .m4 16 17.LIBS: .a 18 19# no -X 20LD_X= 21LD_x= 22AR?= ar 23ARFLAGS?= rl 24RANLIB?= : 25 26AS?= as 27AS_STDIN?= - 28AFLAGS?= 29COMPILE.s?= ${AS} ${AFLAGS} 30LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS} 31COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c 32LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} 33 34# at least gcc 2.95 on UnixWare has no internal macro to identify the system 35.if exists(/usr/local/bin/gcc) 36CC?= gcc -pipe -DUNIXWARE 37DBG?= -O -g 38STATIC?= -static 39.else 40CC?= cc 41DBG?= -g 42STATIC?= -Bstatic # XXX: don't know about UDK compilers 43.endif 44CFLAGS?= ${DBG} 45COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c 46LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} 47 48.if exists(/usr/local/bin/g++) 49CXX?= g++ -DUNIXWARE 50.else 51CXX?= c++ # XXX: don't know about UDK compilers 52.endif 53CXXFLAGS?= ${CFLAGS} 54COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c 55LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} 56 57CPP?= /usr/ccs/lib/cpp 58.if defined(DESTDIR) 59CPPFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include 60.endif 61 62MK_DEP?= mkdeps.sh -N 63.if exists(/usr/local/bin/g77) 64FC?= g77 65.else 66FC?= f77 # XXX: don't know about UDK compilers 67.endif 68FFLAGS?= -O 69RFLAGS?= 70COMPILE.f?= ${FC} ${FFLAGS} -c 71LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS} 72COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c 73LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} 74COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c 75LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} 76 77INSTALL?= /usr/ucb/install # BSD install 78 79LEX?= lex 80LFLAGS?= 81LEX.l?= ${LEX} ${LFLAGS} 82 83LD?= ld 84LDFLAGS?= 85 86LIBC?= ${DESTDIR}/usr/ccs/lib/libc.a 87LIBCOMPAT?= 88LIBCRYPT?= ${DESTDIR}/usr/lib/libcrypt.a 89LIBCURSES?= ${DESTDIR}/usr/ccs/lib/libcurses.a 90LIBDBM?= 91LIBDES?= 92LIBEDIT?= 93LIBGCC?= 94LIBKDB?= 95LIBKRB?= 96LIBKVM?= 97LIBL?= ${DESTDIR}/usr/ccs/lib/libl.a 98LIBM?= ${DESTDIR}/usr/ccs/lib/libm.a 99LIBMP?= 100LIBPC?= 101LIBPCAP?= 102LIBPLOT?= 103LIBRESOLV?= 104LIBRPCSVC?= ${DESTDIR}/usr/lib/librpcsvc.a 105LIBSKEY?= ${DESTDIR}/usr/lib/libskey.a 106LIBTERMCAP?= ${DESTDIR}/usr/ccs/lib/libtermcap.a 107LIBUTIL?= 108LIBWRAP?= 109LIBY?= ${DESTDIR}/usr/ccs/lib/liby.a 110LIBZ?= 111 112LINT?= lint 113LINTFLAGS?= -pF 114 115LORDER?= lorder 116 117MAKE?= bmake 118 119NM?= nm 120 121PC?= pc # XXX: UDK probably does not have pc 122PFLAGS?= 123COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c 124LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} 125 126SHELL?= sh 127 128SIZE?= size 129 130TSORT?= tsort 131 132.if exists(/usr/local/bin/bison) 133YACC?= bison -y 134.else 135YACC?= yacc 136.endif 137YFLAGS?= -d 138YACC.y?= ${YACC} ${YFLAGS} 139 140# C 141.c: 142 ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 143.c.o: 144 ${COMPILE.c} ${.IMPSRC} 145.c.a: 146 ${COMPILE.c} ${.IMPSRC} 147 ${AR} ${ARFLAGS} $@ $*.o 148 rm -f $*.o 149 150# C++ 151.cc: 152 ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 153.cc.o: 154 ${COMPILE.cc} ${.IMPSRC} 155.cc.a: 156 ${COMPILE.cc} ${.IMPSRC} 157 ${AR} ${ARFLAGS} $@ $*.o 158 rm -f $*.o 159 160.C: 161 ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 162.C.o: 163 ${COMPILE.cc} ${.IMPSRC} 164.C.a: 165 ${COMPILE.cc} ${.IMPSRC} 166 ${AR} ${ARFLAGS} $@ $*.o 167 rm -f $*.o 168 169# Fortran/Ratfor 170.f: 171 ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 172.f.o: 173 ${COMPILE.f} ${.IMPSRC} 174.f.a: 175 ${COMPILE.f} ${.IMPSRC} 176 ${AR} ${ARFLAGS} $@ $*.o 177 rm -f $*.o 178 179.F: 180 ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 181.F.o: 182 ${COMPILE.F} ${.IMPSRC} 183.F.a: 184 ${COMPILE.F} ${.IMPSRC} 185 ${AR} ${ARFLAGS} $@ $*.o 186 rm -f $*.o 187 188.r: 189 ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 190.r.o: 191 ${COMPILE.r} ${.IMPSRC} 192.r.a: 193 ${COMPILE.r} ${.IMPSRC} 194 ${AR} ${ARFLAGS} $@ $*.o 195 rm -f $*.o 196 197# Pascal 198.p: 199 ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 200.p.o: 201 ${COMPILE.p} ${.IMPSRC} 202.p.a: 203 ${COMPILE.p} ${.IMPSRC} 204 ${AR} ${ARFLAGS} $@ $*.o 205 rm -f $*.o 206 207# Assembly 208.s: 209 ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 210.s.o: 211 ${COMPILE.s} ${.IMPSRC} 212.s.a: 213 ${COMPILE.s} ${.IMPSRC} 214 ${AR} ${ARFLAGS} $@ $*.o 215 rm -f $*.o 216.S: 217 ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 218.S.o: 219 ${COMPILE.S} ${.IMPSRC} 220.S.a: 221 ${COMPILE.S} ${.IMPSRC} 222 ${AR} ${ARFLAGS} $@ $*.o 223 rm -f $*.o 224 225# Lex 226.l: 227 ${LEX.l} ${.IMPSRC} 228 ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll 229 rm -f lex.yy.c 230.l.c: 231 ${LEX.l} ${.IMPSRC} 232 mv lex.yy.c ${.TARGET} 233.l.o: 234 ${LEX.l} ${.IMPSRC} 235 ${COMPILE.c} -o ${.TARGET} lex.yy.c 236 rm -f lex.yy.c 237 238# Yacc 239.y: 240 ${YACC.y} ${.IMPSRC} 241 ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS} 242 rm -f y.tab.c 243.y.c: 244 ${YACC.y} ${.IMPSRC} 245 mv y.tab.c ${.TARGET} 246.y.o: 247 ${YACC.y} ${.IMPSRC} 248 ${COMPILE.c} -o ${.TARGET} y.tab.c 249 rm -f y.tab.c 250 251# Shell 252.sh: 253 rm -f ${.TARGET} 254 cp ${.IMPSRC} ${.TARGET} 255