a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# CDDL HEADER START
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# The contents of this file are subject to the terms of the
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Common Development and Distribution License (the "License").
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# You may not use this file except in compliance with the License.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# or http://www.opensolaris.org/os/licensing.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# See the License for the specific language governing permissions
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# and limitations under the License.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# When distributing Covered Code, include this CDDL HEADER in each
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# If applicable, add the following below this CDDL HEADER, with the
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# fields enclosed by brackets "[]" replaced with your own identifying
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# information: Portions Copyright [yyyy] [name of copyright owner]
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# CDDL HEADER END
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Use is subject to license terms.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Copyright (c) 2010, Intel Corporation.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# All rights reserved.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek# Copyright 2016 Joyent, Inc.
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# This makefile drives the production of the drmach_acpi loadable module.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# i86pc architecture dependent
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Path to the base of the uts directory tree (usually /usr/src/uts).
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuUTSBASE = ../..
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Define the module and object file sets.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuMODULE = drmach_acpi
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuOBJECTS = $(DRMACH_ACPI_OBJS:%=$(OBJS_DIR)/%)
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuLINTS = $(DRMACH_ACPI_OBJS:%.o=$(LINTS_DIR)/%.ln)
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Include common rules.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liuinclude $(UTSBASE)/i86pc/Makefile.i86pc
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Define targets
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuALL_TARGET = $(BINARY)
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuLINT_TARGET = $(MODULE).lint
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Overrides
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuDEF_BUILDS = $(DEF_BUILDS64)
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuALL_BUILDS = $(ALL_BUILDS64)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek$(OBJS_DIR)/drmach_acpi.o := CERRWARN += -_gcc=-Wno-unused-function
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# lint pass one enforcement
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuCFLAGS += $(CCVERBOSE)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# module dependencies
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuLDFLAGS += -dy -Nmisc/acpica -Nmisc/acpidev
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuCLEANFILES += $(DRMACH_GENERR)
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuCLEANFILES += $(DRMACH_IO)/drmach_err.c
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Default build targets.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu.KEEP_STATE:
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liudef: $(DEF_DEPS)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liuall: $(ALL_DEPS)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon Ross# This build only 64-bit, but the lint32 below
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon Ross# needs corresponding clean/clobber deps.
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon Rossclean: $(CLEAN_DEPS) clean.debug32
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon Rossclobber: $(CLOBBER_DEPS) clobber.debug32
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liulint: $(LINT_DEPS)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liumodlintlib: $(MODLINTLIB_DEPS) lint32
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liuclean.lint: $(CLEAN_LINT_DEPS)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liuinstall: $(INSTALL_DEPS)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Include common targets.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liuinclude $(UTSBASE)/i86pc/Makefile.targ