xref: /titanic_50/usr/src/uts/intel/usbsprl/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
14de26129Sxs156463#
24de26129Sxs156463# CDDL HEADER START
34de26129Sxs156463#
44de26129Sxs156463# The contents of this file are subject to the terms of the
5bb25c06cSjg# Common Development and Distribution License (the "License").
6bb25c06cSjg# You may not use this file except in compliance with the License.
74de26129Sxs156463#
84de26129Sxs156463# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
94de26129Sxs156463# or http://www.opensolaris.org/os/licensing.
104de26129Sxs156463# See the License for the specific language governing permissions
114de26129Sxs156463# and limitations under the License.
124de26129Sxs156463#
134de26129Sxs156463# When distributing Covered Code, include this CDDL HEADER in each
144de26129Sxs156463# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
154de26129Sxs156463# If applicable, add the following below this CDDL HEADER, with the
164de26129Sxs156463# fields enclosed by brackets "[]" replaced with your own identifying
174de26129Sxs156463# information: Portions Copyright [yyyy] [name of copyright owner]
184de26129Sxs156463#
194de26129Sxs156463# CDDL HEADER END
204de26129Sxs156463#
214de26129Sxs156463#
224de26129Sxs156463# uts/intel/usbsprl/Makefile
23489b7c4aSRaymond Chen# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
244de26129Sxs156463# Use is subject to license terms.
254de26129Sxs156463#
264de26129Sxs156463#
274ebb14b2Sfrits#	This makefile drives the production of the Prolific USB Serial
284de26129Sxs156463#	Adapter driver.
294de26129Sxs156463#
304de26129Sxs156463#	Path to the base of the uts directory tree (usually /usr/src/uts).
314de26129Sxs156463#
324de26129Sxs156463UTSBASE	= ../..
334de26129Sxs156463
344de26129Sxs156463#
354de26129Sxs156463#	Define the module and object file sets.
364de26129Sxs156463#
374de26129Sxs156463MODULE		= usbsprl
384de26129Sxs156463OBJECTS		= $(USBSPRL_OBJS:%=$(OBJS_DIR)/%)
394de26129Sxs156463LINTS		= $(USBSPRL_OBJS:%.o=$(LINTS_DIR)/%.ln)
404ebb14b2SfritsWARLOCK_OUT     = $(USBSPRL_OBJS:%.o=%.ll)
414ebb14b2SfritsWARLOCK_OK	= $(MODULE).ok
424de26129Sxs156463ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
434ebb14b2SfritsWLCMD_DIR	= $(UTSBASE)/common/io/warlock
444de26129Sxs156463
454de26129Sxs156463#
464de26129Sxs156463#	Include common rules.
474de26129Sxs156463#
484de26129Sxs156463include $(UTSBASE)/intel/Makefile.intel
494de26129Sxs156463
50*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
51*7014882cSRichard Lowe
524de26129Sxs156463LDFLAGS         += -dy -Nmisc/usba -Nmisc/usbser
534de26129Sxs156463
544de26129Sxs156463#
554de26129Sxs156463#	Define targets
564de26129Sxs156463#
574de26129Sxs156463ALL_TARGET	= $(BINARY)
584de26129Sxs156463LINT_TARGET	= $(MODULE).lint
594de26129Sxs156463INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
604de26129Sxs156463
614de26129Sxs156463.KEEP_STATE:
624de26129Sxs156463
634de26129Sxs156463all:		$(ALL_DEPS)
644de26129Sxs156463
654de26129Sxs156463def:		$(DEF_DEPS)
664de26129Sxs156463
674de26129Sxs156463clean:		$(CLEAN_DEPS)
684ebb14b2Sfrits		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
694de26129Sxs156463
704de26129Sxs156463clobber:	$(CLOBBER_DEPS)
714ebb14b2Sfrits		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
724de26129Sxs156463
734de26129Sxs156463lint:		$(LINT_DEPS)
744de26129Sxs156463
754de26129Sxs156463modlintlib:	$(MODLINTLIB_DEPS)
764de26129Sxs156463
774de26129Sxs156463clean.lint:	$(CLEAN_LINT_DEPS)
784de26129Sxs156463
794de26129Sxs156463install:	$(INSTALL_DEPS)
804de26129Sxs156463
814de26129Sxs156463#
824de26129Sxs156463#	Include common targets.
834de26129Sxs156463#
844de26129Sxs156463include $(UTSBASE)/intel/Makefile.targ
854ebb14b2Sfrits
864ebb14b2Sfrits#
874ebb14b2Sfrits#	Defines for local commands.
884ebb14b2Sfrits#
894ebb14b2SfritsWLCC		= wlcc
904ebb14b2SfritsTOUCH		= touch
914ebb14b2SfritsWARLOCK		= warlock
924ebb14b2SfritsTEST		= test
934ebb14b2Sfrits
944ebb14b2Sfrits#
954ebb14b2Sfrits#	warlock
964ebb14b2Sfrits#
97bf56214cSstevelWARLOCK_CMD	= $(WLCMD_DIR)/$(MODULE).wlcmd
984ebb14b2SfritsUSBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
99489b7c4aSRaymond ChenUSBA_FILES = $(USBA_WITHOUT_WUSB_OBJS:%.o=../usba/%.ll)
1004ebb14b2SfritsUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
1014ebb14b2SfritsOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
1024ebb14b2SfritsEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
1034ebb14b2Sfrits
1044ebb14b2Sfritswarlock: $(WARLOCK_OK)
1054ebb14b2Sfrits
1064ebb14b2Sfrits$(WARLOCK_OK): warlock_with_usba warlock_with_usbser
1074ebb14b2Sfrits	$(TOUCH) $@
1084ebb14b2Sfrits
1094ebb14b2Sfrits%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbsprl/%.c
1104ebb14b2Sfrits	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
1114ebb14b2Sfrits
112bf56214cSstevelwarlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
113bf56214cSstevel	$(WARLOCK_CMD)
114bf56214cSstevel	$(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
1154ebb14b2Sfrits		$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
1164ebb14b2Sfrits
117bf56214cSstevelwarlock_with_usba:  $(WARLOCK_OUT) usbser_files \
118bf56214cSstevel	$(WLCMD_DIR)/usbsprl_with_usba.wlcmd usba_files ohci_files uhci_files \
119bf56214cSstevel	ehci_files warlock_ddi.files
1204ebb14b2Sfrits	$(WARLOCK) -c $(WLCMD_DIR)/usbsprl_with_usba.wlcmd \
1214ebb14b2Sfrits		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
1224ebb14b2Sfrits		$(USBSER_FILES) \
1234ebb14b2Sfrits		$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
1244ebb14b2Sfrits
1254ebb14b2Sfritsusbser_files:
1264ebb14b2Sfrits	@cd ../usbser; pwd; $(MAKE) warlock
1274ebb14b2Sfrits
1284ebb14b2Sfritsusba_files:
1294ebb14b2Sfrits	@cd ../usba;pwd; $(MAKE) warlock
1304ebb14b2Sfrits
1314ebb14b2Sfritsuhci_files:
1324ebb14b2Sfrits	@cd ../uhci;pwd; $(MAKE) warlock
1334ebb14b2Sfrits
1344ebb14b2Sfritsohci_files:
1354ebb14b2Sfrits	@cd ../ohci;pwd; $(MAKE) warlock
1364ebb14b2Sfrits
1374ebb14b2Sfritsehci_files:
1384ebb14b2Sfrits	@cd ../ehci;pwd; $(MAKE) warlock
1394ebb14b2Sfrits
1404ebb14b2Sfritswarlock_ddi.files:
1414ebb14b2Sfrits	cd ../warlock; pwd; $(MAKE) warlock
142