1# $Id: OSF1.mk,v 1.8 2017/05/05 18:02:16 sjg Exp $ 2# $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ 3# @(#)sys.mk 5.11 (Berkeley) 3/13/91 4 5OS?= OSF1 6unix?= We run ${OS}. 7ROOT_GROUP= system 8 9# can't fine one anywhere, so just stop the dependency 10LIBCRT0= /dev/null 11 12PATH=/usr/sbin:/usr/bin:/usr/ucb:/opt/gnu/bin:/usr/ccs/bin 13 14.SUFFIXES: .out .a .ln .o .c ${CXX_SUFFIXES} .F .f .r .y .l .s .S .cl .p .h .sh .m4 15 16.LIBS: .a 17 18# no -X 19LD_X= 20LD_x= -x 21LD_r= -r 22AR= ar 23ARFLAGS= rl 24RANLIB= ranlib 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.if exists(/opt/gnu/bin/gcc) || exists(/usr/local/bin/gcc) 34CC?= gcc 35.else 36CC?= cc -std 37.endif 38.if (${CC:T} == "gcc") 39DBG= -O -g 40STATIC= -static 41DBG= -g 42STATIC= -non_shared 43.endif 44 45CFLAGS= ${DBG} 46COMPILE.c= ${CC} ${CFLAGS} ${CPPFLAGS} -c 47LINK.c= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} 48 49CXX= g++ 50CXXFLAGS= ${CFLAGS} 51COMPILE.cc= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c 52LINK.cc= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} 53 54CPP= /usr/ccs/lib/cpp 55.if defined(DESTDIR) 56CPPFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include 57.endif 58 59MK_DEP= mkdeps.sh -N 60FC= f77 61FFLAGS= -O 62RFLAGS= 63COMPILE.f= ${FC} ${FFLAGS} -c 64LINK.f= ${FC} ${FFLAGS} ${LDFLAGS} 65COMPILE.F= ${FC} ${FFLAGS} ${CPPFLAGS} -c 66LINK.F= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} 67COMPILE.r= ${FC} ${FFLAGS} ${RFLAGS} -c 68LINK.r= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} 69 70LEX= lex 71LFLAGS= 72LEX.l= ${LEX} ${LFLAGS} 73 74LD= ld 75LDFLAGS= 76 77LINT= lint 78LINTFLAGS= -chapbx 79 80PC= pc 81PFLAGS= 82COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c 83LINK.p= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} 84 85SHELL= sh 86 87.if exists(/usr/local/bin/bison) || exists(/opt/gnu/bin/bison) 88YACC= bison -y 89.else 90YACC= yacc 91.endif 92YFLAGS= -d 93YACC.y= ${YACC} ${YFLAGS} 94 95# C 96.c: 97 ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 98.c.o: 99 ${COMPILE.c} ${.IMPSRC} 100.c.a: 101 ${COMPILE.c} ${.IMPSRC} 102 ${AR} ${ARFLAGS} $@ $*.o 103 rm -f $*.o 104 105# C++ 106${CXX_SUFFIXES}: 107 ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 108${CXX_SUFFIXES:%=%.o}: 109 ${COMPILE.cc} ${.IMPSRC} 110${CXX_SUFFIXES:%=%.a}: 111 ${COMPILE.cc} ${.IMPSRC} 112 ${AR} ${ARFLAGS} $@ $*.o 113 rm -f $*.o 114 115# Fortran/Ratfor 116.f: 117 ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 118.f.o: 119 ${COMPILE.f} ${.IMPSRC} 120.f.a: 121 ${COMPILE.f} ${.IMPSRC} 122 ${AR} ${ARFLAGS} $@ $*.o 123 rm -f $*.o 124 125.F: 126 ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 127.F.o: 128 ${COMPILE.F} ${.IMPSRC} 129.F.a: 130 ${COMPILE.F} ${.IMPSRC} 131 ${AR} ${ARFLAGS} $@ $*.o 132 rm -f $*.o 133 134.r: 135 ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 136.r.o: 137 ${COMPILE.r} ${.IMPSRC} 138.r.a: 139 ${COMPILE.r} ${.IMPSRC} 140 ${AR} ${ARFLAGS} $@ $*.o 141 rm -f $*.o 142 143# Pascal 144.p: 145 ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 146.p.o: 147 ${COMPILE.p} ${.IMPSRC} 148.p.a: 149 ${COMPILE.p} ${.IMPSRC} 150 ${AR} ${ARFLAGS} $@ $*.o 151 rm -f $*.o 152 153# Assembly 154.s: 155 ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 156.s.o: 157 ${COMPILE.s} ${.IMPSRC} 158.s.a: 159 ${COMPILE.s} ${.IMPSRC} 160 ${AR} ${ARFLAGS} $@ $*.o 161 rm -f $*.o 162.S: 163 ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} 164.S.o: 165 ${COMPILE.S} ${.IMPSRC} 166.S.a: 167 ${COMPILE.S} ${.IMPSRC} 168 ${AR} ${ARFLAGS} $@ $*.o 169 rm -f $*.o 170 171# Lex 172.l: 173 ${LEX.l} ${.IMPSRC} 174 ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll 175 rm -f lex.yy.c 176.l.c: 177 ${LEX.l} ${.IMPSRC} 178 mv lex.yy.c ${.TARGET} 179.l.o: 180 ${LEX.l} ${.IMPSRC} 181 ${COMPILE.c} -o ${.TARGET} lex.yy.c 182 rm -f lex.yy.c 183 184# Yacc 185.y: 186 ${YACC.y} ${.IMPSRC} 187 ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS} 188 rm -f y.tab.c 189.y.c: 190 ${YACC.y} ${.IMPSRC} 191 mv y.tab.c ${.TARGET} 192.y.o: 193 ${YACC.y} ${.IMPSRC} 194 ${COMPILE.c} -o ${.TARGET} y.tab.c 195 rm -f y.tab.c 196 197# Shell 198.sh: 199 rm -f ${.TARGET} 200 cp ${.IMPSRC} ${.TARGET} 201