xref: /titanic_44/usr/src/uts/sparc/usbsacm/Makefile (revision d29f5a711240f866521445b1656d114da090335e)
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*d29f5a71Szhigang lu - Sun Microsystems - Beijing China# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
2590f05028Syq193411# Use is subject to license terms.
2690f05028Syq193411#
2790f05028Syq193411#
2890f05028Syq193411#	This makefile drives the production of Abstract Control Model of
2990f05028Syq193411#	USB Communication Devices Class dirver.
3090f05028Syq193411#
3190f05028Syq193411#	Path to the base of the uts directory tree (usually /usr/src/uts).
3290f05028Syq193411#
3390f05028Syq193411UTSBASE	= ../..
3490f05028Syq193411
3590f05028Syq193411#
3690f05028Syq193411#	Define the module and object file sets.
3790f05028Syq193411#
3890f05028Syq193411MODULE		= usbsacm
3990f05028Syq193411OBJECTS		= $(USBSACM_OBJS:%=$(OBJS_DIR)/%)
4090f05028Syq193411LINTS		= $(USBSACM_OBJS:%.o=$(LINTS_DIR)/%.ln)
4190f05028Syq193411ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
4290f05028Syq193411WARLOCK_OUT	= $(USBSACM_OBJS:%.o=%.ll)
4390f05028Syq193411WARLOCK_OK	= $(MODULE).ok
4490f05028Syq193411WLCMD_DIR	= $(UTSBASE)/common/io/warlock
4590f05028Syq193411
4690f05028Syq193411#
4790f05028Syq193411#	Include common rules.
4890f05028Syq193411#
4990f05028Syq193411include $(UTSBASE)/sparc/Makefile.sparc
5090f05028Syq193411
5190f05028Syq193411#
5290f05028Syq193411# lint pass one enforcement
5390f05028Syq193411#
5490f05028Syq193411CFLAGS += $(CCVERBOSE)
5590f05028Syq193411
5690f05028Syq193411LDFLAGS         += -dy -Nmisc/usba -Nmisc/usbser
5790f05028Syq193411
5890f05028Syq193411#
5990f05028Syq193411#	Define targets
6090f05028Syq193411#
6190f05028Syq193411ALL_TARGET	= $(BINARY)
6290f05028Syq193411LINT_TARGET	= $(MODULE).lint
6390f05028Syq193411INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
6490f05028Syq193411
6590f05028Syq193411.KEEP_STATE:
6690f05028Syq193411
6790f05028Syq193411all:		$(ALL_DEPS)
6890f05028Syq193411
6990f05028Syq193411def:		$(DEF_DEPS)
7090f05028Syq193411
7190f05028Syq193411clean:		$(CLEAN_DEPS)
7290f05028Syq193411		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
7390f05028Syq193411
7490f05028Syq193411clobber:	$(CLOBBER_DEPS)
7590f05028Syq193411		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
7690f05028Syq193411
7790f05028Syq193411lint:		$(LINT_DEPS)
7890f05028Syq193411
7990f05028Syq193411modlintlib:	$(MODLINTLIB_DEPS)
8090f05028Syq193411
8190f05028Syq193411clean.lint:	$(CLEAN_LINT_DEPS)
8290f05028Syq193411
8390f05028Syq193411install:	$(INSTALL_DEPS)
8490f05028Syq193411
8590f05028Syq193411#
8690f05028Syq193411#	Include common targets.
8790f05028Syq193411#
8890f05028Syq193411include $(UTSBASE)/sparc/Makefile.targ
8990f05028Syq193411
9090f05028Syq193411#
9190f05028Syq193411#	Defines for local commands.
9290f05028Syq193411#
9390f05028Syq193411WLCC		= wlcc
9490f05028Syq193411TOUCH		= touch
9590f05028Syq193411WARLOCK		= warlock
9690f05028Syq193411TEST		= test
9790f05028Syq193411
9890f05028Syq193411#
9990f05028Syq193411#	warlock
10090f05028Syq193411#
101bf56214cSstevelWARLOCK_CMD	= $(WLCMD_DIR)/$(MODULE).wlcmd
10290f05028Syq193411
10390f05028Syq193411USBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
10490f05028Syq193411USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
10590f05028Syq193411UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
10690f05028Syq193411OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
10790f05028Syq193411EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
10890f05028Syq193411
10990f05028Syq193411warlock: $(WARLOCK_OK)
11090f05028Syq193411
11190f05028Syq193411$(WARLOCK_OK): warlock_with_usbser warlock_with_usba
11290f05028Syq193411	$(TOUCH) $@
11390f05028Syq193411
11490f05028Syq193411%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbsacm/%.c
11590f05028Syq193411	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
11690f05028Syq193411
11790f05028Syq193411warlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
11890f05028Syq193411	$(WARLOCK_CMD)
119bf56214cSstevel	$(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
12090f05028Syq193411		$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
12190f05028Syq193411
122bf56214cSstevelwarlock_with_usba: $(WLCMD_DIR)/usbsacm_with_usba.wlcmd $(WARLOCK_OUT) \
123bf56214cSstevel	usbser_files usba_files ohci_files uhci_files ehci_files \
124bf56214cSstevel	warlock_ddi.files
12590f05028Syq193411	$(WARLOCK) -c $(WLCMD_DIR)/usbsacm_with_usba.wlcmd \
12690f05028Syq193411		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
12790f05028Syq193411		$(USBSER_FILES) \
12890f05028Syq193411		$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
12990f05028Syq193411
13090f05028Syq193411usbser_files:
13190f05028Syq193411	@cd ../usbser; pwd; $(MAKE) warlock
13290f05028Syq193411
13390f05028Syq193411usba_files:
13490f05028Syq193411	@cd ../usba;pwd; $(MAKE) warlock
13590f05028Syq193411
13690f05028Syq193411uhci_files:
13790f05028Syq193411	@cd ../uhci;pwd; $(MAKE) warlock
13890f05028Syq193411
13990f05028Syq193411ohci_files:
14090f05028Syq193411	@cd ../ohci;pwd; $(MAKE) warlock
14190f05028Syq193411
14290f05028Syq193411ehci_files:
14390f05028Syq193411	@cd ../ehci;pwd; $(MAKE) warlock
14490f05028Syq193411
14590f05028Syq193411warlock_ddi.files:
14690f05028Syq193411	cd ../warlock; pwd; $(MAKE) warlock
147