1 # 2 # CDDL HEADER START 3 # 4 # The contents of this file are subject to the terms of the 5 # Common Development and Distribution License (the "License"). 6 # You may not use this file except in compliance with the License. 7 # 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 # or http://www.opensolaris.org/os/licensing. 10 # See the License for the specific language governing permissions 11 # and limitations under the License. 12 # 13 # When distributing Covered Code, include this CDDL HEADER in each 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 # If applicable, add the following below this CDDL HEADER, with the 16 # fields enclosed by brackets "[]" replaced with your own identifying 17 # information: Portions Copyright [yyyy] [name of copyright owner] 18 # 19 # CDDL HEADER END 20 # 21 # Copyright 1994 Sun Microsystems, Inc. All rights reserved. 22 # Use is subject to license terms. 23 # 24 # @(#)svr4.make.rules.file 1.4 06/12/12 25 # 26 .SUFFIXES: .o .c .c~ .y .y~ .l .l~ .s .s~ .sh .sh~ .h .h~ .f .f~ \ 27 .C .C~ .Y .Y~ .L .L~ 28 29 MAKE=make 30 BUILD=build 31 AR=ar 32 ARFLAGS=rv 33 AS=as 34 ASFLAGS= 35 CC=cc 36 CFLAGS=-O 37 F77=f77 38 FFLAGS=-O 39 GET=get 40 GFLAGS= 41 LD=ld 42 LDFLAGS= 43 LEX=lex 44 LFLAGS= 45 YACC=yacc 46 YFLAGS= 47 C++C=CC 48 C++FLAGS=-O 49 50 51 .c: 52 $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) 53 .c~: 54 $(GET) $(GFLAGS) $< 55 $(CC) $(CFLAGS) $*.c -o $@ $(LDFLAGS) 56 -rm -f $*.c 57 .f: 58 $(F77) $(FFLAGS) $< -o $@ $(LDFLAGS) 59 .f~: 60 $(GET) $(GFLAGS) $< 61 $(F77) $(FFLAGS) $*.f -o $@ $(LDFLAGS) 62 -rm -f $*.f 63 .s: 64 $(AS) $(ASFLAGS) $< -o $@ $(LDFLAGS) 65 .s~: 66 $(GET) $(GFLAGS) $< 67 $(AS) $(ASFLAGS) $*.s -o $* $(LDFLAGS) 68 -rm -f $*.s 69 .sh: 70 cp $< $@; chmod 0777 $@ 71 .sh~: 72 $(GET) $(GFLAGS) $< 73 cp $*.sh $*; chmod 0777 $@ 74 -rm -f $*.sh 75 .C: 76 $(C++C) $(C++FLAGS) $< -o $@ $(LDFLAGS) 77 .C~: 78 $(GET) $(GFLAGS) $< 79 $(C++C) $(C++FLAGS) $*.C -o $@ $(LDFLAGS) 80 -rm -f $*.C 81 82 .c.a: 83 $(CC) $(CFLAGS) -c $< 84 $(AR) $(ARFLAGS) $@ $*.o 85 -rm -f $*.o 86 .c.o: 87 $(CC) $(CFLAGS) -c $< 88 .c~.a: 89 $(GET) $(GFLAGS) $< 90 $(CC) $(CFLAGS) -c $*.c 91 $(AR) $(ARFLAGS) $@ $*.o 92 -rm -f $*.[co] 93 .c~.c: 94 $(GET) $(GFLAGS) $< 95 .c~.o: 96 $(GET) $(GFLAGS) $< 97 $(CC) $(CFLAGS) -c $*.c 98 -rm -f $*.c 99 .f.a: 100 $(F77) $(FFLAGS) -c $*.f 101 $(AR) $(ARFLAGS) $@ $*.o 102 -rm -f $*.o 103 .f.o: 104 $(F77) $(FFLAGS) -c $*.f 105 .f~.a: 106 $(GET) $(GFLAGS) $< 107 $(F77) $(FFLAGS) -c $*.f 108 $(AR) $(ARFLAGS) $@ $*.o 109 -rm -f $*.[fo] 110 .f~.f: 111 $(GET) $(GFLAGS) $< 112 .f~.o: 113 $(GET) $(GFLAGS) $< 114 $(F77) $(FFLAGS) -c $*.f 115 -rm -f $*.f 116 .h~.h: 117 $(GET) $(GFLAGS) $< 118 .l.c: 119 $(LEX) $(LFLAGS) $< 120 mv lex.yy.c $@ 121 .l.o: 122 $(LEX) $(LFLAGS) $< 123 $(CC) $(CFLAGS) -c lex.yy.c 124 -rm lex.yy.c; mv lex.yy.o $@ 125 .l~.c: 126 $(GET) $(GFLAGS) $< 127 $(LEX) $(LFLAGS) $*.l 128 mv lex.yy.c $@ 129 -rm -f $*.l 130 .l~.l: 131 $(GET) $(GFLAGS) $< 132 .l~.o: 133 $(GET) $(GFLAGS) $< 134 $(LEX) $(LFLAGS) $*.l 135 $(CC) $(CFLAGS) -c lex.yy.c 136 -rm -f lex.yy.c $*.l 137 mv lex.yy.o $@ 138 .s.a: 139 $(AS) $(ASFLAGS) -o $*.o $*.s 140 $(AR) $(ARFLAGS) $@ $*.o 141 .s.o: 142 $(AS) $(ASFLAGS) -o $@ $< 143 .s~.a: 144 $(GET) $(GFLAGS) $< 145 $(AS) $(ASFLAGS) -o $*.o $*.s 146 $(AR) $(ARFLAGS) $@ $*.o 147 -rm -f $*.[so] 148 .s~.o: 149 $(GET) $(GFLAGS) $< 150 $(AS) $(ASFLAGS) -o $*.o $*.s 151 -rm -f $*.s 152 .s~.s: 153 $(GET) $(GFLAGS) $< 154 .sh~.sh: 155 $(GET) $(GFLAGS) $< 156 .y.c: 157 $(YACC) $(YFLAGS) $< 158 mv y.tab.c $@ 159 .y.o: 160 $(YACC) $(YFLAGS) $< 161 $(CC) $(CFLAGS) -c y.tab.c 162 -rm y.tab.c 163 mv y.tab.o $@ 164 .y~.c: 165 $(GET) $(GFLAGS) $< 166 $(YACC) $(YFLAGS) $*.y 167 mv y.tab.c $*.c 168 -rm -f $*.y 169 .y~.o: 170 $(GET) $(GFLAGS) $< 171 $(YACC) $(YFLAGS) $*.y 172 $(CC) $(CFLAGS) -c y.tab.c 173 -rm -f y.tab.c $*.y 174 mv y.tab.o $*.o 175 .y~.y : 176 $(GET) $(GFLAGS) $< 177 .C.a: 178 $(C++C) $(C++FLAGS) -c $< 179 $(AR) $(ARFLAGS) $@ $*.o 180 -rm -f $*.o 181 .C.o: 182 $(C++C) $(C++FLAGS) -c $< 183 .C~.a: 184 $(GET) $(GFLAGS) $< 185 $(C++C) $(C++FLAGS) -c $*.C 186 $(AR) $(ARFLAGS) $@ $*.o 187 -rm -f $*.[Co] 188 .C~.C: 189 $(GET) $(GFLAGS) $< 190 .C~.o: 191 $(GET) $(GFLAGS) $< 192 $(C++C) $(C++FLAGS) -c $*.C 193 -rm -f $*.C 194 .L.C: 195 $(LEX) $(LFLAGS) $< 196 mv lex.yy.c $@ 197 .L.o: 198 $(LEX) $(LFLAGS) $< 199 $(C++C) $(C++FLAGS) -c lex.yy.c 200 -rm lex.yy.c; mv lex.yy.o $@ 201 .L~.C: 202 $(GET) $(GFLAGS) $< 203 $(LEX) $(LFLAGS) $*.L 204 mv lex.yy.c $@ 205 -rm -f $*.L 206 .L~.L: 207 $(GET) $(GFLAGS) $< 208 .L~.o: 209 $(GET) $(GFLAGS) $< 210 $(LEX) $(LFLAGS) $*.L 211 $(C++C) $(C++FLAGS) -c lex.yy.c 212 -rm -f lex.yy.c $*.L 213 mv lex.yy.c $@ 214 .Y.C: 215 $(YACC) $(YFLAGS) $< 216 mv y.tab.c $@ 217 .Y.o: 218 $(YACC) $(YFLAGS) $< 219 $(C++C) $(C++FLAGS) -c y.tab.c 220 -rm y.tab.c 221 mv y.tab.o $@ 222 .Y~.C: 223 $(GET) $(GFLAGS) $< 224 $(YACC) $(YFLAGS) $*.Y 225 mv y.tab.c $*.C 226 -rm -f $*.Y 227 .Y~.o: 228 $(GET) $(GFLAGS) $< 229 $(YACC) $(YFLAGS) $*.Y 230 $(C++C) $(C++FLAGS) -c y.tab.c 231 -rm -f y.tab.c $*.Y 232 mv y.tab.o $*.o 233 .Y~.Y : 234 $(GET) $(GFLAGS) $< 235 236 markfile.o: markfile 237 echo "static char _sccsid[] = \"`grep @'(#)' markfile`\";" > markfile.c 238 $(CC) -c markfile.c 239 -rm -f markfile.c 240 241 .SCCS_GET: 242 $(GET) $(GFLAGS) s.$@