0
|
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 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 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 |
#
|
|
23 |
#ident "@(#)Makefile.targ 1.9 97/10/08 SMI"
|
|
24 |
#
|
|
25 |
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
|
|
26 |
# Use is subject to license terms.
|
|
27 |
#
|
|
28 |
# jos/uts/Makefile.targ
|
|
29 |
#
|
|
30 |
# This Makefiles contains the common targets and definitions for
|
|
31 |
# all kernels. It is to be included in the Makefiles for specific
|
|
32 |
# implementation architectures and processor architecture dependent
|
|
33 |
# modules: i.e.: all driving kernel Makefiles.
|
|
34 |
#
|
|
35 |
|
|
36 |
#
|
|
37 |
# Default rule for building the lint library directory:
|
|
38 |
#
|
|
39 |
$(LINT_LIB_DIR):
|
|
40 |
-@mkdir $@ 2> /dev/null
|
|
41 |
|
|
42 |
#
|
|
43 |
# All C objects depend on inline files. However, cc(1) doesn't generate
|
|
44 |
# the correct dependency info. Also, these Makefiles don't contain a
|
|
45 |
# separate list of C-derived object files (but it is light weight to
|
|
46 |
# let the assembler files think they depend upon this when they don't).
|
|
47 |
# Fortunately, the inline files won't change very often. So, for now,
|
|
48 |
# all objects depend on the inline files. Remove this when the inliner
|
|
49 |
# is fixed to drop correct dependency information.
|
|
50 |
#
|
|
51 |
$(OBJECTS): $(INLINES)
|
|
52 |
|
|
53 |
#
|
|
54 |
# Partially link .o files to generate the kmod. The fake dependency
|
|
55 |
# on modstubs simplifies things...
|
|
56 |
#
|
|
57 |
$(MODULE): $(OBJECTS)
|
|
58 |
$(LD) -r -o $@ $(OBJECTS)
|
|
59 |
$(POST_PROCESS)
|
|
60 |
|
|
61 |
#
|
|
62 |
# This target checks each kmod undefined entry points. It does not
|
|
63 |
# modify the kmod in any way. XXX hacked to workaround bugid 1056988
|
|
64 |
#
|
|
65 |
$(MODULE).check: $(MODULE) $(OBJECTS) $(UNIX_O) $(MODSTUBS_O)
|
|
66 |
$(LD) -o /dev/null $(OBJECTS) $(UNIX_O) $(MODSTUBS_O)
|
|
67 |
|
|
68 |
#
|
|
69 |
# Module lint library construction targets.
|
|
70 |
#
|
|
71 |
MOD_LINT_LIB = $(LINT_LIB_DIR)/llib-l$(MODULE).ln
|
|
72 |
|
|
73 |
modlintlib: $(MOD_LINT_LIB)
|
|
74 |
|
|
75 |
$(MOD_LINT_LIB): $(LINT_LIB_DIR) $(LINTS)
|
|
76 |
@-$(ECHO) "\n$(MODULE): (library construction):"
|
|
77 |
@$(LINT) -o$(MODULE) -u $(LINTFLAGS) $(LINTS)
|
|
78 |
@$(MV) $(@F) $@
|
|
79 |
|
|
80 |
$(MODULE).lint: $(MOD_LINT_LIB)
|
|
81 |
|
|
82 |
#
|
|
83 |
# Installation targets and rules:
|
|
84 |
#
|
|
85 |
$(ROOT_MOD_DIR) $(USR_MOD_DIR):
|
|
86 |
-$(INS.dir)
|
|
87 |
|
|
88 |
$(ROOT_STRMOD_DIR): $(ROOT_MOD_DIR)
|
|
89 |
-$(INS.dir)
|
|
90 |
|
|
91 |
$(USR_STRMOD_DIR): $(USR_MOD_DIR)
|
|
92 |
-$(INS.dir)
|
|
93 |
|
|
94 |
$(ROOT_STRMOD_DIR)/%: % $(ROOT_STRMOD_DIR)
|
|
95 |
$(INS.file)
|
|
96 |
|
|
97 |
$(USR_STRMOD_DIR)/%: % $(USR_STRMOD_DIR)
|
|
98 |
$(INS.file)
|
|
99 |
|
|
100 |
#
|
|
101 |
#
|
|
102 |
#
|
|
103 |
clean.lint:
|
|
104 |
$(RM) $(LINTS) $(CLEANLINTFILES)
|
|
105 |
|
|
106 |
clean: clean.lint
|
|
107 |
$(RM) $(OBJECTS) $(CLEANFILES)
|
|
108 |
|
|
109 |
clobber: clean
|
|
110 |
$(RM) $(CLOBBERFILES)
|
|
111 |
|