xref: /illumos-gate/usr/src/uts/i86xpv/isa/Makefile (revision 957246c9e6c47389c40079995d73eebcc659fb29)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# Copyright (c) 2018, Joyent, Inc.
27#
28#	This makefile drives the production of the ISA nexus driver
29#
30#	i86xpv implementation architecture dependent
31#
32
33#
34#	Path to the base of the uts directory tree (usually /usr/src/uts).
35#
36UTSBASE	= ../..
37
38#
39#	Define the module and object file sets.
40#
41MODULE		= isa
42OBJECTS		= $(ISANEXUS_OBJS:%=$(OBJS_DIR)/%)
43ROOTMODULE	= $(ROOT_PSM_DRV_DIR)/$(MODULE)
44INC_PATH        += -I$(UTSBASE)/i86pc/sys/acpi
45
46#
47#	Include common rules.
48#
49include $(UTSBASE)/i86xpv/Makefile.i86xpv
50
51#
52#	Define targets
53#
54ALL_TARGET	= $(BINARY)
55INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
56
57$(OBJS_DIR)/isa.o :=	CERRWARN	+= -_gcc=-Wno-unused-function
58
59# needs work
60$(OBJS_DIR)/i8237A.o := SMOFF += indenting
61
62#
63# For now, disable these warnings; maintainers should endeavor
64# to investigate and remove these for maximum coverage.
65# Please do not carry these forward to new Makefiles.
66#
67CFLAGS		+= $(CCVERBOSE)
68CERRWARN	+= -_gcc=-Wno-unused-variable
69
70#
71#       Dependency
72LDFLAGS         += -Nmisc/acpica -Nmisc/busra -Nmisc/pci_autoconfig
73
74#
75# Define our version of dma_engine and i8237A interfaces
76#
77$(OBJECTS)	:= CPPFLAGS += -Di_dmae_init=$(MODULE)_i_dmae_init
78$(OBJECTS)	:= CPPFLAGS += -Di_dmae_acquire=$(MODULE)_i_dmae_acquire
79$(OBJECTS)	:= CPPFLAGS += -Di_dmae_free=$(MODULE)_i_dmae_free
80$(OBJECTS)	:= CPPFLAGS += -Di_dmae_get_best_mode=$(MODULE)_i_dmae_get_best_mode
81$(OBJECTS)	:= CPPFLAGS += -D_dmae_nxcookie=$(MODULE)__dmae_nxcookie
82$(OBJECTS)	:= CPPFLAGS += -Di_dmae_prog=$(MODULE)_i_dmae_prog
83$(OBJECTS)	:= CPPFLAGS += -Di_dmae_swsetup=$(MODULE)_i_dmae_swsetup
84$(OBJECTS)	:= CPPFLAGS += -Di_dmae_swsetup=$(MODULE)_i_dmae_swsetup
85$(OBJECTS)	:= CPPFLAGS += -Di_dmae_swstart=$(MODULE)_i_dmae_swstart
86$(OBJECTS)	:= CPPFLAGS += -Di_dmae_stop=$(MODULE)_i_dmae_stop
87$(OBJECTS)	:= CPPFLAGS += -Di_dmae_enable=$(MODULE)_i_dmae_enable
88$(OBJECTS)	:= CPPFLAGS += -Di_dmae_disable=$(MODULE)_i_dmae_disable
89$(OBJECTS)	:= CPPFLAGS += -Di_dmae_get_chan_stat=$(MODULE)_i_dmae_get_chan_stat
90$(OBJECTS)	:= CPPFLAGS += -Dd37A_init=$(MODULE)_d37A_init
91$(OBJECTS)	:= CPPFLAGS += -Dd37A_dma_valid=$(MODULE)_d37A_dma_valid
92$(OBJECTS)	:= CPPFLAGS += -Dd37A_dma_release=$(MODULE)_d37A_dma_release
93$(OBJECTS)	:= CPPFLAGS += -Dd37A_dma_disable=$(MODULE)_d37A_dma_disable
94$(OBJECTS)	:= CPPFLAGS += -Dd37A_dma_enable=$(MODULE)_d37A_dma_enable
95$(OBJECTS)	:= CPPFLAGS += -Dd37A_get_best_mode=$(MODULE)_d37A_get_best_mode
96$(OBJECTS)	:= CPPFLAGS += -Dd37A_intr=$(MODULE)_d37A_intr
97$(OBJECTS)	:= CPPFLAGS += -DdEISA_setchain=$(MODULE)_dEISA_setchain
98$(OBJECTS)	:= CPPFLAGS += -Dd37A_prog_chan=$(MODULE)_d37A_prog_chan
99$(OBJECTS)	:= CPPFLAGS += -Dd37A_dma_swsetup=$(MODULE)_d37A_dma_swsetup
100$(OBJECTS)	:= CPPFLAGS += -Dd37A_dma_swstart=$(MODULE)_d37A_dma_swstart
101$(OBJECTS)	:= CPPFLAGS += -Dd37A_dma_stop=$(MODULE)_d37A_dma_stop
102$(OBJECTS)	:= CPPFLAGS += -Dd37A_get_chan_stat=$(MODULE)_d37A_get_chan_stat
103$(OBJECTS)	:= CPPFLAGS += -Dd37A_set_mode=$(MODULE)_d37A_set_mode
104$(OBJECTS)	:= CPPFLAGS += -Dd37A_write_addr=$(MODULE)_d37A_write_addr
105$(OBJECTS)	:= CPPFLAGS += -Dd37A_read_addr=$(MODULE)_d37A_read_addr
106$(OBJECTS)	:= CPPFLAGS += -Dd37A_write_count=$(MODULE)_d37A_write_count
107$(OBJECTS)	:= CPPFLAGS += -Dd37A_read_count=$(MODULE)_d37A_read_count
108
109#
110#	Default build targets.
111#
112.KEEP_STATE:
113
114def:		$(DEF_DEPS)
115
116all:		$(ALL_DEPS)
117
118clean:		$(CLEAN_DEPS)
119
120clobber:	$(CLOBBER_DEPS)
121
122install:	$(INSTALL_DEPS)
123
124#
125#	Include common targets.
126#
127include $(UTSBASE)/i86xpv/Makefile.targ
128