xref: /onnv-gate/usr/src/uts/intel/wc/Makefile (revision 7688:2757e6e1bb2a)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
51253Slq150181# Common Development and Distribution License (the "License").
61253Slq150181# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
211253Slq150181
220Sstevel@tonic-gate#
236990Sgd78059# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate# Use is subject to license terms.
250Sstevel@tonic-gate#
260Sstevel@tonic-gate#
270Sstevel@tonic-gate#	This makefile drives the production of the wc driver
280Sstevel@tonic-gate#	kernel module.
290Sstevel@tonic-gate#
300Sstevel@tonic-gate#	intel implementation architecture independent
310Sstevel@tonic-gate#
320Sstevel@tonic-gate
330Sstevel@tonic-gate#
340Sstevel@tonic-gate#	Path to the base of the uts directory tree (usually /usr/src/uts).
350Sstevel@tonic-gate#
360Sstevel@tonic-gateUTSBASE	= ../..
370Sstevel@tonic-gate
380Sstevel@tonic-gate#
390Sstevel@tonic-gate#	Define the module and object file sets.
400Sstevel@tonic-gate#
410Sstevel@tonic-gateMODULE		= wc
420Sstevel@tonic-gateOBJECTS		= $(WC_OBJS:%=$(OBJS_DIR)/%)
430Sstevel@tonic-gateLINTS		= $(WC_OBJS:%.o=$(LINTS_DIR)/%.ln)
440Sstevel@tonic-gateROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
450Sstevel@tonic-gateCONF_SRCDIR	= $(UTSBASE)/common/io
46*7688SAaron.Zang@Sun.COMWARLOCK_OUT	= $(WC_OBJS:%.o=%.ll)
47*7688SAaron.Zang@Sun.COMWARLOCK_OK	= $(MODULE).ok
48*7688SAaron.Zang@Sun.COMWLCMD_DIR	= $(UTSBASE)/common/io/warlock
490Sstevel@tonic-gate
500Sstevel@tonic-gate#
510Sstevel@tonic-gate#	Include common rules.
520Sstevel@tonic-gate#
530Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.intel
540Sstevel@tonic-gate
550Sstevel@tonic-gate#
560Sstevel@tonic-gate#	Define targets
570Sstevel@tonic-gate#
580Sstevel@tonic-gateALL_TARGET	= $(BINARY) $(SRC_CONFILE)
590Sstevel@tonic-gateLINT_TARGET	= $(MODULE).lint
600Sstevel@tonic-gateINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
610Sstevel@tonic-gate
620Sstevel@tonic-gate#
630Sstevel@tonic-gate#	Overrides.
640Sstevel@tonic-gate#
65*7688SAaron.Zang@Sun.COMLDFLAGS		+= -dy -Nmisc/tem -Ndacf/consconfig_dacf
660Sstevel@tonic-gate
670Sstevel@tonic-gate#
680Sstevel@tonic-gate#	Default build targets.
690Sstevel@tonic-gate#
700Sstevel@tonic-gate.KEEP_STATE:
710Sstevel@tonic-gate
720Sstevel@tonic-gatedef:		$(DEF_DEPS)
730Sstevel@tonic-gate
740Sstevel@tonic-gateall:		$(ALL_DEPS)
750Sstevel@tonic-gate
760Sstevel@tonic-gateclean:		$(CLEAN_DEPS)
770Sstevel@tonic-gate
780Sstevel@tonic-gateclobber:	$(CLOBBER_DEPS)
790Sstevel@tonic-gate
800Sstevel@tonic-gatelint:		$(LINT_DEPS)
810Sstevel@tonic-gate
820Sstevel@tonic-gatemodlintlib:	$(MODLINTLIB_DEPS)
830Sstevel@tonic-gate
840Sstevel@tonic-gateclean.lint:	$(CLEAN_LINT_DEPS)
850Sstevel@tonic-gate
860Sstevel@tonic-gateinstall:	$(INSTALL_DEPS)
870Sstevel@tonic-gate
880Sstevel@tonic-gate#
890Sstevel@tonic-gate#	Include common targets.
900Sstevel@tonic-gate#
910Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.targ
92*7688SAaron.Zang@Sun.COM
93*7688SAaron.Zang@Sun.COM#
94*7688SAaron.Zang@Sun.COM#	Defines for local commands
95*7688SAaron.Zang@Sun.COM#
96*7688SAaron.Zang@Sun.COMTEST		= test
97*7688SAaron.Zang@Sun.COMWLCC		= wlcc
98*7688SAaron.Zang@Sun.COMTOUCH		= touch
99*7688SAaron.Zang@Sun.COMWARLOCK		= warlock
100*7688SAaron.Zang@Sun.COM
101*7688SAaron.Zang@Sun.COM#
102*7688SAaron.Zang@Sun.COM#	warlock targets
103*7688SAaron.Zang@Sun.COM#
104*7688SAaron.Zang@Sun.COM
105*7688SAaron.Zang@Sun.COM#
106*7688SAaron.Zang@Sun.COM# vcons_conf.c is compile to genunix, add it to WARLOCK_OUT
107*7688SAaron.Zang@Sun.COM#
108*7688SAaron.Zang@Sun.COMWARLOCK_OUT	+= vcons_conf.ll
109*7688SAaron.Zang@Sun.COM
110*7688SAaron.Zang@Sun.COMwarlock:	$(WARLOCK_OUT) sdev_vtops.file  warlock_ddi.files
111*7688SAaron.Zang@Sun.COM	$(WARLOCK) -c $(WLCMD_DIR)/wc.wlcmd $(WARLOCK_OUT) \
112*7688SAaron.Zang@Sun.COM	-l ../../intel/warlock/ddi_dki_impl.ll
113*7688SAaron.Zang@Sun.COM	$(WARLOCK) -c $(WLCMD_DIR)/wc_devfs.wlcmd sdev_vtops.ll vcons_conf.ll \
114*7688SAaron.Zang@Sun.COM	-l ../../intel/warlock/ddi_dki_impl.ll
115*7688SAaron.Zang@Sun.COM	$(TOUCH) $(WARLOCK_OK)
116*7688SAaron.Zang@Sun.COM
117*7688SAaron.Zang@Sun.COM%.ll:	$(UTSBASE)/common/io/%.c
118*7688SAaron.Zang@Sun.COM	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
119*7688SAaron.Zang@Sun.COM
120*7688SAaron.Zang@Sun.COMsdev_vtops.file:
121*7688SAaron.Zang@Sun.COM	$(WLCC) $(CPPFLAGS) -DDEBUG -o sdev_vtops.ll -c \
122*7688SAaron.Zang@Sun.COM	../../common/fs/dev/sdev_vtops.c
123*7688SAaron.Zang@Sun.COM
124*7688SAaron.Zang@Sun.COMwarlock_ddi.files:
125*7688SAaron.Zang@Sun.COM	@cd ../../intel/warlock; pwd; $(MAKE) warlock
126