xref: /titanic_50/usr/src/uts/sun4u/adm1026/Makefile (revision d58fda4376e4bf67072ce2e69f6f47036f9dbb68)
1*d58fda43Sjbeloro#
2*d58fda43Sjbeloro# CDDL HEADER START
3*d58fda43Sjbeloro#
4*d58fda43Sjbeloro# The contents of this file are subject to the terms of the
5*d58fda43Sjbeloro# Common Development and Distribution License, Version 1.0 only
6*d58fda43Sjbeloro# (the "License").  You may not use this file except in compliance
7*d58fda43Sjbeloro# with the License.
8*d58fda43Sjbeloro#
9*d58fda43Sjbeloro# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*d58fda43Sjbeloro# or http://www.opensolaris.org/os/licensing.
11*d58fda43Sjbeloro# See the License for the specific language governing permissions
12*d58fda43Sjbeloro# and limitations under the License.
13*d58fda43Sjbeloro#
14*d58fda43Sjbeloro# When distributing Covered Code, include this CDDL HEADER in each
15*d58fda43Sjbeloro# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*d58fda43Sjbeloro# If applicable, add the following below this CDDL HEADER, with the
17*d58fda43Sjbeloro# fields enclosed by brackets "[]" replaced with your own identifying
18*d58fda43Sjbeloro# information: Portions Copyright [yyyy] [name of copyright owner]
19*d58fda43Sjbeloro#
20*d58fda43Sjbeloro# CDDL HEADER END
21*d58fda43Sjbeloro#
22*d58fda43Sjbeloro#
23*d58fda43Sjbeloro# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24*d58fda43Sjbeloro# Use is subject to license terms.
25*d58fda43Sjbeloro#
26*d58fda43Sjbeloro#pragma ident	"%Z%%M%	%I%	%E% SMI"
27*d58fda43Sjbeloro#
28*d58fda43Sjbeloro#	This makefile drives the production of the adm1026 driver kernel module
29*d58fda43Sjbeloro#
30*d58fda43Sjbeloro#	sun4u implementation architecture dependent
31*d58fda43Sjbeloro#
32*d58fda43Sjbeloro
33*d58fda43Sjbeloro#
34*d58fda43Sjbeloro#	Path to the base of the uts directory tree (usually /usr/src/uts).
35*d58fda43Sjbeloro#
36*d58fda43SjbeloroUTSBASE	= ../..
37*d58fda43Sjbeloro
38*d58fda43Sjbeloro#
39*d58fda43Sjbeloro#	Define the module and object file sets.
40*d58fda43Sjbeloro#
41*d58fda43SjbeloroMODULE		= adm1026
42*d58fda43SjbeloroOBJECTS		= $(ADM1026_OBJS:%=$(OBJS_DIR)/%)
43*d58fda43SjbeloroLINTS		= $(ADM1026_OBJS:%.o=$(LINTS_DIR)/%.ln)
44*d58fda43SjbeloroROOTMODULE	= $(ROOT_PSM_DRV_DIR)/$(MODULE)
45*d58fda43Sjbeloro
46*d58fda43Sjbeloro#
47*d58fda43Sjbeloro#	Include common rules.
48*d58fda43Sjbeloro#
49*d58fda43Sjbeloroinclude $(UTSBASE)/sun4u/Makefile.sun4u
50*d58fda43Sjbeloro
51*d58fda43Sjbeloro#
52*d58fda43Sjbeloro# lint pass one enforcement
53*d58fda43Sjbeloro#
54*d58fda43SjbeloroCFLAGS += $(CCVERBOSE)
55*d58fda43SjbeloroLDFLAGS += -dy -N misc/i2c_svc
56*d58fda43Sjbeloro
57*d58fda43Sjbeloro# compile time debug flag
58*d58fda43Sjbeloro
59*d58fda43Sjbeloro
60*d58fda43Sjbeloro#
61*d58fda43Sjbeloro#	Define targets
62*d58fda43Sjbeloro#
63*d58fda43SjbeloroALL_TARGET	= $(BINARY)
64*d58fda43SjbeloroLINT_TARGET	= $(MODULE).lint
65*d58fda43SjbeloroINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
66*d58fda43Sjbeloro
67*d58fda43Sjbeloro.KEEP_STATE:
68*d58fda43Sjbeloro
69*d58fda43Sjbeloro
70*d58fda43Sjbeloroall:		$(ALL_DEPS)
71*d58fda43Sjbeloro
72*d58fda43Sjbelorodef:		$(DEF_DEPS)
73*d58fda43Sjbeloro
74*d58fda43Sjbeloroclean:		$(CLEAN_DEPS)
75*d58fda43Sjbeloro
76*d58fda43Sjbeloroclobber:	$(CLOBBER_DEPS)
77*d58fda43Sjbeloro
78*d58fda43Sjbelorolint:		$(LINT_DEPS)
79*d58fda43Sjbeloro
80*d58fda43Sjbeloromodlintlib:	$(MODLINTLIB_DEPS)
81*d58fda43Sjbeloro
82*d58fda43Sjbeloroclean.lint:	$(CLEAN_LINT_DEPS)
83*d58fda43Sjbeloro
84*d58fda43Sjbeloroinstall:	$(INSTALL_DEPS)
85*d58fda43Sjbeloro
86*d58fda43Sjbeloro#       Include common targets.
87*d58fda43Sjbeloro#
88*d58fda43Sjbeloroinclude $(UTSBASE)/sun4u/Makefile.targ
89*d58fda43Sjbeloro
90*d58fda43Sjbeloro#
91*d58fda43Sjbeloro#       Defines for local commands.
92*d58fda43Sjbeloro#
93*d58fda43SjbeloroWLCC		= wlcc
94*d58fda43SjbeloroTOUCH		= touch
95*d58fda43SjbeloroWARLOCK		= warlock
96*d58fda43SjbeloroSCCS		= sccs
97*d58fda43SjbeloroTEST		= test
98*d58fda43Sjbeloro
99*d58fda43Sjbeloro
100*d58fda43Sjbeloro#
101*d58fda43Sjbeloro#       Warlock targets
102*d58fda43Sjbeloro#
103*d58fda43Sjbeloro
104*d58fda43SjbeloroADM1026_FILES = $(ADM1026_OBJS:%.o=%.ll)
105*d58fda43Sjbeloro
106*d58fda43Sjbelorowarlock: $(MODULE).ok
107*d58fda43Sjbeloro
108*d58fda43Sjbeloro%.wlcmd:
109*d58fda43Sjbeloro	$(TEST) -f $@ || $(SCCS) get $@
110*d58fda43Sjbeloro
111*d58fda43Sjbeloro%.ok: $(ADM1026_FILES) adm1026.wlcmd warlock_ddi.files
112*d58fda43Sjbeloro	$(WARLOCK) -c ./adm1026.wlcmd \
113*d58fda43Sjbeloro	$(ADM1026_FILES) \
114*d58fda43Sjbeloro	-l ../../sparc/warlock/ddi_dki_impl.ll
115*d58fda43Sjbeloro	$(TOUCH) $@
116*d58fda43Sjbeloro
117*d58fda43Sjbeloro%.ll: $(UTSBASE)/sun4u/io/i2c/clients/%.c
118*d58fda43Sjbeloro	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
119*d58fda43Sjbeloro
120*d58fda43Sjbelorowarlock_ddi.files:
121*d58fda43Sjbeloro	cd ../../sparc/warlock; pwd; $(MAKE) warlock
122