xref: /titanic_52/usr/src/uts/sparc/hid/Makefile (revision fa9e4066f08beec538e775443c5be79dd423fcab)
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# uts/sparc/hid/Makefile
24
25# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
26# Use is subject to license terms.
27#
28#ident	"%Z%%M%	%I%	%E% SMI"
29#
30#	This makefile drives the production of the hid kernel driver.
31#
32#	sparc architecture dependent
33#
34
35#
36#	Path to the base of the uts directory tree (usually /usr/src/uts).
37#
38UTSBASE	= ../..
39
40#
41#	Define the module and object file sets.
42#
43MODULE		= hid
44OBJECTS		= $(HID_OBJS:%=$(OBJS_DIR)/%)
45LINTS		= $(HID_OBJS:%.o=$(LINTS_DIR)/%.ln)
46WARLOCK_OUT	= $(HID_OBJS:%.o=%.ll)
47WARLOCK_OK	= $(MODULE).ok
48ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
49
50#
51#	Include common rules.
52#
53include $(UTSBASE)/sparc/Makefile.sparc
54
55#
56# lint pass one enforcement
57#
58CFLAGS += $(CCVERBOSE)
59
60#
61# depends on misc/usba
62#
63LDFLAGS         += -dy -Nmisc/usba -Nmisc/hidparser -Ndacf/consconfig_dacf
64
65#
66#	Define targets
67#
68ALL_TARGET	= $(BINARY)
69LINT_TARGET	= $(MODULE).lint
70INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
71
72.KEEP_STATE:
73
74all:		$(ALL_DEPS)
75
76def:		$(DEF_DEPS)
77
78clean:		$(CLEAN_DEPS); \
79                $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
80
81clobber:	$(CLOBBER_DEPS); \
82		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
83
84lint:		$(LINT_DEPS)
85
86modlintlib:	$(MODLINTLIB_DEPS)
87
88clean.lint:	$(CLEAN_LINT_DEPS)
89
90install:	$(INSTALL_DEPS)
91
92#
93#	Include common targets.
94#
95include $(UTSBASE)/sparc/Makefile.targ
96
97#
98#	Defines for local commands.
99#
100WARLOCK		= warlock
101WLCC		= wlcc
102TOUCH		= touch
103SCCS		= sccs
104TEST		= test
105
106#
107#	lock_lint rules
108#
109HID_FILES	= $(MODULE).ll
110USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
111OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
112UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
113EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
114
115warlock: $(MODULE).ok warlock_with_usba
116
117%.wlcmd:
118	$(TEST) -f $@ || $(SCCS) get $@
119
120hid.ok: hid.ll hid.wlcmd warlock_ddi.files
121	$(WARLOCK) -c hid.wlcmd $(HID_FILES)  \
122		-l ../warlock/ddi_dki_impl.ll
123	$(TOUCH) $@
124
125%.ll: $(UTSBASE)/common/io/usb/clients/hid/%.c \
126		$(UTSBASE)/common/sys/usb/clients/hid/hidvar.h
127	$(WLCC)  $(CPPFLAGS) -DDEBUG -o $@ $<
128
129warlock_with_usba: hid.wlcmd  $(HID_FILES) usba_files \
130	ohci_files ehci_files uhci_files warlock_ddi.files
131	$(WARLOCK) -c ./hid_with_usba.wlcmd \
132		$(USBA_FILES) \
133		$(UHCI_FILES) $(OHCI_FILES) $(EHCI_FILES) \
134		$(HID_FILES) \
135	-l ../warlock/ddi_dki_impl.ll
136
137usba_files:
138	@cd ../usba;pwd; $(MAKE) warlock
139
140ohci_files:
141	@cd ../ohci;pwd; $(MAKE) warlock
142
143uhci_files:
144	@cd ../uhci;pwd; $(MAKE) warlock
145
146ehci_files:
147	@cd ../ehci;pwd; $(MAKE) warlock
148
149warlock_ddi.files:
150	cd ../warlock; pwd; $(MAKE) warlock
151
152