xref: /titanic_44/usr/src/uts/sparc/elfexec/Makefile (revision 1ae0874509b6811fdde1dfd46f0d93fd09867a3f)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# uts/sparc/elfexec/Makefile
24# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27#ident	"%Z%%M%	%I%	%E% SMI"
28#
29#	This makefile drives the production of the elfexec exec kernel
30#	module.
31#
32#	sparc architecture dependent
33#
34
35#
36#	Path to the base of the uts directory tree (usually /usr/src/uts).
37#
38UTSBASE	= ../..
39
40#
41#	Define the module and object file sets.
42#
43MODULE		= elfexec
44ELFEXEC_OBJS_32	=
45ELFEXEC_OBJS_64	= elf32.o elf32_notes.o old32_notes.o
46ELFEXEC_OBJS	+= $(ELFEXEC_OBJS_$(CLASS))
47OBJECTS		= $(ELFEXEC_OBJS:%=$(OBJS_DIR)/%)
48LINTS		= $(ELFEXEC_OBJS:%.o=$(LINTS_DIR)/%.ln)
49ROOTMODULE	= $(ROOT_EXEC_DIR)/$(MODULE)
50
51#
52#	Include common rules.
53#
54include $(UTSBASE)/sparc/Makefile.sparc
55
56#
57#	Define targets
58#
59ALL_TARGET	= $(BINARY)
60LINT_TARGET	= $(MODULE).lint
61INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
62
63#
64#	Overrides.
65#
66CFLAGS		+= $(CCVERBOSE)
67
68#
69#	Default build targets.
70#
71.KEEP_STATE:
72
73def:		$(DEF_DEPS)
74
75all:		$(ALL_DEPS)
76
77clean:		$(CLEAN_DEPS)
78
79clobber:	$(CLOBBER_DEPS)
80
81lint:		$(LINT_DEPS)
82
83modlintlib:	$(MODLINTLIB_DEPS)
84
85clean.lint:	$(CLEAN_LINT_DEPS)
86
87install:	$(INSTALL_DEPS)
88
89#
90#	Include common targets.
91#
92include $(UTSBASE)/sparc/Makefile.targ
93
94.NO_PARALLEL:	$(LINTS)
95
96$(OBJS_DIR)/elf32.o:	$(UTSBASE)/common/exec/elf/elf.c
97	$(COMPILE.c) -o $@ -D_ELF32_COMPAT $(UTSBASE)/common/exec/elf/elf.c
98	$(CTFCONVERT_O)
99
100$(OBJS_DIR)/elf32_notes.o: $(UTSBASE)/common/exec/elf/elf_notes.c
101	$(COMPILE.c) -o $@ -D_ELF32_COMPAT $(UTSBASE)/common/exec/elf/elf_notes.c
102	$(CTFCONVERT_O)
103
104$(OBJS_DIR)/old32_notes.o: $(UTSBASE)/common/exec/elf/old_notes.c
105	$(COMPILE.c) -o $@ -D_ELF32_COMPAT $(UTSBASE)/common/exec/elf/old_notes.c
106	$(CTFCONVERT_O)
107
108$(LINTS_DIR)/elf32.ln:	$(UTSBASE)/common/exec/elf/elf.c
109	@($(LHEAD) $(LINT.c) -Celf32 -D_ELF32_COMPAT $(UTSBASE)/common/exec/elf/elf.c $(LTAIL))
110	@$(MV) $(@F) $@
111
112$(LINTS_DIR)/elf32_notes.ln: $(UTSBASE)/common/exec/elf/elf_notes.c
113	@($(LHEAD) $(LINT.c) -Celf32_notes -D_ELF32_COMPAT $(UTSBASE)/common/exec/elf/elf_notes.c $(LTAIL))
114	@$(MV) $(@F) $@
115
116$(LINTS_DIR)/old32_notes.ln: $(UTSBASE)/common/exec/elf/old_notes.c
117	@($(LHEAD) $(LINT.c) -Cold32_notes -D_ELF32_COMPAT $(UTSBASE)/common/exec/elf/old_notes.c $(LTAIL))
118	@$(MV) $(@F) $@
119