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# 28b6b206fcSJohn Levon# Copyright (c) 2018, Joyent, Inc. 29fe7a23c8SAndy Fiddaman# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. 30a3114836SGerry Liu 31a3114836SGerry Liu# 32a3114836SGerry Liu# Path to the base of the uts directory tree (usually /usr/src/uts). 33a3114836SGerry Liu# 34a3114836SGerry LiuUTSBASE = ../.. 35a3114836SGerry LiuPLATFORM = i86pc 36a3114836SGerry Liu 37a3114836SGerry Liu# 38a3114836SGerry Liu# Define the module and object file sets. 39a3114836SGerry Liu# 40a3114836SGerry LiuMODULE = dr 41a3114836SGerry LiuOBJECTS = $(DR_OBJS:%=$(OBJS_DIR)/%) 42a3114836SGerry LiuROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) 43a3114836SGerry LiuCONF_SRCDIR = $(UTSBASE)/i86pc/io/dr 44a3114836SGerry Liu 45a3114836SGerry Liu# 46a3114836SGerry Liu# Include common rules. 47a3114836SGerry Liu# 48a3114836SGerry Liuinclude $(UTSBASE)/i86pc/Makefile.i86pc 49a3114836SGerry Liu 50a3114836SGerry Liu# 51a3114836SGerry Liu# Define targets 52a3114836SGerry Liu# 53a3114836SGerry LiuALL_TARGET = $(BINARY) $(SRC_CONFILE) 54a3114836SGerry LiuINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 55a3114836SGerry Liu 56a3114836SGerry Liu# 57a3114836SGerry Liu# Overrides 58a3114836SGerry Liu# 59a3114836SGerry LiuDEF_BUILDS = $(DEF_BUILDS64) 60a3114836SGerry LiuALL_BUILDS = $(ALL_BUILDS64) 61a3114836SGerry Liu 62a3114836SGerry LiuCFLAGS += $(CCVERBOSE) 63a3114836SGerry Liu 647014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 65d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT) 667014882cSRichard LoweCERRWARN += -_gcc=-Wno-empty-body 67*cbb4f598SToomas SoomeCERRWARN += -_gcc=-Wno-array-bounds 687014882cSRichard Lowe 69b6b206fcSJohn Levon# needs work 70b6b206fcSJohn LevonSMOFF += index_overflow 71b6b206fcSJohn Levon 72a3114836SGerry Liu# 73a3114836SGerry Liu# module dependencies 74a3114836SGerry Liu# 7582d0151aSRichard LoweLDFLAGS += -Nmisc/drmach_acpi 76a3114836SGerry Liu 77a3114836SGerry LiuCLEANFILES += $(DR_GENERR) 78a3114836SGerry LiuCLEANFILES += $(DR_IO)/dr_err.c 79a3114836SGerry Liu 80a3114836SGerry Liu# 81a3114836SGerry Liu# Default build targets. 82a3114836SGerry Liu# 83a3114836SGerry Liu.KEEP_STATE: 84a3114836SGerry Liu 85a3114836SGerry Liudef: $(DEF_DEPS) 86a3114836SGerry Liu 87a3114836SGerry Liuall: $(ALL_DEPS) 88a3114836SGerry Liu 8995cb2e31SToomas Soomeclean: $(CLEAN_DEPS) 90a3114836SGerry Liu 9195cb2e31SToomas Soomeclobber: $(CLOBBER_DEPS) 92a3114836SGerry Liu 93a3114836SGerry Liuinstall: $(INSTALL_DEPS) $(CONF_INSTALL_DEPS) 94a3114836SGerry Liu 95a3114836SGerry Liu# 96a3114836SGerry Liu# Include common targets. 97a3114836SGerry Liu# 98a3114836SGerry Liuinclude $(UTSBASE)/i86pc/Makefile.targ 99