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.
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.
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]
23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
26 # Copyright (c) 2018, Joyent, Inc.
29 # This makefile drives the production of the generic
32 # x86 implementation architecture dependent
36 # Path to the base of the uts directory tree (usually /usr/src/uts).
41 # Define the module and object file sets.
44 GENUNIX
= $(OBJS_DIR
)/$(MODULE
)
46 OBJECTS
= $(GENUNIX_OBJS
:%=$(OBJS_DIR
)/%) \
47 $(NOT_YET_KMODS
:%=$(OBJS_DIR
)/%)
49 ROOTMODULE
= $(ROOT_KERN_DIR
)/$(MODULE
)
51 LIBGEN
= $(OBJS_DIR
)/libgenunix.so
52 LIBSTUBS
= $(GENSTUBS_OBJS
:%=$(OBJS_DIR
)/%)
55 # Include common rules.
57 include $(UTSBASE
)/intel
/Makefile.intel
62 ALL_TARGET
= $(LIBGEN
) $(GENUNIX
)
63 INSTALL_TARGET
= $(LIBGEN
) $(GENUNIX
) $(ROOTMODULE
)
68 CLOBBERFILES
+= $(GENUNIX
)
69 CLEANFILES
+= $(LIBSTUBS
) $(LIBGEN
)
72 CPPFLAGS
+= -I
$(SRCTOP
)/include
73 CPPFLAGS
+= -I
$(SRC
)/common
74 CPPFLAGS
+= -I
$(SRCTOP
)/kernel
/fs
75 CPPFLAGS
+= -I
$(SRCTOP
)/kernel
/fs
/zfs
76 CPPFLAGS
+= -I
$(SRCTOP
)/arch
/x86
/kernel
/include
79 # For now, disable these compiler warnings; maintainers should endeavor to
80 # investigate and remove these for maximum coverage. Please do not carry
81 # these forward to new Makefiles.
84 CERRWARN
+= -Wno-unused-label
85 CERRWARN
+= -Wno-unused-variable
86 CERRWARN
+= -Wno-unused-value
87 CERRWARN
+= -Wno-unused-function
88 CERRWARN
+= -Wno-parentheses
89 CERRWARN
+= -Wno-switch
90 CERRWARN
+= -Wno-type-limits
91 CERRWARN
+= -Wno-uninitialized
92 CERRWARN
+= -Wno-clobbered
93 CERRWARN
+= -Wno-empty-body
96 SMOFF
+= index_overflow
97 $(OBJS_DIR
)/seg_vn.o
:= SMOFF
+= deref_check
98 $(OBJS_DIR
)/ddi_intr_irm.o
:= SMOFF
+= deref_check
101 SMOFF
+= signed
,indenting
,all_func_returns
102 $(OBJS_DIR
)/clock_highres.o
:= SMOFF
+= signed_integer_overflow_check
103 $(OBJS_DIR
)/evchannels.o
:= SMOFF
+= allocating_enough_data
104 $(OBJS_DIR
)/klpd.o
:= SMOFF
+= cast_assign
105 $(OBJS_DIR
)/lookup.o
:= SMOFF
+= strcpy_overflow
106 $(OBJS_DIR
)/process.o
:= SMOFF
+= or_vs_and
107 $(OBJS_DIR
)/sunpci.o
:= SMOFF
+= deref_check
108 $(OBJS_DIR
)/timers.o
:= SMOFF
+= signed_integer_overflow_check
111 $(OBJS_DIR
)/acl_common.o
:= SMOFF
+= or_vs_and
114 # Default build targets.
124 clobber: $(CLOBBER_DEPS
)
126 install: $(INSTALL_DEPS
)
128 $(LIBGEN
): $(GENUNIX
) $(LIBSTUBS
)
129 $(BUILD.SO
) $(GENUNIX
) $(LIBSTUBS
)
131 $(GENUNIX
): $(OBJECTS
)
132 $(LD
) -r
$(LDFLAGS
) -o
$@
$(OBJECTS
)
137 # Include common targets.
139 include $(UTSBASE
)/intel
/Makefile.targ
142 # Software workarounds for hardware "features".
144 include $(UTSBASE
)/i86pc
/Makefile.workarounds
146 ALL_DEFS
+= $(WORKAROUND_DEFS
)