Makefile revision 4ebb14b236958cfe1ef4ff3b7a50216d9e51f997
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
c92c50783e4e93699f2a42643b8f200b9b719c87Automatic Updater# CDDL HEADER START
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The contents of this file are subject to the terms of the
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# Common Development and Distribution License (the "License").
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You may not use this file except in compliance with the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# or http://www.opensolaris.org/os/licensing.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# See the License for the specific language governing permissions
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and limitations under the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER END
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Use is subject to license terms.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater#ident "%Z%%M% %I% %E% SMI"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# This makefile drives the production of the usbprn kernel driver.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# sparc architecture dependent
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# uts/sparc/usbprn/Makefile
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Path to the base of the uts directory tree (usually /usr/src/uts).
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsUTSBASE = ../..
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Define the module and object file sets.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE = usbprn
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsOBJECTS = $(USBPRN_OBJS:%=$(OBJS_DIR)/%)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINTS = $(USBPRN_OBJS:%.o=$(LINTS_DIR)/%.ln)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsWARLOCK_OUT = $(USBPRN_OBJS:%.o=%.ll)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsWARLOCK_OK = $(MODULE).ok
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsWLCMD_DIR = $(UTSBASE)/common/io/warlock
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Include common rules.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude $(UTSBASE)/sparc/Makefile.sparc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# lint pass one enforcement
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCFLAGS += $(CCVERBOSE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# depends on misc/usba
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLDFLAGS += -dy -Nmisc/usba
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Define targets
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsALL_TARGET = $(BINARY)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINT_TARGET = $(MODULE).lint
c247e3f281613fabe1af362e9f3157e35ebbe52cMark AndrewsINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# For now, disable these lint checks; maintainers should endeavor
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# to investigate and remove these for maximum lint coverage.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Please do not carry these forward to new Makefiles.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews.KEEP_STATE:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsall: $(ALL_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdef: $(DEF_DEPS)
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsclean: $(CLEAN_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsclobber: $(CLOBBER_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewslint: $(LINT_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsmodlintlib: $(MODLINTLIB_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsclean.lint: $(CLEAN_LINT_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall: $(INSTALL_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Include common targets.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude $(UTSBASE)/sparc/Makefile.targ
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Defines for local commands.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsWARLOCK = warlock
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsWLCC = wlcc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTOUCH = touch
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSCCS = sccs
1224c3b69b3d18f7127aa042644936af25a2d679Mark AndrewsTEST = test
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
1224c3b69b3d18f7127aa042644936af25a2d679Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# lock_lint rules
1224c3b69b3d18f7127aa042644936af25a2d679Mark Andrews#
1224c3b69b3d18f7127aa042644936af25a2d679Mark AndrewsUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewswarlock: $(WARLOCK_OK) warlock_with_usba
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews%.wlcmd:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(WARLOCK_OK): $(WARLOCK_OUT) usbprn.wlcmd warlock_ddi.files
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(WARLOCK) -c $(WLCMD_DIR)/usbprn.wlcmd $(WARLOCK_OUT) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -l ../warlock/ddi_dki_impl.ll
c247e3f281613fabe1af362e9f3157e35ebbe52cMark Andrews $(TOUCH) $@
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
c247e3f281613fabe1af362e9f3157e35ebbe52cMark Andrews%.ll: $(UTSBASE)/common/io/usb/clients/printer/%.c \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(UTSBASE)/common/sys/usb/clients/printer/usbprn.h
c247e3f281613fabe1af362e9f3157e35ebbe52cMark Andrews $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewswarlock_with_usba: usbprn_with_usba.wlcmd $(WARLOCK_OUT) usba_files \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ohci_files ehci_files uhci_files warlock_ddi.files
c247e3f281613fabe1af362e9f3157e35ebbe52cMark Andrews $(WARLOCK) -c $(WLCMD_DIR)/usbprn_with_usba.wlcmd \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(WARLOCK_OUT) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -l ../warlock/ddi_dki_impl.ll
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsusba_files:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews @cd ../usba;pwd; $(MAKE) warlock
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsohci_files:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews @cd ../ohci;pwd; $(MAKE) warlock
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsuhci_files:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews @cd ../uhci;pwd; $(MAKE) warlock
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsehci_files:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews @cd ../ehci;pwd; $(MAKE) warlock
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewswarlock_ddi.files:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cd ../warlock; pwd; $(MAKE) warlock
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User