xref: /titanic_41/usr/src/uts/sparc/Makefile.rules (revision 0bb073995ac5a95bd35f2dd790df1ea3d8c2d507)
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# 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$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/zfs/%.c
66	$(COMPILE.c) -o $@ $<
67	$(CTFCONVERT_O)
68
69#
70# _RELSEG indicates that the dynamic syms are put in a separate ELF
71#	section so they can be freed later.
72#
73$(OBJS_DIR)/kobj_bootflags.o	:= CPPFLAGS += -I$(SRC)/common
74$(OBJS_DIR)/kobj.o		:= CPPFLAGS += -DMODDIR_SUFFIX=\"sparcv9\"
75$(OBJS_DIR)/kobj.o		:= CPPFLAGS += -D_RELSEG
76
77$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/krtld/%.s
78	$(COMPILE.s) -o $@ $<
79
80$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/ml/%.s
81	$(COMPILE.s) -o $@ $<
82
83$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/os/%.c
84	$(COMPILE.c) -o $@ $<
85	$(CTFCONVERT_O)
86
87$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/syscall/%.c
88	$(COMPILE.c) -o $@ $<
89	$(CTFCONVERT_O)
90
91#
92#	Section 1b: Lint `object' build rules.
93#
94$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/dtrace/%.c
95	@($(LHEAD) $(LINT.c) $< $(LTAIL))
96
97$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/dtrace/%.s
98	@($(LHEAD) $(LINT.s) $< $(LTAIL))
99
100$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/io/%.c
101	@($(LHEAD) $(LINT.c) $< $(LTAIL))
102
103$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/fpu/%.c
104	@($(LHEAD) $(LINT.c) $< $(LTAIL))
105
106$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/zfs/%.c
107	@($(LHEAD) $(LINT.c) $< $(LTAIL))
108
109$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/fs/proc/%.c
110	@($(LHEAD) $(LINT.c) $< $(LTAIL))
111
112$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/krtld/%.c
113	@($(LHEAD) $(LINT.c) $< $(LTAIL))
114
115$(OBJS_DIR)/kobj_bootflags.ln	:= CPPFLAGS += -I$(SRC)/common
116$(OBJS_DIR)/kobj.ln		:= CPPFLAGS += -DMODDIR_SUFFIX=\"sparcv9\"
117$(OBJS_DIR)/kobj.ln		:= CPPFLAGS += -D_RELSEG
118
119$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/krtld/%.s
120	@($(LHEAD) $(LINT.s) $< $(LTAIL))
121
122$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/ml/%.s
123	@($(LHEAD) $(LINT.s) $< $(LTAIL))
124
125$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/os/%.c
126	@($(LHEAD) $(LINT.c) $< $(LTAIL))
127
128$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/syscall/%.c
129	@($(LHEAD) $(LINT.c) $< $(LTAIL))
130