Makefile revision 489b7c4ab76ae8df137fbfcc2214f7baa52883a0
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews#
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# CDDL HEADER START
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater#
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater# The contents of this file are subject to the terms of the
1167fc7904c5f0a472f8df207ac46dd52c7f1ec8Automatic Updater# Common Development and Distribution License (the "License").
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater# You may not use this file except in compliance with the License.
46da3117812814a29432a8d9a9ccf8acdbfdadceAutomatic Updater#
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0519188c8e1ae76978fc4e0f799620cd36eba07aAutomatic Updater# or http://www.opensolaris.org/os/licensing.
79b273c187a4aa1016a62181983dfdd0521681aeMark Andrews# See the License for the specific language governing permissions
90ff38a0d8deaf5f9c2aa5916d99b2e572d28738Automatic Updater# and limitations under the License.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
6c6a121295b30772cbf3dd75a51fb9d883051a0eAutomatic Updater# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# If applicable, add the following below this CDDL HEADER, with the
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater# fields enclosed by brackets "[]" replaced with your own identifying
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updater# information: Portions Copyright [yyyy] [name of copyright owner]
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# CDDL HEADER END
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater#
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Use is subject to license terms.
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updater#
831f79c4310a7d38fc3475ccfff531b2b2535641Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# This makefile drives the production of the usbprn kernel driver.
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# sparc architecture dependent
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# uts/sparc/usbprn/Makefile
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater#
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# Path to the base of the uts directory tree (usually /usr/src/uts).
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterUTSBASE = ../..
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# Define the module and object file sets.
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterMODULE = usbprn
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntOBJECTS = $(USBPRN_OBJS:%=$(OBJS_DIR)/%)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterLINTS = $(USBPRN_OBJS:%.o=$(LINTS_DIR)/%.ln)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterWARLOCK_OUT = $(USBPRN_OBJS:%.o=%.ll)
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntWARLOCK_OK = $(MODULE).ok
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic UpdaterWLCMD_DIR = $(UTSBASE)/common/io/warlock
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic Updater
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# Include common rules.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updaterinclude $(UTSBASE)/sparc/Makefile.sparc
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater# lint pass one enforcement
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCFLAGS += $(CCVERBOSE)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# depends on misc/usba
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark AndrewsLDFLAGS += -dy -Nmisc/usba
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Define targets
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsALL_TARGET = $(BINARY)
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic UpdaterLINT_TARGET = $(MODULE).lint
8e9f3b69914ee02a80b87c97b1f8093edb3e9ae0Automatic UpdaterINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic Updater.KEEP_STATE:
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic Updaterall: $(ALL_DEPS)
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsdef: $(DEF_DEPS)
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsclean: $(CLEAN_DEPS)
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic Updater $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
693c4232dfdffaff672197d4b9fea944c64cf80aAutomatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsclobber: $(CLOBBER_DEPS)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterlint: $(LINT_DEPS)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrewsmodlintlib: $(MODLINTLIB_DEPS)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonclean.lint: $(CLEAN_LINT_DEPS)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterinstall: $(INSTALL_DEPS)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater#
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater# Include common targets.
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater#
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrewsinclude $(UTSBASE)/sparc/Makefile.targ
11af78f7dc35741bdab68dbab11b03daab005b28Automatic Updater
11af78f7dc35741bdab68dbab11b03daab005b28Automatic Updater#
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews# Defines for local commands.
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont#
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic UpdaterWARLOCK = warlock
8ccd7da886e93cd490fcb6f4c4e98a6514f35820Automatic UpdaterWLCC = wlcc
2a31bd531072824ef252c18303859d6af7451b00Francis DupontTOUCH = touch
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsTEST = test
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# lock_lint rules
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews#
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic UpdaterUSBA_FILES = $(USBA_WITHOUT_WUSB_OBJS:%.o=../usba/%.ll)
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic UpdaterUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark AndrewsOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark AndrewsEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic Updater
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic Updaterwarlock: $(WARLOCK_OK) warlock_with_usba
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/usbprn.wlcmd warlock_ddi.files
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater $(WARLOCK) -c $(WLCMD_DIR)/usbprn.wlcmd $(WARLOCK_OUT) \
82447d835d3ff5c658749b4e9b4f66166407b3eaAutomatic Updater -l ../warlock/ddi_dki_impl.ll
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(TOUCH) $@
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic Updater
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic Updater%.ll: $(UTSBASE)/common/io/usb/clients/printer/%.c \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(UTSBASE)/common/sys/usb/clients/printer/usbprn.h
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updaterwarlock_with_usba: $(WLCMD_DIR)/usbprn_with_usba.wlcmd $(WARLOCK_OUT) \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater usba_files ohci_files ehci_files uhci_files warlock_ddi.files
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(WARLOCK) -c $(WLCMD_DIR)/usbprn_with_usba.wlcmd \
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(WARLOCK_OUT) \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater -l ../warlock/ddi_dki_impl.ll
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterusba_files:
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews @cd ../usba;pwd; $(MAKE) warlock
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updaterohci_files:
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater @cd ../ohci;pwd; $(MAKE) warlock
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updateruhci_files:
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater @cd ../uhci;pwd; $(MAKE) warlock
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterehci_files:
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson @cd ../ehci;pwd; $(MAKE) warlock
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
4104e236f71eb5108fcfda6711878a97f6f4a8e7Automatic Updaterwarlock_ddi.files:
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater cd ../warlock; pwd; $(MAKE) warlock
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater