1fa9e4066Sahrens# 2fa9e4066Sahrens# CDDL HEADER START 3fa9e4066Sahrens# 4fa9e4066Sahrens# The contents of this file are subject to the terms of the 5f808c858Sraf# Common Development and Distribution License (the "License"). 6f808c858Sraf# You may not use this file except in compliance with the License. 7fa9e4066Sahrens# 8fa9e4066Sahrens# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9fa9e4066Sahrens# or http://www.opensolaris.org/os/licensing. 10fa9e4066Sahrens# See the License for the specific language governing permissions 11fa9e4066Sahrens# and limitations under the License. 12fa9e4066Sahrens# 13fa9e4066Sahrens# When distributing Covered Code, include this CDDL HEADER in each 14fa9e4066Sahrens# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15fa9e4066Sahrens# If applicable, add the following below this CDDL HEADER, with the 16fa9e4066Sahrens# fields enclosed by brackets "[]" replaced with your own identifying 17fa9e4066Sahrens# information: Portions Copyright [yyyy] [name of copyright owner] 18fa9e4066Sahrens# 19fa9e4066Sahrens# CDDL HEADER END 20fa9e4066Sahrens# 21fa9e4066Sahrens# 2299d5e173STim Haley# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 2388f61deeSIgor Kozhukhov# Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com> 24591e0e13SSebastien Roy# Copyright (c) 2011, 2017 by Delphix. All rights reserved. 25d8ab6e12SDon Brady# Copyright 2020 Joyent, Inc. 26fa9e4066Sahrens# 27fa9e4066Sahrens 28fa9e4066SahrensLIBRARY= libzfs.a 29fa9e4066SahrensVERS= .1 30fa9e4066Sahrens 31069f55e2SEric SchrockOBJS_SHARED= \ 32ad135b5dSChristopher Siden zfeature_common.o \ 33069f55e2SEric Schrock zfs_comutil.o \ 34069f55e2SEric Schrock zfs_deleg.o \ 35069f55e2SEric Schrock zfs_fletcher.o \ 36069f55e2SEric Schrock zfs_namecheck.o \ 37069f55e2SEric Schrock zfs_prop.o \ 38069f55e2SEric Schrock zpool_prop.o \ 39069f55e2SEric Schrock zprop_common.o 40069f55e2SEric Schrock 41069f55e2SEric SchrockOBJS_COMMON= \ 42069f55e2SEric Schrock libzfs_changelist.o \ 43069f55e2SEric Schrock libzfs_config.o \ 44eb633035STom Caputi libzfs_crypto.o \ 45069f55e2SEric Schrock libzfs_dataset.o \ 4699d5e173STim Haley libzfs_diff.o \ 47069f55e2SEric Schrock libzfs_fru.o \ 48069f55e2SEric Schrock libzfs_import.o \ 4919b94df9SMatthew Ahrens libzfs_iter.o \ 50069f55e2SEric Schrock libzfs_mount.o \ 51069f55e2SEric Schrock libzfs_pool.o \ 52069f55e2SEric Schrock libzfs_sendrecv.o \ 53069f55e2SEric Schrock libzfs_status.o \ 54591e0e13SSebastien Roy libzfs_util.o \ 55591e0e13SSebastien Roy libzfs_taskq.o 56069f55e2SEric Schrock 57fa9e4066SahrensOBJECTS= $(OBJS_COMMON) $(OBJS_SHARED) 58fa9e4066Sahrens 59fa9e4066Sahrensinclude ../../Makefile.lib 60fa9e4066Sahrens 61*bbf21555SRichard Lowe# libzfs must be installed in the root filesystem for mount(8) 6264dbca9eSeschrockinclude ../../Makefile.rootfs 6364dbca9eSeschrock 645801b0f0SToomas SoomeLIBS= $(DYNLIB) 65fa9e4066Sahrens 66f808c858SrafSRCDIR = ../common 67f808c858Sraf 68fa9e4066SahrensINCS += -I$(SRCDIR) 69fa9e4066SahrensINCS += -I../../../uts/common/fs/zfs 70fa9e4066SahrensINCS += -I../../../common/zfs 714f67d755SEric TaylorINCS += -I../../libc/inc 72d8ab6e12SDon BradyINCS += -I../../libzutil/common 73fa9e4066Sahrens 74bd0ce624SYuri PankovCSTD= $(CSTD_GNU99) 75681d9761SEric TaylorLDLIBS += -lc -lm -ldevid -lgen -lnvpair -luutil -lavl -lefi \ 76d8ab6e12SDon Brady -lidmap -ltsol -lcryptoutil -lpkcs11 -lmd -lumem -lzfs_core \ 77d8ab6e12SDon Brady -ldevinfo -lzutil 7899d5e173STim HaleyCPPFLAGS += $(INCS) -D_LARGEFILE64_SOURCE=1 -D_REENTRANT 797c13517fSSerapheim Dimitropoulos$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG 80fa9e4066Sahrens 8105ede3dbSJohn Levon# not linted 8205ede3dbSJohn LevonSMATCH=off 8305ede3dbSJohn Levon 845801b0f0SToomas SoomeLDLIBS += -lz 855801b0f0SToomas SoomeNATIVE_LIBS += libz.so 864ba5b961SDan Kimmel 87fa9e4066SahrensSRCS= $(OBJS_COMMON:%.o=$(SRCDIR)/%.c) \ 88fa9e4066Sahrens $(OBJS_SHARED:%.o=$(SRC)/common/zfs/%.c) 89eb633035STom Caputi 90fa9e4066Sahrens.KEEP_STATE: 91fa9e4066Sahrens 92fa9e4066Sahrensall: $(LIBS) 93fa9e4066Sahrens 94fa9e4066Sahrenspics/%.o: ../../../common/zfs/%.c 95fa9e4066Sahrens $(COMPILE.c) -o $@ $< 96fa9e4066Sahrens $(POST_PROCESS_O) 97fa9e4066Sahrens 98fa9e4066Sahrensinclude ../../Makefile.targ 99