xref: /titanic_41/usr/src/uts/sparc/Makefile.rules (revision 1915be19b7a1f7c113b706bd54d6ca393e8d8107)
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#
22# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27#	This Makefile defines all file modules and build rules for the
28# directory uts/sparc and its children. These are the source files which
29# are specific to the sparc processor.
30#
31#	The following two-level ordering must be maintained in this file.
32#	  Lines are sorted first in order of decreasing specificity based on
33#	  the first directory component.  That is, sun4u rules come before
34#	  sparc rules come before common rules.
35#
36#	  Lines whose initial directory components are equal are sorted
37#	  alphabetically by the remaining components.
38
39#
40#	Section 1a: C object build rules
41#
42$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/dtrace/%.c
43	$(COMPILE.c) -o $@ $<
44	$(CTFCONVERT_O)
45
46$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/dtrace/%.s
47	$(COMPILE.s) -o $@ $<
48
49$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/io/%.c
50	$(COMPILE.c) -o $@ $<
51	$(CTFCONVERT_O)
52
53$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/fpu/%.c
54	$(COMPILE.c) -o $@ $<
55	$(CTFCONVERT_O)
56
57$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/fs/proc/%.c
58	$(COMPILE.c) -o $@ $<
59	$(CTFCONVERT_O)
60
61$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/krtld/%.c
62	$(COMPILE.c) -o $@ $<
63	$(CTFCONVERT_O)
64
65#
66# _RELSEG indicates that the dynamic syms are put in a separate ELF
67#	section so they can be freed later.
68#
69$(OBJS_DIR)/kobj_bootflags.o	:= CPPFLAGS += -I$(SRC)/common
70$(OBJS_DIR)/kobj.o		:= CPPFLAGS += -DMODDIR_SUFFIX=\"sparcv9\"
71$(OBJS_DIR)/kobj.o		:= CPPFLAGS += -D_RELSEG
72
73$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/krtld/%.s
74	$(COMPILE.s) -o $@ $<
75
76$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/ml/%.s
77	$(COMPILE.s) -o $@ $<
78
79$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/os/%.c
80	$(COMPILE.c) -o $@ $<
81	$(CTFCONVERT_O)
82
83$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/syscall/%.c
84	$(COMPILE.c) -o $@ $<
85	$(CTFCONVERT_O)
86
87#
88#	Section 1b: Lint `object' build rules.
89#
90$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/dtrace/%.c
91	@($(LHEAD) $(LINT.c) $< $(LTAIL))
92
93$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/dtrace/%.s
94	@($(LHEAD) $(LINT.s) $< $(LTAIL))
95
96$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/io/%.c
97	@($(LHEAD) $(LINT.c) $< $(LTAIL))
98
99$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/fpu/%.c
100	@($(LHEAD) $(LINT.c) $< $(LTAIL))
101
102$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/fs/proc/%.c
103	@($(LHEAD) $(LINT.c) $< $(LTAIL))
104
105$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/krtld/%.c
106	@($(LHEAD) $(LINT.c) $< $(LTAIL))
107
108$(OBJS_DIR)/kobj_bootflags.ln	:= CPPFLAGS += -I$(SRC)/common
109$(OBJS_DIR)/kobj.ln		:= CPPFLAGS += -DMODDIR_SUFFIX=\"sparcv9\"
110$(OBJS_DIR)/kobj.ln		:= CPPFLAGS += -D_RELSEG
111
112$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/krtld/%.s
113	@($(LHEAD) $(LINT.s) $< $(LTAIL))
114
115$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/ml/%.s
116	@($(LHEAD) $(LINT.s) $< $(LTAIL))
117
118$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/os/%.c
119	@($(LHEAD) $(LINT.c) $< $(LTAIL))
120
121$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/syscall/%.c
122	@($(LHEAD) $(LINT.c) $< $(LTAIL))
123