1a3114836SGerry Liu#
2a3114836SGerry Liu# CDDL HEADER START
3a3114836SGerry Liu#
4a3114836SGerry Liu# The contents of this file are subject to the terms of the
5a3114836SGerry Liu# Common Development and Distribution License (the "License").
6a3114836SGerry Liu# You may not use this file except in compliance with the License.
7a3114836SGerry Liu#
8a3114836SGerry Liu# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9a3114836SGerry Liu# or http://www.opensolaris.org/os/licensing.
10a3114836SGerry Liu# See the License for the specific language governing permissions
11a3114836SGerry Liu# and limitations under the License.
12a3114836SGerry Liu#
13a3114836SGerry Liu# When distributing Covered Code, include this CDDL HEADER in each
14a3114836SGerry Liu# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15a3114836SGerry Liu# If applicable, add the following below this CDDL HEADER, with the
16a3114836SGerry Liu# fields enclosed by brackets "[]" replaced with your own identifying
17a3114836SGerry Liu# information: Portions Copyright [yyyy] [name of copyright owner]
18a3114836SGerry Liu#
19a3114836SGerry Liu# CDDL HEADER END
20a3114836SGerry Liu#
21a3114836SGerry Liu#
22a3114836SGerry Liu# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23a3114836SGerry Liu# Use is subject to license terms.
24a3114836SGerry Liu#
25a3114836SGerry Liu# Copyright (c) 2010, Intel Corporation.
26a3114836SGerry Liu# All rights reserved.
27a3114836SGerry Liu#
287b1019a6SJerry Jelinek# Copyright 2016 Joyent, Inc.
29fe7a23c8SAndy Fiddaman# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
307b1019a6SJerry Jelinek#
31a3114836SGerry Liu#	This makefile drives the production of the drmach_acpi loadable module.
32a3114836SGerry Liu#
33a3114836SGerry Liu#	i86pc architecture dependent
34a3114836SGerry Liu#
35a3114836SGerry Liu
36a3114836SGerry Liu#
37a3114836SGerry Liu#	Path to the base of the uts directory tree (usually /usr/src/uts).
38a3114836SGerry Liu#
39a3114836SGerry LiuUTSBASE	= ../..
40a3114836SGerry Liu
41a3114836SGerry Liu#
42a3114836SGerry Liu#	Define the module and object file sets.
43a3114836SGerry Liu#
44a3114836SGerry LiuMODULE		= drmach_acpi
45a3114836SGerry LiuOBJECTS		= $(DRMACH_ACPI_OBJS:%=$(OBJS_DIR)/%)
46a3114836SGerry LiuROOTMODULE	= $(ROOT_PSM_MISC_DIR)/$(MODULE)
47a3114836SGerry Liu
48a3114836SGerry Liu#
49a3114836SGerry Liu#	Include common rules.
50a3114836SGerry Liu#
51a3114836SGerry Liuinclude $(UTSBASE)/i86pc/Makefile.i86pc
52a3114836SGerry Liu
53a3114836SGerry Liu#
54a3114836SGerry Liu#	Define targets
55a3114836SGerry Liu#
56a3114836SGerry LiuALL_TARGET	= $(BINARY)
57a3114836SGerry LiuINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
58a3114836SGerry Liu
59a3114836SGerry Liu#
60a3114836SGerry Liu#	Overrides
61a3114836SGerry Liu#
62a3114836SGerry LiuDEF_BUILDS	= $(DEF_BUILDS64)
63a3114836SGerry LiuALL_BUILDS	= $(ALL_BUILDS64)
64a3114836SGerry Liu
657b1019a6SJerry Jelinek$(OBJS_DIR)/drmach_acpi.o :=	CERRWARN	+= -_gcc=-Wno-unused-function
667b1019a6SJerry Jelinek
67a3114836SGerry LiuCFLAGS += $(CCVERBOSE)
68a3114836SGerry Liu
69a3114836SGerry Liu#
70a3114836SGerry Liu# module dependencies
71a3114836SGerry Liu#
72*82d0151aSRichard LoweLDFLAGS += -Nmisc/acpica -Nmisc/acpidev
73a3114836SGerry Liu
74a3114836SGerry LiuCLEANFILES +=	$(DRMACH_GENERR)
75a3114836SGerry LiuCLEANFILES +=	$(DRMACH_IO)/drmach_err.c
76a3114836SGerry Liu
77a3114836SGerry Liu#
78a3114836SGerry Liu#	Default build targets.
79a3114836SGerry Liu#
80a3114836SGerry Liu.KEEP_STATE:
81a3114836SGerry Liu
82a3114836SGerry Liudef:		$(DEF_DEPS)
83a3114836SGerry Liu
84a3114836SGerry Liuall:		$(ALL_DEPS)
85a3114836SGerry Liu
8695cb2e31SToomas Soomeclean:		$(CLEAN_DEPS)
87a3114836SGerry Liu
8895cb2e31SToomas Soomeclobber:	$(CLOBBER_DEPS)
89a3114836SGerry Liu
90a3114836SGerry Liuinstall:	$(INSTALL_DEPS)
91a3114836SGerry Liu
92a3114836SGerry Liu#
93a3114836SGerry Liu#	Include common targets.
94a3114836SGerry Liu#
95a3114836SGerry Liuinclude $(UTSBASE)/i86pc/Makefile.targ
96