2 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
3 # Copyright (c) 2018, Joyent, Inc.
9 # Copyright (c) 2007, The Storage Networking Industry Association.
11 # Redistribution and use in source and binary forms, with or without
12 # modification, are permitted provided that the following conditions
14 # - Redistributions of source code must retain the above copyright
15 # notice, this list of conditions and the following disclaimer.
17 # - Redistributions in binary form must reproduce the above copyright
18 # notice, this list of conditions and the following disclaimer in
19 # the documentation and/or other materials provided with the
22 # - Neither the name of The Storage Networking Industry Association (SNIA)
23 # nor the names of its contributors may be used to endorse or promote
24 # products derived from this software without specific prior written
27 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 # POSSIBILITY OF SUCH DAMAGE.
41 include $(SRC
)/cmd
/Makefile.cmd
46 include $(NDMP_DIR
)/Makefile.rpcgen
49 CPPFLAGS
+= $(LFLAGS64
)
52 CPPFLAGS
+= -I.
-Iinclude
59 CERRWARN
+= -Wno-unused-variable
60 CERRWARN
+= -Wno-switch
61 CERRWARN
+= -Wno-uninitialized
62 CERRWARN
+= -Wno-address
64 LDLIBS
+= -lzfs
-lsec
-lndmp
-lmd5
-lnvpair
-lumem
-lgen
-lcmdutils
-linetutil
67 $(NDMP_DIR
)/ndmp_xdr.o \
68 $(NDMP_OBJ
:%.o
=$(NDMP_DIR
)/%.o
) $(TLM_OBJ
:%.o
=$(TLM_DIR
)/%.o
)
100 tlm_restore_writer.o \
105 SRCS
= $(NDMP_OBJ
:%.o
=$(NDMP_DIR
)/%.c
) $(TLM_OBJ
:%.o
=$(TLM_DIR
)/%.c
)
108 $(ROOTSVCMETHOD
) := FILEMODE
= 0555
111 ROOTMANIFESTDIR
= $(ROOTSVCSYSTEM
)
112 $(ROOTMANIFEST
) := FILEMODE
= 444
114 ROOTNDMPDDIR
= $(ROOTLIB
)/ndmp
115 ROOTNDMPDFILE
= $(PROG
:%=$(ROOTNDMPDDIR
)/%)
118 $(ROOTNDMPDFILE
):= FILEMODE
= 0555
130 install: all $(ROOTNDMPDDIR
) $(ROOTNDMPDFILE
) $(ROOTSVCMETHOD
) $(ROOTMANIFEST
)
132 check: $(CHKMANIFEST
)
137 $(LINK.c
) -o
$@
$(OBJS
) $(LDLIBS
)
140 $(NDMP_DIR
)/%.o
: $(NDMP_DIR
)/%.c
141 $(COMPILE.c
) -o
$@
$<
143 $(TLM_DIR
)/%.o
: $(TLM_DIR
)/%.c
144 $(COMPILE.c
) -o
$@
$<
148 rm -f
$(NDMP_DIR
)/*.o
$(TLM_DIR
)/*.o
150 include $(SRC
)/cmd
/Makefile.targ