summaryrefslogtreecommitdiffstats
path: root/cddl/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'cddl/usr.bin')
-rw-r--r--cddl/usr.bin/Makefile24
-rw-r--r--cddl/usr.bin/Makefile.inc5
-rw-r--r--cddl/usr.bin/ctfconvert/Makefile42
-rw-r--r--cddl/usr.bin/ctfconvert/ctfconvert.185
-rw-r--r--cddl/usr.bin/ctfdump/Makefile23
-rw-r--r--cddl/usr.bin/ctfdump/ctfdump.183
-rw-r--r--cddl/usr.bin/ctfmerge/Makefile39
-rw-r--r--cddl/usr.bin/ctfmerge/ctfmerge.1120
-rw-r--r--cddl/usr.bin/sgsmsg/Makefile17
-rw-r--r--cddl/usr.bin/zinject/Makefile26
-rw-r--r--cddl/usr.bin/zlook/Makefile25
-rw-r--r--cddl/usr.bin/zstreamdump/Makefile27
-rw-r--r--cddl/usr.bin/ztest/Makefile31
13 files changed, 547 insertions, 0 deletions
diff --git a/cddl/usr.bin/Makefile b/cddl/usr.bin/Makefile
new file mode 100644
index 0000000..13d3a86
--- /dev/null
+++ b/cddl/usr.bin/Makefile
@@ -0,0 +1,24 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+SUBDIR= \
+ ctfconvert \
+ ctfdump \
+ ctfmerge \
+ sgsmsg \
+ ${_zinject} \
+ ${_zlook} \
+ ${_zstreamdump} \
+ ${_ztest}
+
+.if ${MK_ZFS} != "no"
+_zinject= zinject
+#_zlook= zlook
+.if ${MK_LIBTHR} != "no"
+_ztest= ztest
+_zstreamdump = zstreamdump
+.endif
+.endif
+
+.include <bsd.subdir.mk>
diff --git a/cddl/usr.bin/Makefile.inc b/cddl/usr.bin/Makefile.inc
new file mode 100644
index 0000000..4cec6fe
--- /dev/null
+++ b/cddl/usr.bin/Makefile.inc
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+BINDIR?= /usr/bin
+
+.include "../Makefile.inc"
diff --git a/cddl/usr.bin/ctfconvert/Makefile b/cddl/usr.bin/ctfconvert/Makefile
new file mode 100644
index 0000000..7e4a05a
--- /dev/null
+++ b/cddl/usr.bin/ctfconvert/Makefile
@@ -0,0 +1,42 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt
+
+DEBUG_FLAGS= -g
+
+PROG= ctfconvert
+SRCS= alist.c \
+ ctf.c \
+ ctfconvert.c \
+ dwarf.c \
+ fixup_tdescs.c \
+ hash.c \
+ iidesc.c \
+ input.c \
+ list.c \
+ memory.c \
+ merge.c \
+ output.c \
+ st_parse.c \
+ stabs.c \
+ stack.c \
+ strtab.c \
+ symbol.c \
+ tdata.c \
+ traverse.c \
+ util.c
+
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
+ -I${.CURDIR}/../../../cddl/compat/opensolaris/include \
+ -I${OPENSOLARIS_USR_DISTDIR} \
+ -I${OPENSOLARIS_SYS_DISTDIR} \
+ -I${OPENSOLARIS_USR_DISTDIR}/head \
+ -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common \
+ -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt \
+ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common
+
+DPADD= ${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD}
+LDADD= -lctf -ldwarf -lelf -lz -lpthread
+
+.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/ctfconvert/ctfconvert.1 b/cddl/usr.bin/ctfconvert/ctfconvert.1
new file mode 100644
index 0000000..4de07ec
--- /dev/null
+++ b/cddl/usr.bin/ctfconvert/ctfconvert.1
@@ -0,0 +1,85 @@
+.\"
+.\" Copyright (c) 2010 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This software was developed by Rui Paulo under sponsorship from the
+.\" FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 7, 2010
+.Dt CTFCONVERT 1
+.Os
+.Sh NAME
+.Nm ctfconvert
+.Nd convert debug data to CTF data
+.Sh SYNOPSIS
+.Nm
+.Op Fl gis
+.Fl l Ar label
+.Fl L Ar labelenv
+.Op Fl o Ar outfile
+object_file
+.Sh DESCRIPTION
+The
+.Nm
+utility converts debug information from a binary file to CTF data and replaces
+the debug section of that file with a CTF section called SUNW_ctf.
+This new section is added to the input file, unless the -o
+option is present.
+You can also opt to keep the original debugging section with the
+-g option.
+.Pp
+The following options are available:
+.Bl -tag -width indent
+.It Fl l Ar label
+Sets the label as
+.Ar label .
+.It Fl L Ar labelenv
+Instructs
+.Nm
+to read the label from the environment variable
+.Ar labelenv .
+.It Fl g
+Don't delete the original debugging section.
+.It Fl i
+Ignore object files built from other languages than C.
+.It Fl s
+Use the .dynsym ELF section instead of the .symtab ELF section.
+.It Fl o Ar outfile
+Write the output to file in
+.Ar outfile .
+.El
+.Sh EXIT STATUS
+.Ex -std
+.Sh SEE ALSO
+.Xr ctfmerge 1 ,
+.Xr ctfdump 1
+.Sh HISTORY
+The
+.Nm
+utility first appeared in
+.Fx 7.0 .
+.Sh AUTHORS
+The CTF utilities came from OpenSolaris.
diff --git a/cddl/usr.bin/ctfdump/Makefile b/cddl/usr.bin/ctfdump/Makefile
new file mode 100644
index 0000000..e87e7a0
--- /dev/null
+++ b/cddl/usr.bin/ctfdump/Makefile
@@ -0,0 +1,23 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/dump
+
+PROG= ctfdump
+SRCS= dump.c \
+ symbol.c \
+ utils.c
+
+CFLAGS+= -I${OPENSOLARIS_USR_DISTDIR} \
+ -I${OPENSOLARIS_SYS_DISTDIR} \
+ -I${OPENSOLARIS_USR_DISTDIR}/head \
+ -I${OPENSOLARIS_USR_DISTDIR}/cmd/mdb/tools/common \
+ -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
+ -I${.CURDIR}/../../../cddl/compat/opensolaris/include \
+ -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common \
+ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common
+
+DPADD= ${LIBPTHREAD} ${LIBELF} ${LIBZ}
+LDADD= -lpthread -lelf -lz
+
+.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/ctfdump/ctfdump.1 b/cddl/usr.bin/ctfdump/ctfdump.1
new file mode 100644
index 0000000..d64a88a
--- /dev/null
+++ b/cddl/usr.bin/ctfdump/ctfdump.1
@@ -0,0 +1,83 @@
+.\"
+.\" Copyright (c) 2010 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This software was developed by Rui Paulo under sponsorship from the
+.\" FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 7, 2010
+.Dt CTFDUMP 1
+.Os
+.Sh NAME
+.Nm ctfdump
+.Nd dump the SUNW_ctf section of an ELF file
+.Sh SYNOPSIS
+.Nm
+.Op Fl dfhlsSt
+.Fl u Ar file
+file
+.Sh DESCRIPTION
+The
+.Nm
+utility dumps the contents of the CTF data section (SUNW_ctf) present in
+an ELF binary file.
+This section was previously created with
+.Xr ctfconvert 1
+or
+.Xr ctfmerge 1 .
+.Pp
+The following options are available:
+.Bl -tag -width indent
+.It Fl d
+Show the data object section.
+.It Fl f
+Show the function section.
+.It Fl h
+Show the header.
+.It Fl l
+Show the label section.
+.It Fl s
+Show the string table.
+.It Fl S
+Show statistics.
+.It Fl t
+Show the type section.
+.It Fl u Ar ufile
+Write the uncompressed CTF data to a raw CTF file called
+.Ar ufile .
+.El
+.Sh EXIT STATUS
+.Ex -std
+.Sh SEE ALSO
+.Xr ctfconvert 1 ,
+.Xr ctfmerge 1
+.Sh HISTORY
+The
+.Nm
+utility first appeared in
+.Fx 7.0 .
+.Sh AUTHORS
+The CTF utilities came from OpenSolaris.
diff --git a/cddl/usr.bin/ctfmerge/Makefile b/cddl/usr.bin/ctfmerge/Makefile
new file mode 100644
index 0000000..ba4840e
--- /dev/null
+++ b/cddl/usr.bin/ctfmerge/Makefile
@@ -0,0 +1,39 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt
+
+PROG= ctfmerge
+SRCS= alist.c \
+ barrier.c \
+ ctf.c \
+ ctfmerge.c \
+ fifo.c \
+ hash.c \
+ iidesc.c \
+ input.c \
+ list.c \
+ memory.c \
+ merge.c \
+ output.c \
+ strtab.c \
+ symbol.c \
+ tdata.c \
+ traverse.c \
+ util.c
+
+WARNS?= 1
+
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
+ -I${.CURDIR}/../../../cddl/compat/opensolaris/include \
+ -I${OPENSOLARIS_USR_DISTDIR} \
+ -I${OPENSOLARIS_SYS_DISTDIR} \
+ -I${OPENSOLARIS_USR_DISTDIR}/head \
+ -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common \
+ -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt \
+ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common
+
+DPADD= ${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD}
+LDADD= -lctf -ldwarf -lelf -lz -lpthread
+
+.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/ctfmerge/ctfmerge.1 b/cddl/usr.bin/ctfmerge/ctfmerge.1
new file mode 100644
index 0000000..7ebf7ee
--- /dev/null
+++ b/cddl/usr.bin/ctfmerge/ctfmerge.1
@@ -0,0 +1,120 @@
+.\"
+.\" Copyright (c) 2010 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This software was developed by Rui Paulo under sponsorship from the
+.\" FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 7, 2010
+.Dt CTFMERGE 1
+.Os
+.Sh NAME
+.Nm ctfmerge
+.Nd merge several CTF data sections into one
+.Sh SYNOPSIS
+.Nm
+.Op Fl fgstv
+.Fl l Ar label
+.Fl L Ar labelenv
+.Fl o Ar outfile
+file ...
+.Nm
+.Op Fl fgstv
+.Fl l Ar label
+.Fl L Ar labelenv
+.Fl o Ar outfile
+.Fl d Ar uniqfile
+.Op Fl g
+.Op Fl D Ar uniqlabel
+file ...
+.Nm
+.Op Fl fgstv
+.Fl l Ar label
+.Fl L Ar labelenv
+.Fl o Ar outfile
+.Fl w Ar withfile
+file ...
+.Nm
+.Op Fl g
+.Fl c Ar srcfile
+.Ar destfile
+.Sh DESCRIPTION
+The
+.Nm
+utility merges several CTF data sections from several files into one
+output file, unifying common data.
+.Pp
+The following options are available:
+.Bl -tag -width indent
+.It Fl f
+Match global symbols to global CTF data.
+.It Fl g
+Don't delete the original debugging sections.
+.It Fl s
+Use the .dynsym ELF section instead of the .symtab ELF section.
+.It Fl t
+Make sure that all object files have a CTF section.
+.It Fl v
+Enable verbose mode.
+.It Fl l Ar label
+Sets the label as
+.Ar label .
+.It Fl L Ar labelenv
+Instructs
+.Nm
+to read the label from the environment variable
+.Ar labelenv .
+.It Fl o Ar outfile
+Use
+.Ar outfile
+to store the merged CTF data.
+.It Fl d Ar uniqfile
+Uniquify against
+.Ar uniqfile .
+.It Fl d Ar uniqlabel
+Uniquify against label
+.Ar uniqlabel
+.It Fl w Ar withfile
+Additive merge with
+.Ar withfile .
+.It Fl c Ar srcfile Ar destfile
+Copy CTF data from
+.Ar srcfile
+into
+.Ar destfile .
+.El
+.Sh EXIT STATUS
+.Ex -std
+.Sh SEE ALSO
+.Xr ctfconvert 1 ,
+.Xr ctfdump 1
+.Sh HISTORY
+The
+.Nm
+utility first appeared in
+.Fx 7.0 .
+.Sh AUTHORS
+The CTF utilities came from OpenSolaris.
diff --git a/cddl/usr.bin/sgsmsg/Makefile b/cddl/usr.bin/sgsmsg/Makefile
new file mode 100644
index 0000000..8d1f70f
--- /dev/null
+++ b/cddl/usr.bin/sgsmsg/Makefile
@@ -0,0 +1,17 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/sgs/tools/common
+.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/avl
+
+# This program is required as a bootstrap tool for 'make buildworld'
+PROG= sgsmsg
+NO_MAN=
+SRCS= avl.c sgsmsg.c string_table.c findprime.c
+
+WARNS?= 0
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
+ -I${.CURDIR}/../../../cddl/compat/opensolaris/include \
+ -I${OPENSOLARIS_USR_DISTDIR}/cmd/sgs/include \
+ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common
+
+.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/zinject/Makefile b/cddl/usr.bin/zinject/Makefile
new file mode 100644
index 0000000..8c5c141
--- /dev/null
+++ b/cddl/usr.bin/zinject/Makefile
@@ -0,0 +1,26 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../contrib/opensolaris/cmd/zinject
+
+PROG= zinject
+SRCS= zinject.c translate.c
+NO_MAN=
+
+WARNS?= 0
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
+CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
+CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem
+CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzfs/common
+CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head
+CFLAGS+= -I${.CURDIR}/../../lib/libumem
+
+DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \
+ ${LIBZFS_CORE} ${LIBZFS} ${LIBZPOOL}
+LDADD= -lgeom -lm -lnvpair -lumem -luutil -lzfs_core -lzfs -lzpool
+
+.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/zlook/Makefile b/cddl/usr.bin/zlook/Makefile
new file mode 100644
index 0000000..0251f57
--- /dev/null
+++ b/cddl/usr.bin/zlook/Makefile
@@ -0,0 +1,25 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../contrib/opensolaris/cmd/zlook
+
+PROG= zlook
+NO_MAN=
+
+WARNS?= 0
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
+#CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
+#CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem
+#CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzfs/common
+#CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common
+#CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair
+#CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+#CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
+#CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head
+#CFLAGS+= -I${.CURDIR}/../../lib/libumem
+#
+#DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \
+# ${LIBZFS} ${LIBZPOOL}
+#LDADD= -lavl -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool
+
+.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/zstreamdump/Makefile b/cddl/usr.bin/zstreamdump/Makefile
new file mode 100644
index 0000000..304ff7c
--- /dev/null
+++ b/cddl/usr.bin/zstreamdump/Makefile
@@ -0,0 +1,27 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../..//contrib/opensolaris/cmd/zstreamdump
+
+PROG= zstreamdump
+MAN= zstreamdump.1
+
+WARNS?= 0
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
+CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
+CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem
+CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head
+CFLAGS+= -I${.CURDIR}/../../lib/libumem
+
+DPADD= ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \
+ ${LIBPTHREAD} ${LIBZ} ${LIBAVL}
+LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lz -lavl
+
+CSTD= c99
+
+.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/ztest/Makefile b/cddl/usr.bin/ztest/Makefile
new file mode 100644
index 0000000..965300e
--- /dev/null
+++ b/cddl/usr.bin/ztest/Makefile
@@ -0,0 +1,31 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../..//contrib/opensolaris/cmd/ztest
+
+PROG= ztest
+NO_MAN=
+
+WARNS?= 0
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
+CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
+CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem
+CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head
+CFLAGS+= -I${.CURDIR}/../../lib/libumem
+
+DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \
+ ${LIBPTHREAD} ${LIBAVL} ${LIBZFS_CORE} ${LIBZFS} ${LIBUUTIL}
+LDADD= -lgeom -lm -lnvpair -lumem -lzpool -lpthread -lavl -lzfs_core -lzfs \
+ -luutil
+
+CSTD= c99
+
+CFLAGS+= -DDEBUG=1
+#DEBUG_FLAGS+= -g
+
+.include <bsd.prog.mk>
OpenPOWER on IntegriCloud