xref: /illumos-gate/usr/src/uts/intel/acpica/Makefile (revision c3937c08b16d32677a7dc955a81325f2e7a61b5d)
1#
2# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5# Copyright (c) 2018, Joyent, Inc.
6#
7#
8#	This makefile drives the production of the ACPI CA services
9#	kernel module.
10#
11#	intel architecture dependent
12#
13
14#
15#	Path to the base of the uts directory tree (usually /usr/src/uts).
16#
17UTSBASE		= ../..
18
19#
20#	Define the module and object file sets.
21#
22MODULE		= acpica
23OBJECTS		= $(ACPICA_OBJS:%=$(OBJS_DIR)/%)
24LINTS		= $(ACPICA_OBJS:%.o=$(LINTS_DIR)/%.ln)
25ROOTMODULE	= $(ROOT_MISC_DIR)/$(MODULE)
26INC_PATH        += -I$(UTSBASE)/intel/sys/acpi
27INC_PATH	+= -I$(UTSBASE)/i86pc
28INC_PATH	+= -I$(SRC)/common
29
30#
31#	Include common rules.
32#
33include $(UTSBASE)/intel/Makefile.intel
34
35#
36#	Define targets
37#
38ALL_TARGET	= $(BINARY) $(CONFMOD)
39LINT_TARGET	= $(MODULE).lint
40INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
41
42#
43#	Overrides.
44#
45DEBUG_DEFS	+= $(DEBUG_FLGS)
46
47#
48# lint pass one non-enforcement
49#
50CFLAGS += $(CCVERBOSE) -DPWRDMN -DACPI_USE_LOCAL_CACHE -DACPI_DEBUG_OUTPUT
51
52#
53# 3rd party code is not lint clean
54#
55CERRWARN += -erroff=E_STATEMENT_NOT_REACHED
56
57SMOFF += all_func_returns
58
59LINTFLAGS += -errchk=%none
60LINTFLAGS += -errhdr=%none
61LINTFLAGS += -erroff=%all
62LINTFLAGS += -errwarn=%none
63
64CERRWARN	+= -_gcc=-Wno-unused-variable
65CERRWARN	+= -_gcc=-Wno-parentheses
66CERRWARN	+= $(CNOWARN_UNINIT)
67CERRWARN	+= -_gcc=-Wno-unused-function
68
69#
70#	Default build targets.
71#
72.KEEP_STATE:
73
74def:		$(DEF_DEPS)
75
76all:		$(ALL_DEPS)
77
78clean:		$(CLEAN_DEPS)
79
80clobber:	$(CLOBBER_DEPS)
81
82lint:		$(LINT_DEPS)
83
84modlintlib:	$(MODLINTLIB_DEPS)
85
86clean.lint:	$(CLEAN_LINT_DEPS)
87
88install:	$(INSTALL_DEPS)
89
90#
91#	Include common targets.
92#
93include $(UTSBASE)/intel/Makefile.targ
94