xref: /titanic_44/usr/src/uts/sparc/usbsacm/Makefile (revision bf56214c0556fa6864189c826d39dbe156bb22a0)
190f05028Syq193411#
290f05028Syq193411# CDDL HEADER START
390f05028Syq193411#
490f05028Syq193411# The contents of this file are subject to the terms of the
590f05028Syq193411# Common Development and Distribution License (the "License").
690f05028Syq193411# You may not use this file except in compliance with the License.
790f05028Syq193411#
890f05028Syq193411# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
990f05028Syq193411# or http://www.opensolaris.org/os/licensing.
1090f05028Syq193411# See the License for the specific language governing permissions
1190f05028Syq193411# and limitations under the License.
1290f05028Syq193411#
1390f05028Syq193411# When distributing Covered Code, include this CDDL HEADER in each
1490f05028Syq193411# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1590f05028Syq193411# If applicable, add the following below this CDDL HEADER, with the
1690f05028Syq193411# fields enclosed by brackets "[]" replaced with your own identifying
1790f05028Syq193411# information: Portions Copyright [yyyy] [name of copyright owner]
1890f05028Syq193411#
1990f05028Syq193411# CDDL HEADER END
2090f05028Syq193411#
2190f05028Syq193411#
2290f05028Syq193411# uts/sparc/usbsacm/Makefile
2390f05028Syq193411#
24*bf56214cSstevel# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
2590f05028Syq193411# Use is subject to license terms.
2690f05028Syq193411#
2790f05028Syq193411#ident	"%Z%%M%	%I%	%E% SMI"
2890f05028Syq193411#
2990f05028Syq193411#	This makefile drives the production of Abstract Control Model of
3090f05028Syq193411#	USB Communication Devices Class dirver.
3190f05028Syq193411#
3290f05028Syq193411#	Path to the base of the uts directory tree (usually /usr/src/uts).
3390f05028Syq193411#
3490f05028Syq193411UTSBASE	= ../..
3590f05028Syq193411
3690f05028Syq193411#
3790f05028Syq193411#	Define the module and object file sets.
3890f05028Syq193411#
3990f05028Syq193411MODULE		= usbsacm
4090f05028Syq193411OBJECTS		= $(USBSACM_OBJS:%=$(OBJS_DIR)/%)
4190f05028Syq193411LINTS		= $(USBSACM_OBJS:%.o=$(LINTS_DIR)/%.ln)
4290f05028Syq193411ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
4390f05028Syq193411WARLOCK_OUT	= $(USBSACM_OBJS:%.o=%.ll)
4490f05028Syq193411WARLOCK_OK	= $(MODULE).ok
4590f05028Syq193411WLCMD_DIR	= $(UTSBASE)/common/io/warlock
4690f05028Syq193411
4790f05028Syq193411#
4890f05028Syq193411#	Include common rules.
4990f05028Syq193411#
5090f05028Syq193411include $(UTSBASE)/sparc/Makefile.sparc
5190f05028Syq193411
5290f05028Syq193411#
5390f05028Syq193411# lint pass one enforcement
5490f05028Syq193411#
5590f05028Syq193411CFLAGS += $(CCVERBOSE)
5690f05028Syq193411
5790f05028Syq193411LDFLAGS         += -dy -Nmisc/usba -Nmisc/usbser
5890f05028Syq193411
5990f05028Syq193411#
6090f05028Syq193411#	Define targets
6190f05028Syq193411#
6290f05028Syq193411ALL_TARGET	= $(BINARY)
6390f05028Syq193411LINT_TARGET	= $(MODULE).lint
6490f05028Syq193411INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
6590f05028Syq193411
6690f05028Syq193411#
6790f05028Syq193411# For now, disable these lint checks; maintainers should endeavor
6890f05028Syq193411# to investigate and remove these for maximum lint coverage.
6990f05028Syq193411# Please do not carry these forward to new Makefiles.
7090f05028Syq193411#
7190f05028Syq193411LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
7290f05028Syq193411LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
7390f05028Syq193411
7490f05028Syq193411.KEEP_STATE:
7590f05028Syq193411
7690f05028Syq193411all:		$(ALL_DEPS)
7790f05028Syq193411
7890f05028Syq193411def:		$(DEF_DEPS)
7990f05028Syq193411
8090f05028Syq193411clean:		$(CLEAN_DEPS)
8190f05028Syq193411		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
8290f05028Syq193411
8390f05028Syq193411clobber:	$(CLOBBER_DEPS)
8490f05028Syq193411		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
8590f05028Syq193411
8690f05028Syq193411lint:		$(LINT_DEPS)
8790f05028Syq193411
8890f05028Syq193411modlintlib:	$(MODLINTLIB_DEPS)
8990f05028Syq193411
9090f05028Syq193411clean.lint:	$(CLEAN_LINT_DEPS)
9190f05028Syq193411
9290f05028Syq193411install:	$(INSTALL_DEPS)
9390f05028Syq193411
9490f05028Syq193411#
9590f05028Syq193411#	Include common targets.
9690f05028Syq193411#
9790f05028Syq193411include $(UTSBASE)/sparc/Makefile.targ
9890f05028Syq193411
9990f05028Syq193411#
10090f05028Syq193411#	Defines for local commands.
10190f05028Syq193411#
10290f05028Syq193411WLCC		= wlcc
10390f05028Syq193411TOUCH		= touch
10490f05028Syq193411WARLOCK		= warlock
10590f05028Syq193411TEST		= test
10690f05028Syq193411
10790f05028Syq193411#
10890f05028Syq193411#	warlock
10990f05028Syq193411#
110*bf56214cSstevelWARLOCK_CMD	= $(WLCMD_DIR)/$(MODULE).wlcmd
11190f05028Syq193411
11290f05028Syq193411USBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
11390f05028Syq193411USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
11490f05028Syq193411UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
11590f05028Syq193411OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
11690f05028Syq193411EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
11790f05028Syq193411
11890f05028Syq193411warlock: $(WARLOCK_OK)
11990f05028Syq193411
12090f05028Syq193411$(WARLOCK_OK): warlock_with_usbser warlock_with_usba
12190f05028Syq193411	$(TOUCH) $@
12290f05028Syq193411
12390f05028Syq193411%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbsacm/%.c
12490f05028Syq193411	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
12590f05028Syq193411
12690f05028Syq193411warlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
12790f05028Syq193411	$(WARLOCK_CMD)
128*bf56214cSstevel	$(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
12990f05028Syq193411		$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
13090f05028Syq193411
131*bf56214cSstevelwarlock_with_usba: $(WLCMD_DIR)/usbsacm_with_usba.wlcmd $(WARLOCK_OUT) \
132*bf56214cSstevel	usbser_files usba_files ohci_files uhci_files ehci_files \
133*bf56214cSstevel	warlock_ddi.files
13490f05028Syq193411	$(WARLOCK) -c $(WLCMD_DIR)/usbsacm_with_usba.wlcmd \
13590f05028Syq193411		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
13690f05028Syq193411		$(USBSER_FILES) \
13790f05028Syq193411		$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
13890f05028Syq193411
13990f05028Syq193411usbser_files:
14090f05028Syq193411	@cd ../usbser; pwd; $(MAKE) warlock
14190f05028Syq193411
14290f05028Syq193411usba_files:
14390f05028Syq193411	@cd ../usba;pwd; $(MAKE) warlock
14490f05028Syq193411
14590f05028Syq193411uhci_files:
14690f05028Syq193411	@cd ../uhci;pwd; $(MAKE) warlock
14790f05028Syq193411
14890f05028Syq193411ohci_files:
14990f05028Syq193411	@cd ../ohci;pwd; $(MAKE) warlock
15090f05028Syq193411
15190f05028Syq193411ehci_files:
15290f05028Syq193411	@cd ../ehci;pwd; $(MAKE) warlock
15390f05028Syq193411
15490f05028Syq193411warlock_ddi.files:
15590f05028Syq193411	cd ../warlock; pwd; $(MAKE) warlock
156