Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# CDDL HEADER START
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# The contents of this file are subject to the terms of the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Common Development and Distribution License (the "License").
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# You may not use this file except in compliance with the License.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# or http://www.opensolaris.org/os/licensing.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# See the License for the specific language governing permissions
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# and limitations under the License.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# When distributing Covered Code, include this CDDL HEADER in each
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# If applicable, add the following below this CDDL HEADER, with the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# fields enclosed by brackets "[]" replaced with your own identifying
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# information: Portions Copyright [yyyy] [name of copyright owner]
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# CDDL HEADER END
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Use is subject to license terms.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# This makefile drives the production of the wc driver
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholes#
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholes# sparc architecture dependent
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Path to the base of the uts directory tree (usually /usr/src/uts).
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
892aaf5c314ef8e7b3ba53b5c5259b729f014bc1bnicholesUTSBASE = ../..
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Define the module and object file sets.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesMODULE = wc
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesOBJECTS = $(WC_OBJS:%=$(OBJS_DIR)/%)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesLINTS = $(WC_OBJS:%.o=$(LINTS_DIR)/%.ln)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesCONF_SRCDIR = $(UTSBASE)/sun/io
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesWARLOCK_OUT = $(WC_OBJS:%.o=%.ll)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesWARLOCK_OK = $(MODULE).ok
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesWLCMD_DIR = $(UTSBASE)/common/io/warlock
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Include common rules.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesinclude $(UTSBASE)/sparc/Makefile.sparc
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Define targets
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesALL_TARGET = $(BINARY) $(SRC_CONFILE)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesLINT_TARGET = $(MODULE).lint
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Override defaults to build a unique, local modstubs.o.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesMODSTUBS_DIR = $(OBJS_DIR)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes$(MODSTUBS_O) := AS_CPPFLAGS += -DWC_MODULE
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesCLEANFILES += $(MODSTUBS_O)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesCERRWARN += -_gcc=-Wno-uninitialized
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# lint pass one enforcement
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesCFLAGS += $(CCVERBOSE)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesLDFLAGS += -dy -Nmisc/tem -Ndacf/consconfig_dacf
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Default build targets.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes.KEEP_STATE:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesdef: $(DEF_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesall: $(ALL_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesclean: $(CLEAN_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesclobber: $(CLOBBER_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholeslint: $(LINT_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesmodlintlib: $(MODLINTLIB_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesclean.lint: $(CLEAN_LINT_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesinstall: $(INSTALL_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Include common targets.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesinclude $(UTSBASE)/sparc/Makefile.targ
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Defines for local commands
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesTEST = test
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesWLCC = wlcc
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesTOUCH = touch
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesWARLOCK = warlock
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# warlock targets
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
0a39e7683f6611d66c55712f50bb240428d832a1bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# vcons_conf.c is compiled to genunix, add it to WARLOCK_OUT
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesWARLOCK_OUT += vcons_conf.ll
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholeswarlock: $(WARLOCK_OUT) sdev_vtops.file warlock_ddi.files
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(WARLOCK) -c $(WLCMD_DIR)/wc.wlcmd $(WARLOCK_OUT) \
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes -l ../../sparc/warlock/ddi_dki_impl.ll
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(WARLOCK) -c $(WLCMD_DIR)/wc_devfs.wlcmd sdev_vtops.ll vcons_conf.ll \
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes -l ../../sparc/warlock/ddi_dki_impl.ll
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(TOUCH) $(WARLOCK_OK)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes%.ll: $(UTSBASE)/common/io/%.c
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholessdev_vtops.file:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(WLCC) $(CPPFLAGS) -DDEBUG -o sdev_vtops.ll -c \
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes ../../common/fs/dev/sdev_vtops.c
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholeswarlock_ddi.files:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes @cd ../../sparc/warlock; pwd; $(MAKE) warlock
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes