Makefile revision e2c88f0c2610f16de7b639746b40dea5f3e2256e
278N/A#
278N/A# CDDL HEADER START
278N/A#
278N/A# The contents of this file are subject to the terms of the
278N/A# Common Development and Distribution License (the "License").
278N/A# You may not use this file except in compliance with the License.
278N/A#
278N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
278N/A# or http://www.opensolaris.org/os/licensing.
278N/A# See the License for the specific language governing permissions
278N/A# and limitations under the License.
278N/A#
278N/A# When distributing Covered Code, include this CDDL HEADER in each
278N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
278N/A# If applicable, add the following below this CDDL HEADER, with the
278N/A# fields enclosed by brackets "[]" replaced with your own identifying
278N/A# information: Portions Copyright [yyyy] [name of copyright owner]
278N/A#
278N/A# CDDL HEADER END
278N/A#
1845N/A#
278N/A# uts/sparc/hid/Makefile
278N/A
278N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
278N/A# Use is subject to license terms.
278N/A#
618N/A# Copyright 2014 Garrett D'Amore <garrett@damore.org>
278N/A#
278N/A# This makefile drives the production of the hid kernel driver.
844N/A#
844N/A# sparc architecture dependent
618N/A#
1258N/A
278N/A#
278N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
278N/A#
278N/AUTSBASE = ../..
278N/A
278N/A#
278N/A# Define the module and object file sets.
278N/A#
278N/AMODULE = hid
278N/AOBJECTS = $(HID_OBJS:%=$(OBJS_DIR)/%)
278N/ALINTS = $(HID_OBJS:%.o=$(LINTS_DIR)/%.ln)
278N/AROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
278N/AWARLOCK_OUT = $(HID_OBJS:%.o=%.ll)
278N/AWARLOCK_OK = $(MODULE).ok
278N/AWLCMD_DIR = $(UTSBASE)/common/io/warlock
278N/A
278N/A#
278N/A# Include common rules.
278N/A#
278N/Ainclude $(UTSBASE)/sparc/Makefile.sparc
278N/A
278N/A#
278N/A# lint pass one enforcement
278N/A#
278N/ACFLAGS += $(CCVERBOSE)
278N/A
278N/A#
278N/A# depends on misc/usba
278N/A#
1845N/ALDFLAGS += -dy -Nmisc/usba -Nmisc/hidparser -Ndacf/consconfig_dacf
1845N/A
1845N/A#
278N/A# Define targets
1938N/A#
1938N/AALL_TARGET = $(BINARY)
278N/ALINT_TARGET = $(MODULE).lint
278N/AINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
278N/A
278N/ACERRWARN += -_gcc=-Wno-parentheses
278N/A
278N/A#
278N/A# For now, disable these lint checks; maintainers should endeavor
278N/A# to investigate and remove these for maximum lint coverage.
278N/A# Please do not carry these forward to new Makefiles.
278N/A#
278N/ALINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
.KEEP_STATE:
all: $(ALL_DEPS)
def: $(DEF_DEPS)
clean: $(CLEAN_DEPS)
$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
clobber: $(CLOBBER_DEPS)
$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
lint: $(LINT_DEPS)
modlintlib: $(MODLINTLIB_DEPS)
clean.lint: $(CLEAN_LINT_DEPS)
install: $(INSTALL_DEPS)
#
# Include common targets.
#
include $(UTSBASE)/sparc/Makefile.targ
#
# Defines for local commands.
#
WARLOCK = warlock
WLCC = wlcc
TOUCH = touch
TEST = test
#
# lock_lint rules
#
USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
warlock: $(WARLOCK_OK) warlock_with_usba
$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/hid.wlcmd warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/hid.wlcmd $(WARLOCK_OUT) \
-l ../warlock/ddi_dki_impl.ll
$(TOUCH) $@
%.ll: $(UTSBASE)/common/io/usb/clients/hid/%.c \
$(UTSBASE)/common/sys/usb/clients/hid/hidvar.h
$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
warlock_with_usba: $(WLCMD_DIR)/hid_with_usba.wlcmd $(WARLOCK_OUT) usba_files \
ohci_files ehci_files uhci_files warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/hid_with_usba.wlcmd \
$(USBA_FILES) \
$(UHCI_FILES) $(OHCI_FILES) $(EHCI_FILES) \
$(WARLOCK_OUT) \
-l ../warlock/ddi_dki_impl.ll
usba_files:
@cd ../usba;pwd; $(MAKE) warlock
ohci_files:
@cd ../ohci;pwd; $(MAKE) warlock
uhci_files:
@cd ../uhci;pwd; $(MAKE) warlock
ehci_files:
@cd ../ehci;pwd; $(MAKE) warlock
warlock_ddi.files:
cd ../warlock; pwd; $(MAKE) warlock