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