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 27# 28# This makefile drives the production of the generic 29# unix kernel module. 30# 31# sparc implementation architecture dependent 32# 33 34# 35# Path to the base of the uts directory tree (usually /usr/src/uts). 36# 37UTSBASE = ../.. 38 39# 40# Define the module and object file sets. 41# 42MODULE = genunix 43GENUNIX = $(OBJS_DIR)/$(MODULE) 44 45OBJECTS = $(GENUNIX_OBJS:%=$(OBJS_DIR)/%) \ 46 $(NOT_YET_KMODS:%=$(OBJS_DIR)/%) 47 48ROOTMODULE = $(ROOT_PSM_KERN_DIR)/$(MODULE) 49 50PLATFORM = sun4u 51LIBGEN = $(OBJS_DIR)/libgenunix.so 52LIBSTUBS = $(GENSTUBS_OBJS:%=$(OBJS_DIR)/%) 53 54# 55# Include common rules. 56# 57include $(UTSBASE)/sparc/Makefile.sparc 58 59# 60# Define targets 61# 62ALL_TARGET = $(LIBGEN) $(GENUNIX) 63INSTALL_TARGET = $(LIBGEN) $(GENUNIX) $(ROOTMODULE) 64 65# 66# Override defaults 67# 68CLEANFILES += $(LIBSTUBS) $(LIBGEN) 69 70BINARY = 71 72CLOBBERFILES += $(GENUNIX) 73 74# 75# Non-patch genunix builds merge a version of the ip module called ipctf. This 76# is to ensure that the common network-related types are included in genunix and 77# can thus be uniquified out of other modules. We don't want to do this for 78# patch builds, since we can't guarantee that ip and genunix will be in the same 79# patch. 80# 81IPCTF_TARGET = $(IPCTF) 82$(PATCH_BUILD)IPCTF_TARGET = 83 84# 85# 86# For now, disable these warnings; maintainers should endeavor 87# to investigate and remove these for maximum coverage. 88# Please do not carry these forward to new Makefiles. 89# 90# 91CFLAGS += $(CCVERBOSE) 92CERRWARN += -_gcc=-Wno-unused-label 93CERRWARN += -_gcc=-Wno-unused-variable 94CERRWARN += -_gcc=-Wno-unused-value 95CERRWARN += -_gcc=-Wno-unused-function 96CERRWARN += -_gcc=-Wno-parentheses 97CERRWARN += -_gcc=-Wno-switch 98CERRWARN += -_gcc=-Wno-type-limits 99CERRWARN += $(CNOWARN_UNINIT) 100CERRWARN += -_gcc=-Wno-clobbered 101CERRWARN += -_gcc=-Wno-empty-body 102 103CPPFLAGS += -I$(SRC)/common 104CPPFLAGS += -I$(SRC)/uts/common/fs/zfs 105 106INC_PATH += -I$(UTSBASE)/sun4 107 108# Default build targets. 109# 110.KEEP_STATE: 111 112.PARALLEL: $(LIBSTUBS) 113 114def: $(DEF_DEPS) 115 116all: $(ALL_DEPS) 117 118clean: $(CLEAN_DEPS) 119 120clobber: $(CLOBBER_DEPS) 121 122install: $(INSTALL_DEPS) 123 124install_h: 125 126 127$(LIBGEN): $(OBJECTS) $(LIBSTUBS) 128 $(BUILD.SO) $(OBJECTS) $(LIBSTUBS) 129 130$(IPCTF_TARGET) ipctf_target: FRC 131 @cd $(IPDRV_DIR); pwd; $(MAKE) ipctf.$(OBJS_DIR) 132 @pwd 133 134$(GENUNIX): $(IPCTF_TARGET) $(OBJECTS) 135 $(LD) -r $(LDFLAGS) -o $@ $(OBJECTS) 136 $(CTFMERGE_GENUNIX_MERGE) 137 $(POST_PROCESS) 138 139$(OBJECTS): $(OBJS_DIR) 140 141# 142# Include common targets. 143# 144include $(UTSBASE)/sparc/Makefile.targ 145 146# 147# Include sun4u workarounds. 148# 149include $(UTSBASE)/sun4u/Makefile.workarounds 150 151ALL_DEFS += $(WORKAROUND_DEFS) 152