1# $Id: UnixWare.mk,v 1.2 2016/03/22 20:45:15 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 ${CXX_SUFFIXES} .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${CXX_SUFFIXES}: 152 ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 153${CXX_SUFFIXES:%=%.o}: 154 ${COMPILE.cc} ${.IMPSRC} 155${CXX_SUFFIXES:%=%.a}: 156 ${COMPILE.cc} ${.IMPSRC} 157 ${AR} ${ARFLAGS} $@ $*.o 158 rm -f $*.o 159 160# Fortran/Ratfor 161.f: 162 ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 163.f.o: 164 ${COMPILE.f} ${.IMPSRC} 165.f.a: 166 ${COMPILE.f} ${.IMPSRC} 167 ${AR} ${ARFLAGS} $@ $*.o 168 rm -f $*.o 169 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.r: 180 ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 181.r.o: 182 ${COMPILE.r} ${.IMPSRC} 183.r.a: 184 ${COMPILE.r} ${.IMPSRC} 185 ${AR} ${ARFLAGS} $@ $*.o 186 rm -f $*.o 187 188# Pascal 189.p: 190 ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 191.p.o: 192 ${COMPILE.p} ${.IMPSRC} 193.p.a: 194 ${COMPILE.p} ${.IMPSRC} 195 ${AR} ${ARFLAGS} $@ $*.o 196 rm -f $*.o 197 198# Assembly 199.s: 200 ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 201.s.o: 202 ${COMPILE.s} ${.IMPSRC} 203.s.a: 204 ${COMPILE.s} ${.IMPSRC} 205 ${AR} ${ARFLAGS} $@ $*.o 206 rm -f $*.o 207.S: 208 ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 209.S.o: 210 ${COMPILE.S} ${.IMPSRC} 211.S.a: 212 ${COMPILE.S} ${.IMPSRC} 213 ${AR} ${ARFLAGS} $@ $*.o 214 rm -f $*.o 215 216# Lex 217.l: 218 ${LEX.l} ${.IMPSRC} 219 ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll 220 rm -f lex.yy.c 221.l.c: 222 ${LEX.l} ${.IMPSRC} 223 mv lex.yy.c ${.TARGET} 224.l.o: 225 ${LEX.l} ${.IMPSRC} 226 ${COMPILE.c} -o ${.TARGET} lex.yy.c 227 rm -f lex.yy.c 228 229# Yacc 230.y: 231 ${YACC.y} ${.IMPSRC} 232 ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS} 233 rm -f y.tab.c 234.y.c: 235 ${YACC.y} ${.IMPSRC} 236 mv y.tab.c ${.TARGET} 237.y.o: 238 ${YACC.y} ${.IMPSRC} 239 ${COMPILE.c} -o ${.TARGET} y.tab.c 240 rm -f y.tab.c 241 242# Shell 243.sh: 244 rm -f ${.TARGET} 245 cp ${.IMPSRC} ${.TARGET} 246