Makefile revision e2c88f0c2610f16de7b639746b40dea5f3e2256e
2344N/A#
2362N/A# CDDL HEADER START
2344N/A#
2344N/A# The contents of this file are subject to the terms of the
2344N/A# Common Development and Distribution License (the "License").
2344N/A# You may not use this file except in compliance with the License.
2344N/A#
2344N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2344N/A# or http://www.opensolaris.org/os/licensing.
2344N/A# See the License for the specific language governing permissions
2344N/A# and limitations under the License.
2344N/A#
2344N/A# When distributing Covered Code, include this CDDL HEADER in each
2344N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2344N/A# If applicable, add the following below this CDDL HEADER, with the
2344N/A# fields enclosed by brackets "[]" replaced with your own identifying
2344N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2344N/A#
2362N/A# CDDL HEADER END
2362N/A#
2362N/A#
2344N/A# uts/sparc/ugen/Makefile
2344N/A#
2344N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2344N/A# Use is subject to license terms.
2344N/A#
2344N/A# Copyright 2014 Garrett D'Amore <garrett@damore.org>
2344N/A#
2344N/A# This makefile drives the production of the ugen kernel driver.
2344N/A#
2344N/A# sparc architecture dependent
2344N/A#
2344N/A
2344N/A#
2344N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
2344N/A#
2344N/AUTSBASE = ../..
2344N/A
2344N/A#
2344N/A# Define the module and object file sets.
2344N/A#
2344N/AMODULE = ugen
2344N/AOBJECTS = $(UGEN_OBJS:%=$(OBJS_DIR)/%)
2344N/ALINTS = $(UGEN_OBJS:%.o=$(LINTS_DIR)/%.ln)
2344N/AROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
2344N/AWARLOCK_OUT = $(UGEN_OBJS:%.o=%.ll)
2344N/AWARLOCK_OK = $(MODULE).ok
2344N/AWLCMD_DIR = $(UTSBASE)/common/io/warlock
2344N/A
2344N/A#
2344N/A# Include common rules.
2344N/A#
2344N/Ainclude $(UTSBASE)/sparc/Makefile.sparc
2344N/A
2344N/A#
2344N/A# lint pass one enforcement
2344N/A#
2344N/ACFLAGS += $(CCVERBOSE)
2344N/ACERRWARN += -_gcc=-Wno-uninitialized
2344N/A
2344N/A#
2344N/A# depends on misc/usba
2344N/A#
2344N/ALDFLAGS += -dy -Nmisc/usba
2344N/A
2344N/A#
2344N/A# Define targets
2344N/A#
2344N/AALL_TARGET = $(BINARY)
2344N/ALINT_TARGET = $(MODULE).lint
2344N/AINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
2344N/A
2344N/A.KEEP_STATE:
2344N/A
2344N/Aall: $(ALL_DEPS)
2344N/A
2344N/Adef: $(DEF_DEPS)
2344N/A
2344N/Aclean: $(CLEAN_DEPS)
2344N/A $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
2344N/A
2344N/Aclobber: $(CLOBBER_DEPS)
2344N/A $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
2344N/A
2344N/Alint: $(LINT_DEPS)
2344N/A
2344N/Amodlintlib: $(MODLINTLIB_DEPS)
2344N/A
2344N/Aclean.lint: $(CLEAN_LINT_DEPS)
2344N/A
2344N/Ainstall: $(INSTALL_DEPS)
2344N/A
2344N/A#
2344N/A# Include common targets.
2344N/A#
2344N/Ainclude $(UTSBASE)/sparc/Makefile.targ
2344N/A
2344N/A#
2344N/A# Defines for local commands.
2344N/A#
2344N/AWARLOCK = warlock
2344N/AWLCC = wlcc
2344N/ATOUCH = touch
2344N/ATEST = test
2344N/A
2344N/A#
2344N/A# lock_lint rules
2344N/A#
2344N/AUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
2344N/AUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
2344N/AOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
2344N/AEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
2344N/A
2344N/Awarlock: $(WARLOCK_OK) warlock_with_usba
2344N/A
2344N/A$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/ugen.wlcmd warlock_ddi.files
2344N/A $(WARLOCK) -c $(WLCMD_DIR)/ugen.wlcmd $(WARLOCK_OUT) \
-l ../warlock/ddi_dki_impl.ll
$(TOUCH) $@
%.ll: $(UTSBASE)/common/io/usb/clients/ugen/%.c \
$(UTSBASE)/common/sys/usb/clients/ugen/ugend.h
$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
warlock_with_usba: $(WLCMD_DIR)/ugen_with_usba.wlcmd $(WARLOCK_OUT) \
usba_files ohci_files ehci_files uhci_files warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/ugen_with_usba.wlcmd \
$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
$(WARLOCK_OUT) \
-l ../warlock/ddi_dki_impl.ll
usba_files:
@cd ../usba;pwd; $(MAKE) warlock
uhci_files:
@cd ../uhci;pwd; $(MAKE) warlock
ohci_files:
@cd ../ohci;pwd; $(MAKE) warlock
ehci_files:
@cd ../ehci;pwd; $(MAKE) warlock
warlock_ddi.files:
cd ../warlock; pwd; $(MAKE) warlock