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