xref: /titanic_51/usr/src/uts/sparc/usbsksp/Makefile (revision e2c88f0c2610f16de7b639746b40dea5f3e2256e)
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#
22489b7c4aSRaymond Chen# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2360b08185Syz147069# Use is subject to license terms.
2460b08185Syz147069#
25*e2c88f0cSGarrett D'Amore# Copyright 2014 Garrett D'Amore <garrett@damore.org>
26*e2c88f0cSGarrett D'Amore#
2760b08185Syz147069# uts/sparc/usbsksp/Makefile
2860b08185Syz147069
2960b08185Syz147069
3060b08185Syz147069#
3160b08185Syz147069#	This makefile drives the production of the Keyspan USB Serial
3260b08185Syz147069#	Adapter driver.
3360b08185Syz147069#
3460b08185Syz147069#	Path to the base of the uts directory tree (usually /usr/src/uts).
3560b08185Syz147069#
3660b08185Syz147069UTSBASE	= ../..
3760b08185Syz147069
3860b08185Syz147069#
3960b08185Syz147069#	Define the module and object file sets.
4060b08185Syz147069#
4160b08185Syz147069MODULE		= usbsksp
4260b08185Syz147069OBJECTS		= $(USBSER_KEYSPAN_OBJS:%=$(OBJS_DIR)/%)
4360b08185Syz147069LINTS		= $(USBSER_KEYSPAN_OBJS:%.o=$(LINTS_DIR)/%.ln)
4460b08185Syz147069ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
454ebb14b2SfritsWARLOCK_OUT     = $(USBSER_KEYSPAN_OBJS:%.o=%.ll)
464ebb14b2SfritsWARLOCK_OK	= $(MODULE).ok
474ebb14b2SfritsWLCMD_DIR       = $(UTSBASE)/common/io/warlock
4860b08185Syz147069
4960b08185Syz147069#
5060b08185Syz147069#	Include common rules.
5160b08185Syz147069#
5260b08185Syz147069include $(UTSBASE)/sparc/Makefile.sparc
5360b08185Syz147069
5460b08185Syz147069#
5560b08185Syz147069# lint pass one enforcement
5660b08185Syz147069#
5760b08185Syz147069CFLAGS += $(CCVERBOSE)
5860b08185Syz147069
59c138f478Syz147069LDFLAGS         += -dy -Nmisc/usba -Nmisc/usbser -Nmisc/usbs49_fw
6060b08185Syz147069
6160b08185Syz147069#
6260b08185Syz147069#	Define targets
6360b08185Syz147069#
6460b08185Syz147069ALL_TARGET	= $(BINARY)
6560b08185Syz147069LINT_TARGET	= $(MODULE).lint
6660b08185Syz147069INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
6760b08185Syz147069
6860b08185Syz147069.KEEP_STATE:
6960b08185Syz147069
7060b08185Syz147069all:		$(ALL_DEPS)
7160b08185Syz147069
7260b08185Syz147069def:		$(DEF_DEPS)
7360b08185Syz147069
744ebb14b2Sfritsclean:		$(CLEAN_DEPS)
7560b08185Syz147069		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
7660b08185Syz147069
774ebb14b2Sfritsclobber:	$(CLOBBER_DEPS)
7860b08185Syz147069		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
7960b08185Syz147069
8060b08185Syz147069lint:		$(LINT_DEPS)
8160b08185Syz147069
8260b08185Syz147069modlintlib:	$(MODLINTLIB_DEPS)
8360b08185Syz147069
8460b08185Syz147069clean.lint:	$(CLEAN_LINT_DEPS)
8560b08185Syz147069
8660b08185Syz147069install:	$(INSTALL_DEPS)
8760b08185Syz147069
8860b08185Syz147069#
8960b08185Syz147069#	Include common targets.
9060b08185Syz147069#
9160b08185Syz147069include $(UTSBASE)/sparc/Makefile.targ
9260b08185Syz147069
937014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
947014882cSRichard Lowe
9560b08185Syz147069#
9660b08185Syz147069#	Defines for local commands.
9760b08185Syz147069#
9860b08185Syz147069WLCC		= wlcc
9960b08185Syz147069TOUCH		= touch
10060b08185Syz147069WARLOCK		= warlock
10160b08185Syz147069TEST		= test
10260b08185Syz147069
10360b08185Syz147069#
10460b08185Syz147069#	warlock
10560b08185Syz147069#
106bf56214cSstevelWARLOCK_CMD	= $(WLCMD_DIR)/usbser_keyspan.wlcmd
10760b08185Syz147069USBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
108*e2c88f0cSGarrett D'AmoreUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
10960b08185Syz147069UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
11060b08185Syz147069OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
11160b08185Syz147069EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
11260b08185Syz147069
1134ebb14b2Sfritswarlock: $(WARLOCK_OK)
11460b08185Syz147069
1154ebb14b2Sfrits$(WARLOCK_OK): warlock_with_usba warlock_with_usbser
11660b08185Syz147069	$(TOUCH) $@
11760b08185Syz147069
11860b08185Syz147069%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbser_keyspan/%.c
11960b08185Syz147069	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
12060b08185Syz147069
1214ebb14b2Sfritswarlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
1224ebb14b2Sfrits	$(WARLOCK_CMD)
123bf56214cSstevel	$(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
12460b08185Syz147069		$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
12560b08185Syz147069
126bf56214cSstevelwarlock_with_usba: $(WLCMD_DIR)/usbser_keyspan_with_usba.wlcmd $(WARLOCK_OUT) \
127bf56214cSstevel	usbser_files usba_files ohci_files uhci_files ehci_files \
128bf56214cSstevel	warlock_ddi.files
1294ebb14b2Sfrits	$(WARLOCK) -c $(WLCMD_DIR)/usbser_keyspan_with_usba.wlcmd \
13060b08185Syz147069		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
13160b08185Syz147069		$(USBSER_FILES) \
13260b08185Syz147069		$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
13360b08185Syz147069
1344ebb14b2Sfritsusbser_files:
1354ebb14b2Sfrits	@cd ../usbser; pwd; $(MAKE) warlock
1364ebb14b2Sfrits
13760b08185Syz147069usba_files:
13860b08185Syz147069	@cd ../usba;pwd; $(MAKE) warlock
13960b08185Syz147069
14060b08185Syz147069uhci_files:
14160b08185Syz147069	@cd ../uhci;pwd; $(MAKE) warlock
14260b08185Syz147069
14360b08185Syz147069ohci_files:
14460b08185Syz147069	@cd ../ohci;pwd; $(MAKE) warlock
14560b08185Syz147069
14660b08185Syz147069ehci_files:
14760b08185Syz147069	@cd ../ehci;pwd; $(MAKE) warlock
14860b08185Syz147069
14960b08185Syz147069warlock_ddi.files:
15060b08185Syz147069	cd ../warlock; pwd; $(MAKE) warlock
151