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