Makefile revision 40a3f5ceaf3ada360988c7cbb70c66f2d5588da4
735fb4ffa6a76413f85101d7d625a4776d6ee6cdAndreas Gustafsson#
735fb4ffa6a76413f85101d7d625a4776d6ee6cdAndreas Gustafsson# CDDL HEADER START
735fb4ffa6a76413f85101d7d625a4776d6ee6cdAndreas Gustafsson#
735fb4ffa6a76413f85101d7d625a4776d6ee6cdAndreas Gustafsson# The contents of this file are subject to the terms of the
e1368a7770744cbeadcdc27967f855196988eceaAndreas Gustafsson# Common Development and Distribution License (the "License").
e1368a7770744cbeadcdc27967f855196988eceaAndreas Gustafsson# You may not use this file except in compliance with the License.
c05eb51a1b9ebd156b9fec957d60c2579c968468Mark Andrews#
a3365e361f0066609d250005e2b1082cb2ba35fdAndreas Gustafsson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a3365e361f0066609d250005e2b1082cb2ba35fdAndreas Gustafsson# or http://www.opensolaris.org/os/licensing.
a3365e361f0066609d250005e2b1082cb2ba35fdAndreas Gustafsson# See the License for the specific language governing permissions
e32394a2ac3466a2235f79ee32c247a11be42a8dAndreas Gustafsson# and limitations under the License.
e32394a2ac3466a2235f79ee32c247a11be42a8dAndreas Gustafsson#
e32394a2ac3466a2235f79ee32c247a11be42a8dAndreas Gustafsson# When distributing Covered Code, include this CDDL HEADER in each
031f9084fc1ca8b258c151f428677e7226556ad0Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
031f9084fc1ca8b258c151f428677e7226556ad0Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
031f9084fc1ca8b258c151f428677e7226556ad0Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
031f9084fc1ca8b258c151f428677e7226556ad0Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
031f9084fc1ca8b258c151f428677e7226556ad0Mark Andrews#
031f9084fc1ca8b258c151f428677e7226556ad0Mark Andrews# CDDL HEADER END
031f9084fc1ca8b258c151f428677e7226556ad0Mark Andrews#
031f9084fc1ca8b258c151f428677e7226556ad0Mark Andrews#
031f9084fc1ca8b258c151f428677e7226556ad0Mark Andrews# uts/sparc/usbftdi/Makefile
44215b932d4f0ce5257d794cb6f76b9282455eb1Mark Andrews# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
44215b932d4f0ce5257d794cb6f76b9282455eb1Mark Andrews# Use is subject to license terms.
44215b932d4f0ce5257d794cb6f76b9282455eb1Mark Andrews#
44215b932d4f0ce5257d794cb6f76b9282455eb1Mark Andrews#
44215b932d4f0ce5257d794cb6f76b9282455eb1Mark Andrews# This makefile drives the production of the FT232R USB Serial
405ffb1f0d2c12d199f85f03973d1a02ac12e000Andreas Gustafsson# Adapter driver.
405ffb1f0d2c12d199f85f03973d1a02ac12e000Andreas Gustafsson#
405ffb1f0d2c12d199f85f03973d1a02ac12e000Andreas Gustafsson# Path to the base of the uts directory tree (usually /usr/src/uts).
405ffb1f0d2c12d199f85f03973d1a02ac12e000Andreas Gustafsson#
405ffb1f0d2c12d199f85f03973d1a02ac12e000Andreas GustafssonUTSBASE = ../..
eea2865feca4ea56facd2ef6e7226386a3604f65Andreas Gustafsson
6d8568cb45240974da0ee1b653b28e3fdfffe93eAndreas Gustafsson#
6d8568cb45240974da0ee1b653b28e3fdfffe93eAndreas Gustafsson# Define the module and object file sets.
6d8568cb45240974da0ee1b653b28e3fdfffe93eAndreas Gustafsson#
6d8568cb45240974da0ee1b653b28e3fdfffe93eAndreas GustafssonMODULE = usbftdi
e3402551ac9be809eeb3a4b7b30d023ba67dad28Brian WellingtonOBJECTS = $(USBFTDI_OBJS:%=$(OBJS_DIR)/%)
6d3f954c572db02159deedd444373161fda47a88Brian WellingtonLINTS = $(USBFTDI_OBJS:%.o=$(LINTS_DIR)/%.ln)
b0f941a50f24656b3523609f86cead41b0269c7aBrian WellingtonWARLOCK_OUT = $(USBFTDI_OBJS:%.o=%.ll)
b0f941a50f24656b3523609f86cead41b0269c7aBrian WellingtonWARLOCK_OK = $(MODULE).ok
b0f941a50f24656b3523609f86cead41b0269c7aBrian WellingtonROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
ea419adc4eca4c3e44f2c282035b5dce6b795fe2Andreas GustafssonCONF_SRCDIR = $(UTSBASE)/common/io/usb/clients/usbser/usbftdi
3f31c8c2954f857e375db8e943a35f6aa5e230b4Andreas GustafssonWLCMD_DIR = $(UTSBASE)/common/io/warlock
ea419adc4eca4c3e44f2c282035b5dce6b795fe2Andreas Gustafsson
ff59f0e4feaefb45a49427bd91775058b4b4f2d0Andreas Gustafsson#
ff59f0e4feaefb45a49427bd91775058b4b4f2d0Andreas Gustafsson# Include common rules.
eea2865feca4ea56facd2ef6e7226386a3604f65Andreas Gustafsson#
8af0b86ade4c15a7db207bd7643f8a9f6cb5a648David Lawrenceinclude $(UTSBASE)/sparc/Makefile.sparc
8af0b86ade4c15a7db207bd7643f8a9f6cb5a648David Lawrence
886b96ebfd555cfeaf37ae46fc08421a41c61392Andreas GustafssonLDFLAGS += -dy -Nmisc/usba -Nmisc/usbser
674f1cfb1d7dfa92e52db950dbe80e60ef8f5cddBrian Wellington
674f1cfb1d7dfa92e52db950dbe80e60ef8f5cddBrian Wellington#
674f1cfb1d7dfa92e52db950dbe80e60ef8f5cddBrian Wellington# Define targets
69d17bea6be937b92f3375e6249b5677c90f4fe2Andreas Gustafsson#
69d17bea6be937b92f3375e6249b5677c90f4fe2Andreas GustafssonALL_TARGET = $(BINARY) $(SRC_CONFFILE)
69d17bea6be937b92f3375e6249b5677c90f4fe2Andreas GustafssonLINT_TARGET = $(MODULE).lint
da76a8046e01e1c1c2e6f75772afb2c4f202cc25Brian WellingtonINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
cd7ffa4c1286a48c10056632be3fb0b64c575c35Brian Wellington
cd7ffa4c1286a48c10056632be3fb0b64c575c35Brian Wellington.KEEP_STATE:
cd7ffa4c1286a48c10056632be3fb0b64c575c35Brian Wellington
0cff88818a96197995c3533f6cbfb1a0efc06db0Brian Wellingtonall: $(ALL_DEPS)
0cff88818a96197995c3533f6cbfb1a0efc06db0Brian Wellington
5bba7216f3263dc49dd4db2ac64b6203a9e2b180Andreas Gustafssondef: $(DEF_DEPS)
5bba7216f3263dc49dd4db2ac64b6203a9e2b180Andreas Gustafsson
40817ed9c13782a7844e15dde24432611c4694acDavid Lawrenceclean: $(CLEAN_DEPS)
40817ed9c13782a7844e15dde24432611c4694acDavid Lawrence $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
e06aebbe7b5b3128f99b16d6756a074b4de28d37Mark Andrews
b41de87910a4c57039a4f5968e272a9aec566959Brian Wellingtonclobber: $(CLOBBER_DEPS)
40b1b44ed65b9655a135fc867ed9f0374c247ad4Andreas Gustafsson $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
40b1b44ed65b9655a135fc867ed9f0374c247ad4Andreas Gustafsson
40b1b44ed65b9655a135fc867ed9f0374c247ad4Andreas Gustafssonlint: $(LINT_DEPS)
ab8668fb583a92df0698f5cdac7e7b12ead614aaBrian Wellington
ab8668fb583a92df0698f5cdac7e7b12ead614aaBrian Wellingtonmodlintlib: $(MODLINTLIB_DEPS)
ab8668fb583a92df0698f5cdac7e7b12ead614aaBrian Wellington
575db903aabb08137a757d1c60ebb0d286ecff56Andreas Gustafssonclean.lint: $(CLEAN_LINT_DEPS)
575db903aabb08137a757d1c60ebb0d286ecff56Andreas Gustafsson
575db903aabb08137a757d1c60ebb0d286ecff56Andreas Gustafssoninstall: $(INSTALL_DEPS)
575db903aabb08137a757d1c60ebb0d286ecff56Andreas Gustafsson
575db903aabb08137a757d1c60ebb0d286ecff56Andreas Gustafsson#
575db903aabb08137a757d1c60ebb0d286ecff56Andreas Gustafsson# Include common targets.
a4c55a3d0813e00e3d7846cc9736110c61d0a2baAndreas Gustafsson#
a4c55a3d0813e00e3d7846cc9736110c61d0a2baAndreas Gustafssoninclude $(UTSBASE)/sparc/Makefile.targ
d403e27f2b1c94f2b9349ddb68f50a141ae8d26dAndreas Gustafsson
c851f1cc2187b59687af94725fbacac022987d05Andreas Gustafsson#
c851f1cc2187b59687af94725fbacac022987d05Andreas Gustafsson# Defines for local commands.
91614f2bc498ef7eea22e449c91951f4598c8223Andreas Gustafsson#
91614f2bc498ef7eea22e449c91951f4598c8223Andreas GustafssonWLCC = wlcc
91614f2bc498ef7eea22e449c91951f4598c8223Andreas GustafssonTOUCH = touch
91614f2bc498ef7eea22e449c91951f4598c8223Andreas GustafssonWARLOCK = warlock
e0a9b524614889ca9b75f846cb6101fc448a60dcAndreas GustafssonTEST = test
512661edd7d51c8c179cce89a855df6cec2fcdcdMark Andrews
512661edd7d51c8c179cce89a855df6cec2fcdcdMark Andrews#
385a9cb48a70b329e507c39d043fa9a44c659913James Brister# warlock
385a9cb48a70b329e507c39d043fa9a44c659913James Brister#
385a9cb48a70b329e507c39d043fa9a44c659913James BristerWARLOCK_CMD = $(WLCMD_DIR)/$(MODULE).wlcmd
385a9cb48a70b329e507c39d043fa9a44c659913James BristerUSBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
385a9cb48a70b329e507c39d043fa9a44c659913James BristerUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
385a9cb48a70b329e507c39d043fa9a44c659913James BristerUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
bd77de5fcaea4dcf2f0250ded32adfccd3a38256Brian WellingtonOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
bd77de5fcaea4dcf2f0250ded32adfccd3a38256Brian WellingtonEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
bd77de5fcaea4dcf2f0250ded32adfccd3a38256Brian Wellington
e5f5ec73a710d21067d4721a9e82f2399f2f6c25David Lawrencewarlock: $(WARLOCK_OK)
48674819ebf9176b5d5582ae851e485c324c1159Michael Sawyer
48674819ebf9176b5d5582ae851e485c324c1159Michael Sawyer$(WARLOCK_OK): warlock_with_usba warlock_with_usbser
e5f5ec73a710d21067d4721a9e82f2399f2f6c25David Lawrence $(TOUCH) $@
48674819ebf9176b5d5582ae851e485c324c1159Michael Sawyer
9594482ba300a4d694162fa62ba636c7dd00d3b6Brian Wellington%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbftdi/%.c
9594482ba300a4d694162fa62ba636c7dd00d3b6Brian Wellington $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
47ddde42728034854444cf17e278cebaea06f666Michael Graff
47ddde42728034854444cf17e278cebaea06f666Michael Graffwarlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
edf8c55546efa9fb42da1c055ce02462a5c709c0David Lawrence $(WARLOCK_CMD)
edf8c55546efa9fb42da1c055ce02462a5c709c0David Lawrence $(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
edf8c55546efa9fb42da1c055ce02462a5c709c0David Lawrence $(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
c5944292e9ebee4a39fe939b9a16fe5596808556David Lawrence
c5944292e9ebee4a39fe939b9a16fe5596808556David Lawrencewarlock_with_usba: $(WARLOCK_OUT) usbser_files \
c5944292e9ebee4a39fe939b9a16fe5596808556David Lawrence $(WLCMD_DIR)/usbftdi_with_usba.wlcmd usba_files ohci_files uhci_files \
c5944292e9ebee4a39fe939b9a16fe5596808556David Lawrence ehci_files warlock_ddi.files
c5944292e9ebee4a39fe939b9a16fe5596808556David Lawrence $(WARLOCK) -c $(WLCMD_DIR)/usbftdi_with_usba.wlcmd \
c5944292e9ebee4a39fe939b9a16fe5596808556David Lawrence $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
c5944292e9ebee4a39fe939b9a16fe5596808556David Lawrence $(USBSER_FILES) \
c5944292e9ebee4a39fe939b9a16fe5596808556David Lawrence $(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
c5944292e9ebee4a39fe939b9a16fe5596808556David Lawrence
c5944292e9ebee4a39fe939b9a16fe5596808556David Lawrenceusbser_files:
36e0c379080343a0272dc076b7d7795ded04ee1dBrian Wellington @cd ../usbser; pwd; $(MAKE) warlock
36e0c379080343a0272dc076b7d7795ded04ee1dBrian Wellington
529a6b5224d751504027293a766a4c8b81241869Brian Wellingtonusba_files:
529a6b5224d751504027293a766a4c8b81241869Brian Wellington @cd ../usba;pwd; $(MAKE) warlock
529a6b5224d751504027293a766a4c8b81241869Brian Wellington
186ba80b8e391cf8421872f26771324644e45d83Andreas Gustafssonuhci_files:
186ba80b8e391cf8421872f26771324644e45d83Andreas Gustafsson @cd ../uhci;pwd; $(MAKE) warlock
862a026a7d752fbc8b376df6f7a9080d7c778b49Brian Wellington
677045ed612e1c26a32b5700479e26c25bcede58Brian Wellingtonohci_files:
677045ed612e1c26a32b5700479e26c25bcede58Brian Wellington @cd ../ohci;pwd; $(MAKE) warlock
677045ed612e1c26a32b5700479e26c25bcede58Brian Wellington
febf5f8b55abb2e6e840488a29a5ef4e20654f67David Lawrenceehci_files:
febf5f8b55abb2e6e840488a29a5ef4e20654f67David Lawrence @cd ../ehci;pwd; $(MAKE) warlock
c34bdef6bd197a04990e52469ad68481532dd35aAndreas Gustafsson
c34bdef6bd197a04990e52469ad68481532dd35aAndreas Gustafssonwarlock_ddi.files:
c34bdef6bd197a04990e52469ad68481532dd35aAndreas Gustafsson cd ../warlock; pwd; $(MAKE) warlock
05f6d0c0381d19eec721e11f6fd88caef25dacd8Andreas Gustafsson