xref: /illumos-gate/usr/src/uts/intel/hubd/Makefile (revision dd72704bd9e794056c558153663c739e2012d721)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27#
28#	This makefile drives the production of the hubd driver kernel module.
29#
30
31#
32#	Path to the base of the uts directory tree (usually /usr/src/uts).
33#
34UTSBASE	= ../..
35
36
37#
38#	Define the module and object file sets.
39#
40SRCDIR		= $(UTSBASE)/common/io/usb/hubd
41CONFIGFILES	= config_map.conf
42ROOTETCUSB	= $(ROOT)/etc/usb
43
44SRCFILES	= $(CONFIGFILES:%=$(SRCDIR)/%)
45ROOTCONFIGFILES	= $(CONFIGFILES:%=$(ROOTETCUSB)/%)
46
47$(ROOTCONFIGFILES):=	FILEMODE = $(CFILEMODE)
48
49#
50#	Define the module and object file sets.
51#
52MODULE		= hubd
53OBJECTS		= $(HUBD_OBJS:%=$(OBJS_DIR)/%)
54ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
55
56#
57#	Include common rules.
58#
59include $(UTSBASE)/intel/Makefile.intel
60
61#
62#	Define targets
63#
64ALL_TARGET	= $(BINARY)
65INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
66
67#
68#	Override defaults to build a unique, local modstubs.o.
69#
70MODSTUBS_DIR	 = $(OBJS_DIR)
71CLEANFILES	+= $(MODSTUBS_O)
72
73#
74# depends on misc/usba
75#
76LDFLAGS         += -Nmisc/usba
77
78#
79#	Default build targets.
80#
81.KEEP_STATE:
82
83def:		$(DEF_DEPS)
84
85all:		$(ALL_DEPS)
86
87clean:		$(CLEAN_DEPS)
88
89clobber:	$(CLOBBER_DEPS)
90
91install:	$(INSTALL_DEPS) $(ROOTCONFIGFILES)
92
93$(ROOTETCUSB)/%: $(ROOTETCUSB) $(SRCDIR)/%
94	$(INS.file)
95
96#
97#	Include common targets.
98#
99include $(UTSBASE)/intel/Makefile.targ
100
101