Makefile.com revision f83b46baf98d276f5f84fa84c8b461f412ac1f5e
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# CDDL HEADER START
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# The contents of this file are subject to the terms of the
f808c858fa61e7769218966759510a8b1190dfcfraf# Common Development and Distribution License (the "License").
f808c858fa61e7769218966759510a8b1190dfcfraf# You may not use this file except in compliance with the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fa9e4066f08beec538e775443c5be79dd423fcabahrens# or http://www.opensolaris.org/os/licensing.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# See the License for the specific language governing permissions
fa9e4066f08beec538e775443c5be79dd423fcabahrens# and limitations under the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# When distributing Covered Code, include this CDDL HEADER in each
fa9e4066f08beec538e775443c5be79dd423fcabahrens# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# If applicable, add the following below this CDDL HEADER, with the
fa9e4066f08beec538e775443c5be79dd423fcabahrens# fields enclosed by brackets "[]" replaced with your own identifying
fa9e4066f08beec538e775443c5be79dd423fcabahrens# information: Portions Copyright [yyyy] [name of copyright owner]
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# CDDL HEADER END
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
3c112a2b34403220c06c3e2fcac403358cfba168Eric Taylor# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
f83b46baf98d276f5f84fa84c8b461f412ac1f5ePaul Dagnelie# Copyright (c) 2013, 2015 by Delphix. All rights reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensLIBRARY= libzpool.a
fa9e4066f08beec538e775443c5be79dd423fcabahrensVERS= .1
fa9e4066f08beec538e775443c5be79dd423fcabahrens
088e9d477eee66081e407fbc5a33c4da25f66f6aeschrock# include the list of ZFS sources
fa9e4066f08beec538e775443c5be79dd423fcabahrensinclude ../../../uts/common/Makefile.files
fa9e4066f08beec538e775443c5be79dd423fcabahrensKERNEL_OBJS = kernel.o taskq.o util.o
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew AhrensDTRACE_OBJS = zfs.o
fa9e4066f08beec538e775443c5be79dd423fcabahrens
3c112a2b34403220c06c3e2fcac403358cfba168Eric TaylorOBJECTS=$(ZFS_COMMON_OBJS) $(ZFS_SHARED_OBJS) $(KERNEL_OBJS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens# include library definitions
fa9e4066f08beec538e775443c5be79dd423fcabahrensinclude ../../Makefile.lib
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensZFS_COMMON_SRCS= $(ZFS_COMMON_OBJS:%.o=../../../uts/common/fs/zfs/%.c)
088e9d477eee66081e407fbc5a33c4da25f66f6aeschrockZFS_SHARED_SRCS= $(ZFS_SHARED_OBJS:%.o=../../../common/zfs/%.c)
fa9e4066f08beec538e775443c5be79dd423fcabahrensKERNEL_SRCS= $(KERNEL_OBJS:%.o=../common/%.c)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
3c112a2b34403220c06c3e2fcac403358cfba168Eric TaylorSRCS=$(ZFS_COMMON_SRCS) $(ZFS_SHARED_SRCS) $(KERNEL_SRCS)
fa9e4066f08beec538e775443c5be79dd423fcabahrensSRCDIR= ../common
fa9e4066f08beec538e775443c5be79dd423fcabahrens
f808c858fa61e7769218966759510a8b1190dfcfraf# There should be a mapfile here
f808c858fa61e7769218966759510a8b1190dfcfrafMAPFILES =
f808c858fa61e7769218966759510a8b1190dfcfraf
fa9e4066f08beec538e775443c5be79dd423fcabahrensLIBS += $(LINTLIB)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensINCS += -I../common
fa9e4066f08beec538e775443c5be79dd423fcabahrensINCS += -I../../../uts/common/fs/zfs
fa9e4066f08beec538e775443c5be79dd423fcabahrensINCS += -I../../../common/zfs
ecd6cf800b63704be73fb264c3f5b6e0dafc068dmarksINCS += -I../../../common
fa9e4066f08beec538e775443c5be79dd423fcabahrens
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew AhrensCLEANFILES += ../common/zfs.h
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon RossCLEANFILES += $(EXTPICS)
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew Ahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew Ahrens$(LINTLIB): ../common/zfs.h
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensC99MODE= -xc99=%all
fa9e4066f08beec538e775443c5be79dd423fcabahrensC99LMODE= -Xc99=%all
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensCFLAGS += -g $(CCVERBOSE) $(CNOGLOBAL)
fb09f5aad449c97fe309678f3f604982b563a96fMadhav SureshCFLAGS64 += -g $(CCVERBOSE) $(CNOGLOBAL)
3c112a2b34403220c06c3e2fcac403358cfba168Eric TaylorLDLIBS += -lcmdutils -lumem -lavl -lnvpair -lz -lc -lsysevent -lmd
fb09f5aad449c97fe309678f3f604982b563a96fMadhav SureshCPPFLAGS += $(INCS) -DDEBUG
fa9e4066f08beec538e775443c5be79dd423fcabahrens
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-parentheses
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-switch
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-type-limits
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-unused-variable
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-empty-body
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-unused-function
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-unused-label
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
fa9e4066f08beec538e775443c5be79dd423fcabahrens.KEEP_STATE:
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensall: $(LIBS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrenslint: $(LINTLIB)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensinclude ../../Makefile.targ
fa9e4066f08beec538e775443c5be79dd423fcabahrens
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew AhrensEXTPICS= $(DTRACE_OBJS:%=pics/%)
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew Ahrens
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew Ahrenspics/%.o: ../../../uts/common/fs/zfs/%.c ../common/zfs.h
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(COMPILE.c) -o $@ $<
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(POST_PROCESS_O)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew Ahrenspics/%.o: ../../../common/zfs/%.c ../common/zfs.h
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(COMPILE.c) -o $@ $<
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(POST_PROCESS_O)
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew Ahrens
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew Ahrenspics/%.o: ../common/%.d $(PICS)
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew Ahrens $(COMPILE.d) -C -s $< -o $@ $(PICS)
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew Ahrens $(POST_PROCESS_O)
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew Ahrens
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew Ahrens../common/%.h: ../common/%.d
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew Ahrens $(DTRACE) -xnolibs -h -s $< -o $@