xref: /titanic_51/usr/src/uts/sparc/usbsprl/Makefile (revision e2c88f0c2610f16de7b639746b40dea5f3e2256e)
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/sparc/usbsprl/Makefile
234de26129Sxs156463#
24489b7c4aSRaymond Chen# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
254de26129Sxs156463# Use is subject to license terms.
264de26129Sxs156463#
27*e2c88f0cSGarrett D'Amore# Copyright 2014 Garrett D'Amore <garrett@damore.org>
284de26129Sxs156463#
294de26129Sxs156463#	This makefile drives the production of the Prolific USB Serial
304de26129Sxs156463#	Adapter driver.
314de26129Sxs156463#
324de26129Sxs156463#	Path to the base of the uts directory tree (usually /usr/src/uts).
334de26129Sxs156463#
344de26129Sxs156463UTSBASE	= ../..
354de26129Sxs156463
364de26129Sxs156463#
374de26129Sxs156463#	Define the module and object file sets.
384de26129Sxs156463#
394de26129Sxs156463MODULE		= usbsprl
404de26129Sxs156463OBJECTS		= $(USBSPRL_OBJS:%=$(OBJS_DIR)/%)
414de26129Sxs156463LINTS		= $(USBSPRL_OBJS:%.o=$(LINTS_DIR)/%.ln)
424de26129Sxs156463ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
434ebb14b2SfritsWARLOCK_OUT     = $(USBSPRL_OBJS:%.o=%.ll)
444ebb14b2SfritsWARLOCK_OK	= $(MODULE).ok
454ebb14b2SfritsWLCMD_DIR       = $(UTSBASE)/common/io/warlock
464de26129Sxs156463
474de26129Sxs156463#
484de26129Sxs156463#	Include common rules.
494de26129Sxs156463#
504de26129Sxs156463include $(UTSBASE)/sparc/Makefile.sparc
514de26129Sxs156463
524de26129Sxs156463#
534de26129Sxs156463# lint pass one enforcement
544de26129Sxs156463#
554de26129Sxs156463CFLAGS += $(CCVERBOSE)
564de26129Sxs156463
577014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
587014882cSRichard Lowe
594de26129Sxs156463LDFLAGS         += -dy -Nmisc/usba -Nmisc/usbser
604de26129Sxs156463
614de26129Sxs156463#
624de26129Sxs156463#	Define targets
634de26129Sxs156463#
644de26129Sxs156463ALL_TARGET	= $(BINARY)
654de26129Sxs156463LINT_TARGET	= $(MODULE).lint
664de26129Sxs156463INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
674de26129Sxs156463
684de26129Sxs156463.KEEP_STATE:
694de26129Sxs156463
704de26129Sxs156463all:		$(ALL_DEPS)
714de26129Sxs156463
724de26129Sxs156463def:		$(DEF_DEPS)
734de26129Sxs156463
744ebb14b2Sfritsclean:		$(CLEAN_DEPS)
754de26129Sxs156463		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
764de26129Sxs156463
774ebb14b2Sfritsclobber:	$(CLOBBER_DEPS)
784de26129Sxs156463		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
794de26129Sxs156463
804de26129Sxs156463lint:		$(LINT_DEPS)
814de26129Sxs156463
824de26129Sxs156463modlintlib:	$(MODLINTLIB_DEPS)
834de26129Sxs156463
844de26129Sxs156463clean.lint:	$(CLEAN_LINT_DEPS)
854de26129Sxs156463
864de26129Sxs156463install:	$(INSTALL_DEPS)
874de26129Sxs156463
884de26129Sxs156463#
894de26129Sxs156463#	Include common targets.
904de26129Sxs156463#
914de26129Sxs156463include $(UTSBASE)/sparc/Makefile.targ
924de26129Sxs156463
934de26129Sxs156463#
944de26129Sxs156463#	Defines for local commands.
954de26129Sxs156463#
964de26129Sxs156463WLCC		= wlcc
974de26129Sxs156463TOUCH		= touch
984de26129Sxs156463WARLOCK		= warlock
994de26129Sxs156463TEST		= test
1004de26129Sxs156463
1014de26129Sxs156463#
1024de26129Sxs156463#	warlock
1034de26129Sxs156463#
104bf56214cSstevelWARLOCK_CMD	= $(WLCMD_DIR)/$(MODULE).wlcmd
1054de26129Sxs156463USBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
106*e2c88f0cSGarrett D'AmoreUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
1074de26129Sxs156463UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
1084de26129Sxs156463OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
1094de26129Sxs156463EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
1104de26129Sxs156463
1114ebb14b2Sfritswarlock: $(WARLOCK_OK)
1124de26129Sxs156463
1134ebb14b2Sfrits$(WARLOCK_OK): warlock_with_usbser warlock_with_usba
1144de26129Sxs156463	$(TOUCH) $@
1154de26129Sxs156463
1164de26129Sxs156463%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbsprl/%.c
1174de26129Sxs156463	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
1184de26129Sxs156463
1194ebb14b2Sfritswarlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
1204ebb14b2Sfrits	$(WARLOCK_CMD)
121bf56214cSstevel	$(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
1224de26129Sxs156463		$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
1234de26129Sxs156463
124bf56214cSstevelwarlock_with_usba: $(WLCMD_DIR)/usbsprl_with_usba.wlcmd $(WARLOCK_OUT) \
125bf56214cSstevel	usbser_files usba_files ohci_files uhci_files ehci_files \
126bf56214cSstevel	warlock_ddi.files
1274ebb14b2Sfrits	$(WARLOCK) -c $(WLCMD_DIR)/usbsprl_with_usba.wlcmd \
1284de26129Sxs156463		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
1294de26129Sxs156463		$(USBSER_FILES) \
1304de26129Sxs156463		$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
1314de26129Sxs156463
1324ebb14b2Sfritsusbser_files:
1334ebb14b2Sfrits	@cd ../usbser; pwd; $(MAKE) warlock
1344ebb14b2Sfrits
1354de26129Sxs156463usba_files:
1364de26129Sxs156463	@cd ../usba;pwd; $(MAKE) warlock
1374de26129Sxs156463
1384de26129Sxs156463uhci_files:
1394de26129Sxs156463	@cd ../uhci;pwd; $(MAKE) warlock
1404de26129Sxs156463
1414de26129Sxs156463ohci_files:
1424de26129Sxs156463	@cd ../ohci;pwd; $(MAKE) warlock
1434de26129Sxs156463
1444de26129Sxs156463ehci_files:
1454de26129Sxs156463	@cd ../ehci;pwd; $(MAKE) warlock
1464de26129Sxs156463
1474de26129Sxs156463warlock_ddi.files:
1484de26129Sxs156463	cd ../warlock; pwd; $(MAKE) warlock
149