xref: /illumos-gate/usr/src/uts/intel/usbsksp/Makefile (revision 4ebb14b236958cfe1ef4ff3b7a50216d9e51f997)
160b08185Syz147069#
260b08185Syz147069# CDDL HEADER START
360b08185Syz147069#
460b08185Syz147069# 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.
760b08185Syz147069#
860b08185Syz147069# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
960b08185Syz147069# or http://www.opensolaris.org/os/licensing.
1060b08185Syz147069# See the License for the specific language governing permissions
1160b08185Syz147069# and limitations under the License.
1260b08185Syz147069#
1360b08185Syz147069# When distributing Covered Code, include this CDDL HEADER in each
1460b08185Syz147069# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1560b08185Syz147069# If applicable, add the following below this CDDL HEADER, with the
1660b08185Syz147069# fields enclosed by brackets "[]" replaced with your own identifying
1760b08185Syz147069# information: Portions Copyright [yyyy] [name of copyright owner]
1860b08185Syz147069#
1960b08185Syz147069# CDDL HEADER END
2060b08185Syz147069#
2160b08185Syz147069#
2260b08185Syz147069#
23bb25c06cSjg# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2460b08185Syz147069# Use is subject to license terms.
2560b08185Syz147069#
2660b08185Syz147069# uts/intel/usbsksp/Makefile
2760b08185Syz147069
28bb25c06cSjg#ident	"%Z%%M%	%I%	%E% SMI"
2960b08185Syz147069#
3060b08185Syz147069#	This makefile drives the production of the Keyspan USB Serial
3160b08185Syz147069#	Adapter driver.
3260b08185Syz147069#
3360b08185Syz147069#	Path to the base of the uts directory tree (usually /usr/src/uts).
3460b08185Syz147069#
3560b08185Syz147069UTSBASE	= ../..
3660b08185Syz147069
3760b08185Syz147069#
3860b08185Syz147069#	Define the module and object file sets.
3960b08185Syz147069#
4060b08185Syz147069MODULE		= usbsksp
4160b08185Syz147069OBJECTS		= $(USBSER_KEYSPAN_OBJS:%=$(OBJS_DIR)/%)
4260b08185Syz147069LINTS		= $(USBSER_KEYSPAN_OBJS:%.o=$(LINTS_DIR)/%.ln)
4360b08185Syz147069ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
44*4ebb14b2SfritsWARLOCK_OUT	= $(USBSER_KEYSPAN_OBJS:%.o=%.ll)
45*4ebb14b2SfritsWARLOCK_OK	= $(MODULE).ok
46*4ebb14b2SfritsWLCMD_DIR	= $(UTSBASE)/common/io/warlock
4760b08185Syz147069
4860b08185Syz147069#
4960b08185Syz147069#	Include common rules.
5060b08185Syz147069#
5160b08185Syz147069include $(UTSBASE)/intel/Makefile.intel
5260b08185Syz147069
53c138f478Syz147069LDFLAGS         += -dy -Nmisc/usba -Nmisc/usbser -Nmisc/usbs49_fw
5460b08185Syz147069
5560b08185Syz147069#
5660b08185Syz147069#	Define targets
5760b08185Syz147069#
5860b08185Syz147069ALL_TARGET	= $(BINARY)
5960b08185Syz147069LINT_TARGET	= $(MODULE).lint
6060b08185Syz147069INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
6160b08185Syz147069
62bb25c06cSjg#
63bb25c06cSjg# For now, disable these lint checks; maintainers should endeavor
64bb25c06cSjg# to investigate and remove these for maximum lint coverage.
65bb25c06cSjg# Please do not carry these forward to new Makefiles.
66bb25c06cSjg#
67bb25c06cSjgLINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
68bb25c06cSjgLINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
69bb25c06cSjg
7060b08185Syz147069.KEEP_STATE:
7160b08185Syz147069
7260b08185Syz147069all:		$(ALL_DEPS)
7360b08185Syz147069
7460b08185Syz147069def:		$(DEF_DEPS)
7560b08185Syz147069
76*4ebb14b2Sfritsclean:		$(CLEAN_DEPS)
77*4ebb14b2Sfrits		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
7860b08185Syz147069
79*4ebb14b2Sfritsclobber:	$(CLOBBER_DEPS)
80*4ebb14b2Sfrits		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
8160b08185Syz147069
8260b08185Syz147069lint:		$(LINT_DEPS)
8360b08185Syz147069
8460b08185Syz147069modlintlib:	$(MODLINTLIB_DEPS)
8560b08185Syz147069
8660b08185Syz147069clean.lint:	$(CLEAN_LINT_DEPS)
8760b08185Syz147069
8860b08185Syz147069install:	$(INSTALL_DEPS)
8960b08185Syz147069
9060b08185Syz147069#
9160b08185Syz147069#	Include common targets.
9260b08185Syz147069#
9360b08185Syz147069include $(UTSBASE)/intel/Makefile.targ
94*4ebb14b2Sfrits
95*4ebb14b2Sfrits#
96*4ebb14b2Sfrits#	Defines for local commands.
97*4ebb14b2Sfrits#
98*4ebb14b2SfritsWLCC		= wlcc
99*4ebb14b2SfritsTOUCH		= touch
100*4ebb14b2SfritsWARLOCK		= warlock
101*4ebb14b2SfritsSCCS		= sccs
102*4ebb14b2SfritsTEST		= test
103*4ebb14b2Sfrits
104*4ebb14b2Sfrits#
105*4ebb14b2Sfrits#	warlock
106*4ebb14b2Sfrits#
107*4ebb14b2SfritsWARLOCK_CMD	= usbser_keyspan.wlcmd
108*4ebb14b2Sfrits
109*4ebb14b2SfritsUSBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
110*4ebb14b2SfritsUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
111*4ebb14b2SfritsUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
112*4ebb14b2SfritsOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
113*4ebb14b2SfritsEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
114*4ebb14b2Sfrits
115*4ebb14b2Sfritswarlock: $(WARLOCK_OK)
116*4ebb14b2Sfrits
117*4ebb14b2Sfrits%.wlcmd:
118*4ebb14b2Sfrits	cd $(WLCMD_DIR); $(TEST) -f $@  || $(SCCS) get $@
119*4ebb14b2Sfrits
120*4ebb14b2Sfrits$(WARLOCK_OK): warlock_with_usba warlock_with_usbser
121*4ebb14b2Sfrits	$(TOUCH) $@
122*4ebb14b2Sfrits
123*4ebb14b2Sfrits%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbser_keyspan/%.c
124*4ebb14b2Sfrits	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
125*4ebb14b2Sfrits
126*4ebb14b2Sfritswarlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
127*4ebb14b2Sfrits	$(WARLOCK_CMD)
128*4ebb14b2Sfrits	$(WARLOCK) -c $(WLCMD_DIR)/$(WARLOCK_CMD) $(WARLOCK_OUT) \
129*4ebb14b2Sfrits		$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
130*4ebb14b2Sfrits
131*4ebb14b2Sfritswarlock_with_usba: $(WARLOCK_OUT) usbser_files \
132*4ebb14b2Sfrits	usbser_keyspan_with_usba.wlcmd \
133*4ebb14b2Sfrits	usba_files ohci_files uhci_files ehci_files warlock_ddi.files
134*4ebb14b2Sfrits	$(WARLOCK) -c $(WLCMD_DIR)/usbser_keyspan_with_usba.wlcmd \
135*4ebb14b2Sfrits		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
136*4ebb14b2Sfrits		$(USBSER_FILES) \
137*4ebb14b2Sfrits		$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
138*4ebb14b2Sfrits
139*4ebb14b2Sfritsusbser_files:
140*4ebb14b2Sfrits	@cd ../usbser; pwd; $(MAKE) warlock
141*4ebb14b2Sfrits
142*4ebb14b2Sfritsusba_files:
143*4ebb14b2Sfrits	@cd ../usba;pwd; $(MAKE) warlock
144*4ebb14b2Sfrits
145*4ebb14b2Sfritsuhci_files:
146*4ebb14b2Sfrits	@cd ../uhci;pwd; $(MAKE) warlock
147*4ebb14b2Sfrits
148*4ebb14b2Sfritsohci_files:
149*4ebb14b2Sfrits	@cd ../ohci;pwd; $(MAKE) warlock
150*4ebb14b2Sfrits
151*4ebb14b2Sfritsehci_files:
152*4ebb14b2Sfrits	@cd ../ehci;pwd; $(MAKE) warlock
153*4ebb14b2Sfrits
154*4ebb14b2Sfritswarlock_ddi.files:
155*4ebb14b2Sfrits	cd ../warlock; pwd; $(MAKE) warlock
156