2 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
8 # Copyright (c) 2007, The Storage Networking Industry Association.
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted provided that the following conditions
13 # - Redistributions of source code must retain the above copyright
14 # notice, this list of conditions and the following disclaimer.
16 # - Redistributions in binary form must reproduce the above copyright
17 # notice, this list of conditions and the following disclaimer in
18 # the documentation and/or other materials provided with the
21 # - Neither the name of The Storage Networking Industry Association (SNIA)
22 # nor the names of its contributors may be used to endorse or promote
23 # products derived from this software without specific prior written
26 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
30 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 # POSSIBILITY OF SUCH DAMAGE.
40 include $(SRC
)/cmd
/Makefile.cmd
45 include $(NDMP_DIR
)/Makefile.rpcgen
48 CPPFLAGS
+= $(LFLAGS64
)
50 CPPFLAGS
+= -D_FILE_OFFSET_BITS
=64 -DDEBUG
51 CPPFLAGS
+= -I.
-Iinclude
53 C99MODE
= $(C99_ENABLE
)
55 CERRWARN
+= -Wno-unused-variable
56 CERRWARN
+= -Wno-switch
57 CERRWARN
+= -Wno-uninitialized
58 CERRWARN
+= -Wno-address
60 LDLIBS
+= -lzfs
-lsec
-lndmp
-lmd5
-lnvpair
-lumem
-lbsm
-lgen
-lcmdutils
-linetutil
63 $(NDMP_DIR
)/ndmp_xdr.o \
64 $(NDMP_OBJ
:%.o
=$(NDMP_DIR
)/%.o
) $(TLM_OBJ
:%.o
=$(TLM_DIR
)/%.o
)
96 tlm_restore_writer.o \
101 SRCS
= $(NDMP_OBJ
:%.o
=$(NDMP_DIR
)/%.c
) $(TLM_OBJ
:%.o
=$(TLM_DIR
)/%.c
)
104 $(ROOTSVCMETHOD
) := FILEMODE
= 0555
107 ROOTMANIFESTDIR
= $(ROOTSVCSYSTEM
)
108 $(ROOTMANIFEST
) := FILEMODE
= 444
110 ROOTNDMPDDIR
= $(ROOTLIB
)/ndmp
111 ROOTNDMPDFILE
= $(PROG
:%=$(ROOTNDMPDDIR
)/%)
114 $(ROOTNDMPDFILE
):= FILEMODE
= 0555
126 install: all $(ROOTNDMPDDIR
) $(ROOTNDMPDFILE
) $(ROOTSVCMETHOD
) $(ROOTMANIFEST
)
128 check: $(CHKMANIFEST
)
133 $(LINK.c
) -o
$@
$(OBJS
) $(LDLIBS
)
136 $(NDMP_DIR
)/%.o
: $(NDMP_DIR
)/%.c
137 $(COMPILE.c
) -o
$@
$<
139 $(TLM_DIR
)/%.o
: $(TLM_DIR
)/%.c
140 $(COMPILE.c
) -o
$@
$<
144 rm -f
$(NDMP_DIR
)/*.o
$(TLM_DIR
)/*.o
146 include $(SRC
)/cmd
/Makefile.targ