1# $Id: UnixWare.mk,v 1.3 2017/05/05 18:02:17 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 117NM?= nm 118 119PC?= pc # XXX: UDK probably does not have pc 120PFLAGS?= 121COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c 122LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} 123 124SHELL?= sh 125 126SIZE?= size 127 128TSORT?= tsort 129 130.if exists(/usr/local/bin/bison) 131YACC?= bison -y 132.else 133YACC?= yacc 134.endif 135YFLAGS?= -d 136YACC.y?= ${YACC} ${YFLAGS} 137 138# C 139.c: 140 ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 141.c.o: 142 ${COMPILE.c} ${.IMPSRC} 143.c.a: 144 ${COMPILE.c} ${.IMPSRC} 145 ${AR} ${ARFLAGS} $@ $*.o 146 rm -f $*.o 147 148# C++ 149${CXX_SUFFIXES}: 150 ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 151${CXX_SUFFIXES:%=%.o}: 152 ${COMPILE.cc} ${.IMPSRC} 153${CXX_SUFFIXES:%=%.a}: 154 ${COMPILE.cc} ${.IMPSRC} 155 ${AR} ${ARFLAGS} $@ $*.o 156 rm -f $*.o 157 158# Fortran/Ratfor 159.f: 160 ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 161.f.o: 162 ${COMPILE.f} ${.IMPSRC} 163.f.a: 164 ${COMPILE.f} ${.IMPSRC} 165 ${AR} ${ARFLAGS} $@ $*.o 166 rm -f $*.o 167 168.F: 169 ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 170.F.o: 171 ${COMPILE.F} ${.IMPSRC} 172.F.a: 173 ${COMPILE.F} ${.IMPSRC} 174 ${AR} ${ARFLAGS} $@ $*.o 175 rm -f $*.o 176 177.r: 178 ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 179.r.o: 180 ${COMPILE.r} ${.IMPSRC} 181.r.a: 182 ${COMPILE.r} ${.IMPSRC} 183 ${AR} ${ARFLAGS} $@ $*.o 184 rm -f $*.o 185 186# Pascal 187.p: 188 ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 189.p.o: 190 ${COMPILE.p} ${.IMPSRC} 191.p.a: 192 ${COMPILE.p} ${.IMPSRC} 193 ${AR} ${ARFLAGS} $@ $*.o 194 rm -f $*.o 195 196# Assembly 197.s: 198 ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 199.s.o: 200 ${COMPILE.s} ${.IMPSRC} 201.s.a: 202 ${COMPILE.s} ${.IMPSRC} 203 ${AR} ${ARFLAGS} $@ $*.o 204 rm -f $*.o 205.S: 206 ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 207.S.o: 208 ${COMPILE.S} ${.IMPSRC} 209.S.a: 210 ${COMPILE.S} ${.IMPSRC} 211 ${AR} ${ARFLAGS} $@ $*.o 212 rm -f $*.o 213 214# Lex 215.l: 216 ${LEX.l} ${.IMPSRC} 217 ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll 218 rm -f lex.yy.c 219.l.c: 220 ${LEX.l} ${.IMPSRC} 221 mv lex.yy.c ${.TARGET} 222.l.o: 223 ${LEX.l} ${.IMPSRC} 224 ${COMPILE.c} -o ${.TARGET} lex.yy.c 225 rm -f lex.yy.c 226 227# Yacc 228.y: 229 ${YACC.y} ${.IMPSRC} 230 ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS} 231 rm -f y.tab.c 232.y.c: 233 ${YACC.y} ${.IMPSRC} 234 mv y.tab.c ${.TARGET} 235.y.o: 236 ${YACC.y} ${.IMPSRC} 237 ${COMPILE.c} -o ${.TARGET} y.tab.c 238 rm -f y.tab.c 239 240# Shell 241.sh: 242 rm -f ${.TARGET} 243 cp ${.IMPSRC} ${.TARGET} 244