xref: /illumos-gate/usr/src/uts/intel/usbsprl/Makefile (revision 4ebb14b236958cfe1ef4ff3b7a50216d9e51f997)
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
23bb25c06cSjg# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
244de26129Sxs156463# Use is subject to license terms.
254de26129Sxs156463#
26bb25c06cSjg#ident	"%Z%%M%	%I%	%E% SMI"
274de26129Sxs156463#
28*4ebb14b2Sfrits#	This makefile drives the production of the Prolific USB Serial
294de26129Sxs156463#	Adapter driver.
304de26129Sxs156463#
314de26129Sxs156463#	Path to the base of the uts directory tree (usually /usr/src/uts).
324de26129Sxs156463#
334de26129Sxs156463UTSBASE	= ../..
344de26129Sxs156463
354de26129Sxs156463#
364de26129Sxs156463#	Define the module and object file sets.
374de26129Sxs156463#
384de26129Sxs156463MODULE		= usbsprl
394de26129Sxs156463OBJECTS		= $(USBSPRL_OBJS:%=$(OBJS_DIR)/%)
404de26129Sxs156463LINTS		= $(USBSPRL_OBJS:%.o=$(LINTS_DIR)/%.ln)
41*4ebb14b2SfritsWARLOCK_OUT     = $(USBSPRL_OBJS:%.o=%.ll)
42*4ebb14b2SfritsWARLOCK_OK	= $(MODULE).ok
434de26129Sxs156463ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
44*4ebb14b2SfritsWLCMD_DIR	= $(UTSBASE)/common/io/warlock
454de26129Sxs156463
464de26129Sxs156463#
474de26129Sxs156463#	Include common rules.
484de26129Sxs156463#
494de26129Sxs156463include $(UTSBASE)/intel/Makefile.intel
504de26129Sxs156463
514de26129Sxs156463LDFLAGS         += -dy -Nmisc/usba -Nmisc/usbser
524de26129Sxs156463
534de26129Sxs156463#
544de26129Sxs156463#	Define targets
554de26129Sxs156463#
564de26129Sxs156463ALL_TARGET	= $(BINARY)
574de26129Sxs156463LINT_TARGET	= $(MODULE).lint
584de26129Sxs156463INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
594de26129Sxs156463
60bb25c06cSjg#
61bb25c06cSjg# For now, disable these lint checks; maintainers should endeavor
62bb25c06cSjg# to investigate and remove these for maximum lint coverage.
63bb25c06cSjg# Please do not carry these forward to new Makefiles.
64bb25c06cSjg#
65bb25c06cSjgLINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
66bb25c06cSjg
674de26129Sxs156463.KEEP_STATE:
684de26129Sxs156463
694de26129Sxs156463all:		$(ALL_DEPS)
704de26129Sxs156463
714de26129Sxs156463def:		$(DEF_DEPS)
724de26129Sxs156463
734de26129Sxs156463clean:		$(CLEAN_DEPS)
74*4ebb14b2Sfrits		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
754de26129Sxs156463
764de26129Sxs156463clobber:	$(CLOBBER_DEPS)
77*4ebb14b2Sfrits		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
784de26129Sxs156463
794de26129Sxs156463lint:		$(LINT_DEPS)
804de26129Sxs156463
814de26129Sxs156463modlintlib:	$(MODLINTLIB_DEPS)
824de26129Sxs156463
834de26129Sxs156463clean.lint:	$(CLEAN_LINT_DEPS)
844de26129Sxs156463
854de26129Sxs156463install:	$(INSTALL_DEPS)
864de26129Sxs156463
874de26129Sxs156463#
884de26129Sxs156463#	Include common targets.
894de26129Sxs156463#
904de26129Sxs156463include $(UTSBASE)/intel/Makefile.targ
91*4ebb14b2Sfrits
92*4ebb14b2Sfrits#
93*4ebb14b2Sfrits#	Defines for local commands.
94*4ebb14b2Sfrits#
95*4ebb14b2SfritsWLCC		= wlcc
96*4ebb14b2SfritsTOUCH		= touch
97*4ebb14b2SfritsWARLOCK		= warlock
98*4ebb14b2SfritsSCCS		= sccs
99*4ebb14b2SfritsTEST		= test
100*4ebb14b2Sfrits
101*4ebb14b2Sfrits#
102*4ebb14b2Sfrits#	warlock
103*4ebb14b2Sfrits#
104*4ebb14b2SfritsWARLOCK_CMD	= $(MODULE).wlcmd
105*4ebb14b2SfritsUSBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
106*4ebb14b2SfritsUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
107*4ebb14b2SfritsUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
108*4ebb14b2SfritsOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
109*4ebb14b2SfritsEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
110*4ebb14b2Sfrits
111*4ebb14b2Sfritswarlock: $(WARLOCK_OK)
112*4ebb14b2Sfrits
113*4ebb14b2Sfrits%.wlcmd:
114*4ebb14b2Sfrits	cd $(WLCMD_DIR); $(TEST) -f $@  || $(SCCS) get $@
115*4ebb14b2Sfrits
116*4ebb14b2Sfrits$(WARLOCK_OK): warlock_with_usba warlock_with_usbser
117*4ebb14b2Sfrits	$(TOUCH) $@
118*4ebb14b2Sfrits
119*4ebb14b2Sfrits%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbsprl/%.c
120*4ebb14b2Sfrits	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
121*4ebb14b2Sfrits
122*4ebb14b2Sfritswarlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files $(WARLOCK_CMD)
123*4ebb14b2Sfrits	$(WARLOCK) -c $(WLCMD_DIR)/$(WARLOCK_CMD) $(WARLOCK_OUT) \
124*4ebb14b2Sfrits		$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
125*4ebb14b2Sfrits
126*4ebb14b2Sfritswarlock_with_usba:  $(WARLOCK_OUT) usbser_files  usbsprl_with_usba.wlcmd \
127*4ebb14b2Sfrits	usba_files ohci_files uhci_files ehci_files warlock_ddi.files
128*4ebb14b2Sfrits	$(WARLOCK) -c $(WLCMD_DIR)/usbsprl_with_usba.wlcmd \
129*4ebb14b2Sfrits		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
130*4ebb14b2Sfrits		$(USBSER_FILES) \
131*4ebb14b2Sfrits		$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
132*4ebb14b2Sfrits
133*4ebb14b2Sfritsusbser_files:
134*4ebb14b2Sfrits	@cd ../usbser; pwd; $(MAKE) warlock
135*4ebb14b2Sfrits
136*4ebb14b2Sfritsusba_files:
137*4ebb14b2Sfrits	@cd ../usba;pwd; $(MAKE) warlock
138*4ebb14b2Sfrits
139*4ebb14b2Sfritsuhci_files:
140*4ebb14b2Sfrits	@cd ../uhci;pwd; $(MAKE) warlock
141*4ebb14b2Sfrits
142*4ebb14b2Sfritsohci_files:
143*4ebb14b2Sfrits	@cd ../ohci;pwd; $(MAKE) warlock
144*4ebb14b2Sfrits
145*4ebb14b2Sfritsehci_files:
146*4ebb14b2Sfrits	@cd ../ehci;pwd; $(MAKE) warlock
147*4ebb14b2Sfrits
148*4ebb14b2Sfritswarlock_ddi.files:
149*4ebb14b2Sfrits	cd ../warlock; pwd; $(MAKE) warlock
150