xref: /titanic_44/usr/src/cmd/make/bin/svr4.make.rules.file (revision 10d63b7db37a83b39c7f511cf9426c9d03ea0760)
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#
25.SUFFIXES: .o .c .c~ .y .y~ .l .l~ .s .s~ .sh .sh~ .h .h~ .f .f~ \
26.C .C~ .Y .Y~ .L .L~
27
28MAKE=make
29BUILD=build
30AR=ar
31ARFLAGS=rv
32AS=as
33ASFLAGS=
34CC=cc
35CFLAGS=-O
36F77=f77
37FFLAGS=-O
38GET=get
39GFLAGS=
40LD=ld
41LDFLAGS=
42LEX=lex
43LFLAGS=
44YACC=yacc
45YFLAGS=
46C++C=CC
47C++FLAGS=-O
48
49
50.c:
51	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
52.c~:
53	$(GET) $(GFLAGS) $<
54	$(CC) $(CFLAGS) $*.c -o $@ $(LDFLAGS)
55	-rm -f $*.c
56.f:
57	$(F77) $(FFLAGS) $< -o $@ $(LDFLAGS)
58.f~:
59	$(GET) $(GFLAGS) $<
60	$(F77) $(FFLAGS) $*.f -o $@ $(LDFLAGS)
61	-rm -f $*.f
62.s:
63	$(AS) $(ASFLAGS) $< -o $@ $(LDFLAGS)
64.s~:
65	$(GET) $(GFLAGS) $<
66	$(AS) $(ASFLAGS) $*.s -o $* $(LDFLAGS)
67	-rm -f $*.s
68.sh:
69	cp $< $@; chmod 0777 $@
70.sh~:
71	$(GET) $(GFLAGS) $<
72	cp $*.sh $*; chmod 0777 $@
73	-rm -f $*.sh
74.C:
75	$(C++C) $(C++FLAGS) $< -o $@ $(LDFLAGS)
76.C~:
77	$(GET) $(GFLAGS) $<
78	$(C++C) $(C++FLAGS) $*.C -o $@ $(LDFLAGS)
79	-rm -f $*.C
80
81.c.a:
82	$(CC) $(CFLAGS) -c $<
83	$(AR) $(ARFLAGS) $@ $*.o
84	-rm -f $*.o
85.c.o:
86	$(CC) $(CFLAGS) -c $<
87.c~.a:
88	$(GET) $(GFLAGS) $<
89	$(CC) $(CFLAGS) -c $*.c
90	$(AR) $(ARFLAGS) $@ $*.o
91	-rm -f $*.[co]
92.c~.c:
93	$(GET) $(GFLAGS) $<
94.c~.o:
95	$(GET) $(GFLAGS) $<
96	$(CC) $(CFLAGS) -c $*.c
97	-rm -f $*.c
98.f.a:
99	$(F77) $(FFLAGS) -c $*.f
100	$(AR) $(ARFLAGS) $@ $*.o
101	-rm -f $*.o
102.f.o:
103	$(F77) $(FFLAGS) -c $*.f
104.f~.a:
105	$(GET) $(GFLAGS) $<
106	$(F77) $(FFLAGS) -c $*.f
107	$(AR) $(ARFLAGS) $@ $*.o
108	-rm -f $*.[fo]
109.f~.f:
110	$(GET) $(GFLAGS) $<
111.f~.o:
112	$(GET) $(GFLAGS) $<
113	$(F77) $(FFLAGS) -c $*.f
114	-rm -f $*.f
115.h~.h:
116	$(GET) $(GFLAGS) $<
117.l.c:
118	$(LEX) $(LFLAGS) $<
119	mv lex.yy.c $@
120.l.o:
121	$(LEX) $(LFLAGS) $<
122	$(CC) $(CFLAGS) -c lex.yy.c
123	-rm lex.yy.c; mv lex.yy.o $@
124.l~.c:
125	$(GET) $(GFLAGS) $<
126	$(LEX) $(LFLAGS) $*.l
127	mv lex.yy.c $@
128	-rm -f $*.l
129.l~.l:
130	$(GET) $(GFLAGS) $<
131.l~.o:
132	$(GET) $(GFLAGS) $<
133	$(LEX) $(LFLAGS) $*.l
134	$(CC) $(CFLAGS) -c lex.yy.c
135	-rm -f lex.yy.c $*.l
136	mv lex.yy.o $@
137.s.a:
138	$(AS) $(ASFLAGS) -o $*.o $*.s
139	$(AR) $(ARFLAGS) $@ $*.o
140.s.o:
141	$(AS) $(ASFLAGS) -o $@ $<
142.s~.a:
143	$(GET) $(GFLAGS) $<
144	$(AS) $(ASFLAGS) -o $*.o $*.s
145	$(AR) $(ARFLAGS) $@ $*.o
146	-rm -f $*.[so]
147.s~.o:
148	$(GET) $(GFLAGS) $<
149	$(AS) $(ASFLAGS) -o $*.o $*.s
150	-rm -f $*.s
151.s~.s:
152	$(GET) $(GFLAGS) $<
153.sh~.sh:
154	$(GET) $(GFLAGS) $<
155.y.c:
156	$(YACC) $(YFLAGS) $<
157	mv y.tab.c $@
158.y.o:
159	$(YACC) $(YFLAGS) $<
160	$(CC) $(CFLAGS) -c y.tab.c
161	-rm y.tab.c
162	mv y.tab.o $@
163.y~.c:
164	$(GET) $(GFLAGS) $<
165	$(YACC) $(YFLAGS) $*.y
166	mv y.tab.c $*.c
167	-rm -f $*.y
168.y~.o:
169	$(GET) $(GFLAGS) $<
170	$(YACC) $(YFLAGS) $*.y
171	$(CC) $(CFLAGS) -c y.tab.c
172	-rm -f y.tab.c $*.y
173	mv y.tab.o $*.o
174.y~.y :
175	$(GET) $(GFLAGS) $<
176.C.a:
177	$(C++C) $(C++FLAGS) -c $<
178	$(AR) $(ARFLAGS) $@ $*.o
179	-rm -f $*.o
180.C.o:
181	$(C++C) $(C++FLAGS) -c $<
182.C~.a:
183	$(GET) $(GFLAGS) $<
184	$(C++C) $(C++FLAGS) -c $*.C
185	$(AR) $(ARFLAGS) $@ $*.o
186	-rm -f $*.[Co]
187.C~.C:
188	$(GET) $(GFLAGS) $<
189.C~.o:
190	$(GET) $(GFLAGS) $<
191	$(C++C) $(C++FLAGS) -c $*.C
192	-rm -f $*.C
193.L.C:
194	$(LEX) $(LFLAGS) $<
195	mv lex.yy.c $@
196.L.o:
197	$(LEX) $(LFLAGS) $<
198	$(C++C) $(C++FLAGS) -c lex.yy.c
199	-rm lex.yy.c; mv lex.yy.o $@
200.L~.C:
201	$(GET) $(GFLAGS) $<
202	$(LEX) $(LFLAGS) $*.L
203	mv lex.yy.c $@
204	-rm -f $*.L
205.L~.L:
206	$(GET) $(GFLAGS) $<
207.L~.o:
208	$(GET) $(GFLAGS) $<
209	$(LEX) $(LFLAGS) $*.L
210	$(C++C) $(C++FLAGS) -c lex.yy.c
211	-rm -f lex.yy.c $*.L
212	mv lex.yy.c $@
213.Y.C:
214	$(YACC) $(YFLAGS) $<
215	mv y.tab.c $@
216.Y.o:
217	$(YACC) $(YFLAGS) $<
218	$(C++C) $(C++FLAGS) -c y.tab.c
219	-rm y.tab.c
220	mv y.tab.o $@
221.Y~.C:
222	$(GET) $(GFLAGS) $<
223	$(YACC) $(YFLAGS) $*.Y
224	mv y.tab.c $*.C
225	-rm -f $*.Y
226.Y~.o:
227	$(GET) $(GFLAGS) $<
228	$(YACC) $(YFLAGS) $*.Y
229	$(C++C) $(C++FLAGS) -c y.tab.c
230	-rm -f y.tab.c $*.Y
231	mv y.tab.o $*.o
232.Y~.Y :
233	$(GET) $(GFLAGS) $<
234
235markfile.o:	markfile
236	echo "static char _sccsid[] = \"`grep @'(#)' markfile`\";" > markfile.c
237	$(CC) -c markfile.c
238	-rm -f markfile.c
239
240.SCCS_GET:
241	$(GET) $(GFLAGS)  s.$@
242