xref: /illumos-gate/usr/src/uts/intel/usbsacm/Makefile (revision 90f050286227cf4c4f8aa425555d04723d331d48)
1*90f05028Syq193411#
2*90f05028Syq193411# CDDL HEADER START
3*90f05028Syq193411#
4*90f05028Syq193411# The contents of this file are subject to the terms of the
5*90f05028Syq193411# Common Development and Distribution License (the "License").
6*90f05028Syq193411# You may not use this file except in compliance with the License.
7*90f05028Syq193411#
8*90f05028Syq193411# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*90f05028Syq193411# or http://www.opensolaris.org/os/licensing.
10*90f05028Syq193411# See the License for the specific language governing permissions
11*90f05028Syq193411# and limitations under the License.
12*90f05028Syq193411#
13*90f05028Syq193411# When distributing Covered Code, include this CDDL HEADER in each
14*90f05028Syq193411# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*90f05028Syq193411# If applicable, add the following below this CDDL HEADER, with the
16*90f05028Syq193411# fields enclosed by brackets "[]" replaced with your own identifying
17*90f05028Syq193411# information: Portions Copyright [yyyy] [name of copyright owner]
18*90f05028Syq193411#
19*90f05028Syq193411# CDDL HEADER END
20*90f05028Syq193411#
21*90f05028Syq193411#
22*90f05028Syq193411# uts/intel/usbsacm/Makefile
23*90f05028Syq193411# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24*90f05028Syq193411# Use is subject to license terms.
25*90f05028Syq193411#
26*90f05028Syq193411#ident	"%Z%%M%	%I%	%E% SMI"
27*90f05028Syq193411#
28*90f05028Syq193411#	This makefile drives the production of Abstract Control Model of
29*90f05028Syq193411#	USB Communication Devices Class dirver.
30*90f05028Syq193411#
31*90f05028Syq193411#	Path to the base of the uts directory tree (usually /usr/src/uts).
32*90f05028Syq193411#
33*90f05028Syq193411UTSBASE	= ../..
34*90f05028Syq193411
35*90f05028Syq193411#
36*90f05028Syq193411#	Define the module and object file sets.
37*90f05028Syq193411#
38*90f05028Syq193411MODULE		= usbsacm
39*90f05028Syq193411OBJECTS		= $(USBSACM_OBJS:%=$(OBJS_DIR)/%)
40*90f05028Syq193411LINTS		= $(USBSACM_OBJS:%.o=$(LINTS_DIR)/%.ln)
41*90f05028Syq193411ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
42*90f05028Syq193411WARLOCK_OUT	= $(USBSACM_OBJS:%.o=%.ll)
43*90f05028Syq193411WARLOCK_OK	= $(MODULE).ok
44*90f05028Syq193411WLCMD_DIR	= $(UTSBASE)/common/io/warlock
45*90f05028Syq193411
46*90f05028Syq193411#
47*90f05028Syq193411#	Include common rules.
48*90f05028Syq193411#
49*90f05028Syq193411include $(UTSBASE)/intel/Makefile.intel
50*90f05028Syq193411
51*90f05028Syq193411LDFLAGS         += -dy -Nmisc/usba -Nmisc/usbser
52*90f05028Syq193411
53*90f05028Syq193411#
54*90f05028Syq193411#	Define targets
55*90f05028Syq193411#
56*90f05028Syq193411ALL_TARGET	= $(BINARY)
57*90f05028Syq193411LINT_TARGET	= $(MODULE).lint
58*90f05028Syq193411INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
59*90f05028Syq193411
60*90f05028Syq193411#
61*90f05028Syq193411# For now, disable these lint checks; maintainers should endeavor
62*90f05028Syq193411# to investigate and remove these for maximum lint coverage.
63*90f05028Syq193411# Please do not carry these forward to new Makefiles.
64*90f05028Syq193411#
65*90f05028Syq193411LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
66*90f05028Syq193411LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
67*90f05028Syq193411
68*90f05028Syq193411.KEEP_STATE:
69*90f05028Syq193411
70*90f05028Syq193411all:		$(ALL_DEPS)
71*90f05028Syq193411
72*90f05028Syq193411def:		$(DEF_DEPS)
73*90f05028Syq193411
74*90f05028Syq193411clean:		$(CLEAN_DEPS)
75*90f05028Syq193411		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
76*90f05028Syq193411
77*90f05028Syq193411clobber:	$(CLOBBER_DEPS)
78*90f05028Syq193411		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
79*90f05028Syq193411
80*90f05028Syq193411lint:		$(LINT_DEPS)
81*90f05028Syq193411
82*90f05028Syq193411modlintlib:	$(MODLINTLIB_DEPS)
83*90f05028Syq193411
84*90f05028Syq193411clean.lint:	$(CLEAN_LINT_DEPS)
85*90f05028Syq193411
86*90f05028Syq193411install:	$(INSTALL_DEPS)
87*90f05028Syq193411
88*90f05028Syq193411#
89*90f05028Syq193411#	Include common targets.
90*90f05028Syq193411#
91*90f05028Syq193411include $(UTSBASE)/intel/Makefile.targ
92*90f05028Syq193411
93*90f05028Syq193411#
94*90f05028Syq193411#	Defines for local commands.
95*90f05028Syq193411#
96*90f05028Syq193411WLCC		= wlcc
97*90f05028Syq193411TOUCH		= touch
98*90f05028Syq193411WARLOCK		= warlock
99*90f05028Syq193411SCCS		= sccs
100*90f05028Syq193411TEST		= test
101*90f05028Syq193411
102*90f05028Syq193411#
103*90f05028Syq193411#	warlock
104*90f05028Syq193411#
105*90f05028Syq193411WARLOCK_CMD	= $(MODULE).wlcmd
106*90f05028Syq193411
107*90f05028Syq193411USBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
108*90f05028Syq193411USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
109*90f05028Syq193411UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
110*90f05028Syq193411OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
111*90f05028Syq193411EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
112*90f05028Syq193411
113*90f05028Syq193411warlock: $(WARLOCK_OK)
114*90f05028Syq193411
115*90f05028Syq193411%.wlcmd:
116*90f05028Syq193411	cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@
117*90f05028Syq193411
118*90f05028Syq193411$(WARLOCK_OK): warlock_with_usbser warlock_with_usba
119*90f05028Syq193411	$(TOUCH) $@
120*90f05028Syq193411
121*90f05028Syq193411%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbsacm/%.c
122*90f05028Syq193411	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
123*90f05028Syq193411
124*90f05028Syq193411warlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
125*90f05028Syq193411	$(WARLOCK_CMD)
126*90f05028Syq193411	$(WARLOCK) -c $(WLCMD_DIR)/$(WARLOCK_CMD) $(WARLOCK_OUT) \
127*90f05028Syq193411		$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
128*90f05028Syq193411
129*90f05028Syq193411warlock_with_usba: usbsacm_with_usba.wlcmd $(WARLOCK_OUT) usbser_files \
130*90f05028Syq193411	usba_files ohci_files uhci_files ehci_files warlock_ddi.files
131*90f05028Syq193411	$(WARLOCK) -c $(WLCMD_DIR)/usbsacm_with_usba.wlcmd \
132*90f05028Syq193411		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
133*90f05028Syq193411		$(USBSER_FILES) \
134*90f05028Syq193411		$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
135*90f05028Syq193411
136*90f05028Syq193411usbser_files:
137*90f05028Syq193411	@cd ../usbser; pwd; $(MAKE) warlock
138*90f05028Syq193411
139*90f05028Syq193411usba_files:
140*90f05028Syq193411	@cd ../usba;pwd; $(MAKE) warlock
141*90f05028Syq193411
142*90f05028Syq193411uhci_files:
143*90f05028Syq193411	@cd ../uhci;pwd; $(MAKE) warlock
144*90f05028Syq193411
145*90f05028Syq193411ohci_files:
146*90f05028Syq193411	@cd ../ohci;pwd; $(MAKE) warlock
147*90f05028Syq193411
148*90f05028Syq193411ehci_files:
149*90f05028Syq193411	@cd ../ehci;pwd; $(MAKE) warlock
150*90f05028Syq193411
151*90f05028Syq193411warlock_ddi.files:
152*90f05028Syq193411	cd ../warlock; pwd; $(MAKE) warlock
153