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