xref: /titanic_41/usr/src/uts/sun4u/adm1026/Makefile (revision 6dfee4834394825da35b977ca71cdc965bc7b6a4)
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# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#pragma ident	"%Z%%M%	%I%	%E% SMI"
27#
28#	This makefile drives the production of the adm1026 driver kernel module
29#
30#	sun4u implementation architecture dependent
31#
32
33#
34#	Path to the base of the uts directory tree (usually /usr/src/uts).
35#
36UTSBASE	= ../..
37
38#
39#	Define the module and object file sets.
40#
41MODULE		= adm1026
42OBJECTS		= $(ADM1026_OBJS:%=$(OBJS_DIR)/%)
43LINTS		= $(ADM1026_OBJS:%.o=$(LINTS_DIR)/%.ln)
44ROOTMODULE	= $(ROOT_PSM_DRV_DIR)/$(MODULE)
45
46#
47#	Include common rules.
48#
49include $(UTSBASE)/sun4u/Makefile.sun4u
50
51#
52# lint pass one enforcement
53#
54CFLAGS += $(CCVERBOSE)
55LDFLAGS += -dy -N misc/i2c_svc
56
57# compile time debug flag
58
59
60#
61#	Define targets
62#
63ALL_TARGET	= $(BINARY)
64LINT_TARGET	= $(MODULE).lint
65INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
66
67.KEEP_STATE:
68
69
70all:		$(ALL_DEPS)
71
72def:		$(DEF_DEPS)
73
74clean:		$(CLEAN_DEPS)
75
76clobber:	$(CLOBBER_DEPS)
77
78lint:		$(LINT_DEPS)
79
80modlintlib:	$(MODLINTLIB_DEPS)
81
82clean.lint:	$(CLEAN_LINT_DEPS)
83
84install:	$(INSTALL_DEPS)
85
86#       Include common targets.
87#
88include $(UTSBASE)/sun4u/Makefile.targ
89
90#
91#       Defines for local commands.
92#
93WLCC		= wlcc
94TOUCH		= touch
95WARLOCK		= warlock
96SCCS		= sccs
97TEST		= test
98
99
100#
101#       Warlock targets
102#
103
104ADM1026_FILES = $(ADM1026_OBJS:%.o=%.ll)
105
106warlock: $(MODULE).ok
107
108%.wlcmd:
109	$(TEST) -f $@ || $(SCCS) get $@
110
111%.ok: $(ADM1026_FILES) adm1026.wlcmd warlock_ddi.files
112	$(WARLOCK) -c ./adm1026.wlcmd \
113	$(ADM1026_FILES) \
114	-l ../../sparc/warlock/ddi_dki_impl.ll
115	$(TOUCH) $@
116
117%.ll: $(UTSBASE)/sun4u/io/i2c/clients/%.c
118	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
119
120warlock_ddi.files:
121	cd ../../sparc/warlock; pwd; $(MAKE) warlock
122