1 #
2 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
3 #
4
5 #
6 # BSD 3 Clause License
7 #
8 # Copyright (c) 2007, The Storage Networking Industry Association.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted provided that the following conditions
12 # are met:
13 # - Redistributions of source code must retain the above copyright
14 # notice, this list of conditions and the following disclaimer.
15 #
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
19 # distribution.
20 #
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
49 CPPFLAGS += $(LFLAGS64)
50
51 CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DDEBUG
52 CPPFLAGS += -I. -Iinclude
53
54 CSTD = $(CSTD_GNU99)
55
56 # lint does not like unused _umem_*_init
57 LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
58
59 # function argument declared inconsistently
60 LINTFLAGS += -xerroff=E_INCONS_ARG_DECL2
61 # value type used inconsistently
62 LINTFLAGS += -xerroff=E_INCONS_VAL_TYPE_USED2
63 # value type declared inconsistently
64 LINTFLAGS += -xerroff=E_INCONS_VAL_TYPE_DECL2
65 # argument used inconsistently
66 LINTFLAGS += -xerroff=E_INCONS_ARG_USED2
67
68 CERRWARN += -_gcc=-Wno-unused-variable
69 CERRWARN += -_gcc=-Wno-switch
70 CERRWARN += -_gcc=-Wno-uninitialized
71 CERRWARN += -_gcc=-Wno-address
72
73 LDLIBS += -lsocket -lnsl -lzfs -lsec -lndmp -lmd5 -lnvpair -lumem -lbsm -lgen -lcmdutils -linetutil
74
75 OBJS= \
76 $(NDMP_DIR)/ndmp_xdr.o \
77 $(NDMP_OBJ:%.o=$(NDMP_DIR)/%.o) $(TLM_OBJ:%.o=$(TLM_DIR)/%.o)
78
79 NDMP_OBJ = \
80 ndmpd_callbacks.o \
81 ndmpd_chkpnt.o \
82 ndmpd_comm.o \
83 ndmpd_config.o \
84 ndmpd_connect.o \
85 ndmpd_data.o \
86 ndmpd_door.o \
87 ndmpd_dtime.o \
88 ndmpd_fhistory.o \
89 ndmpd_handler.o \
90 ndmpd_log.o \
91 ndmpd_main.o \
92 ndmpd_mark.o \
93 ndmpd_mover.o \
94 ndmpd_prop.o \
95 ndmpd_scsi.o \
96 ndmpd_tape.o \
97 ndmpd_tar.o \
98 ndmpd_tar3.o \
99 ndmpd_util.o \
100 ndmpd_zfs.o
101
102 TLM_OBJ = \
103 tlm_backup_reader.o \
104 tlm_bitmap.o \
105 tlm_buffers.o \
106 tlm_info.o \
107 tlm_init.o \
108 tlm_lib.o \
109 tlm_restore_writer.o \
110 tlm_traverse.o \
111 tlm_util.o \
112 tlm_hardlink.o
113
114 SRCS= $(NDMP_OBJ:%.o=$(NDMP_DIR)/%.c) $(TLM_OBJ:%.o=$(TLM_DIR)/%.c)
115
116 SVCMETHOD = svc-ndmp
117 $(ROOTSVCMETHOD) := FILEMODE = 0555
118
119 MANIFEST = ndmp.xml
120 ROOTMANIFESTDIR= $(ROOTSVCSYSTEM)
121 $(ROOTMANIFEST) := FILEMODE = 444
122
123 ROOTNDMPDDIR= $(ROOTLIB)/ndmp
124 ROOTNDMPDFILE = $(PROG:%=$(ROOTNDMPDDIR)/%)
125
126 FILEMODE = 0444
127 $(ROOTNDMPDFILE):= FILEMODE = 0555
128
129 $(ROOTNDMPDDIR):
130 $(INS.dir)
131
132 $(ROOTNDMPDDIR)/%: %
133 $(INS.file)
134
135 .KEEP_STATE:
136
137 all: $(PROG)
138
139 install: all $(ROOTNDMPDDIR) $(ROOTNDMPDFILE) $(ROOTSVCMETHOD) $(ROOTMANIFEST)
140
141 check: $(CHKMANIFEST)
142
143 clobber:
144
145 $(PROG) : $(OBJS)
146 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
147 $(POST_PROCESS)
148
149 $(NDMP_DIR)/%.o : $(NDMP_DIR)/%.c
150 $(COMPILE.c) -o $@ $<
151
152 $(TLM_DIR)/%.o : $(TLM_DIR)/%.c
153 $(COMPILE.c) -o $@ $<
154
155 lint: lint_SRCS
156
157 clean: rpcclean
158 rm -f $(NDMP_DIR)/*.o $(TLM_DIR)/*.o
159
|
1 #
2 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
3 #
4 # Copyright 2017 Nexenta Systems, Inc. All rights reserved.
5 #
6
7 #
8 # BSD 3 Clause License
9 #
10 # Copyright (c) 2007, The Storage Networking Industry Association.
11 #
12 # Redistribution and use in source and binary forms, with or without
13 # modification, are permitted provided that the following conditions
14 # are met:
15 # - Redistributions of source code must retain the above copyright
16 # notice, this list of conditions and the following disclaimer.
17 #
18 # - Redistributions in binary form must reproduce the above copyright
19 # notice, this list of conditions and the following disclaimer in
20 # the documentation and/or other materials provided with the
21 # distribution.
22 #
23 # - Neither the name of The Storage Networking Industry Association (SNIA)
24 # nor the names of its contributors may be used to endorse or promote
25 # products derived from this software without specific prior written
51 CPPFLAGS += $(LFLAGS64)
52
53 CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DDEBUG
54 CPPFLAGS += -I. -Iinclude
55
56 CSTD = $(CSTD_GNU99)
57
58 # lint does not like unused _umem_*_init
59 LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
60
61 # function argument declared inconsistently
62 LINTFLAGS += -xerroff=E_INCONS_ARG_DECL2
63 # value type used inconsistently
64 LINTFLAGS += -xerroff=E_INCONS_VAL_TYPE_USED2
65 # value type declared inconsistently
66 LINTFLAGS += -xerroff=E_INCONS_VAL_TYPE_DECL2
67 # argument used inconsistently
68 LINTFLAGS += -xerroff=E_INCONS_ARG_USED2
69
70 CERRWARN += -_gcc=-Wno-unused-variable
71
72 LDLIBS += -lsocket -lnsl -lzfs -lsec -lndmp -lmd5 -lnvpair -lumem -lbsm -lcmdutils -linetutil
73
74 OBJS= \
75 $(NDMP_DIR)/ndmp_xdr.o \
76 $(NDMP_OBJ:%.o=$(NDMP_DIR)/%.o) $(TLM_OBJ:%.o=$(TLM_DIR)/%.o)
77
78 NDMP_OBJ = \
79 ndmpd_callbacks.o \
80 ndmpd_chkpnt.o \
81 ndmpd_clone.o \
82 ndmpd_comm.o \
83 ndmpd_config.o \
84 ndmpd_connect.o \
85 ndmpd_data.o \
86 ndmpd_door.o \
87 ndmpd_dtime.o \
88 ndmpd_fhistory.o \
89 ndmpd_handler.o \
90 ndmpd_main.o \
91 ndmpd_mark.o \
92 ndmpd_mover.o \
93 ndmpd_prop.o \
94 ndmpd_scsi.o \
95 ndmpd_tape.o \
96 ndmpd_tar.o \
97 ndmpd_tar3.o \
98 ndmpd_util.o
99
100 TLM_OBJ = \
101 tlm_backup_reader.o \
102 tlm_bitmap.o \
103 tlm_buffers.o \
104 tlm_info.o \
105 tlm_init.o \
106 tlm_lib.o \
107 tlm_restore_writer.o \
108 tlm_traverse.o \
109 tlm_util.o \
110 tlm_hardlink.o
111
112 SRCS= $(NDMP_OBJ:%.o=$(NDMP_DIR)/%.c) $(TLM_OBJ:%.o=$(TLM_DIR)/%.c)
113
114 SVCMETHOD = svc-ndmp
115 $(ROOTSVCMETHOD) := FILEMODE = 0555
116
117 MANIFEST = ndmp.xml
118 ROOTMANIFESTDIR= $(ROOTSVCSYSTEM)
119 $(ROOTMANIFEST) := FILEMODE = 444
120
121 ROOTNDMPDDIR = $(ROOTLIB)/ndmp
122 LOGNDMPDDIR = $(ROOT)/var/log/ndmp
123 ROOTNDMPDFILE = $(PROG:%=$(ROOTNDMPDDIR)/%)
124
125 FILEMODE = 0444
126 $(ROOTNDMPDFILE):= FILEMODE = 0555
127
128 $(LOGNDMPDDIR):
129 $(INS.dir)
130
131 $(ROOTNDMPDDIR):
132 $(INS.dir)
133
134 $(ROOTNDMPDDIR)/%: %
135 $(INS.file)
136
137 .KEEP_STATE:
138
139 all: $(PROG)
140
141 install: all $(ROOTNDMPDDIR) $(LOGNDMPDDIR) $(ROOTNDMPDFILE) $(ROOTSVCMETHOD) \
142 $(ROOTMANIFEST)
143
144 check: $(CHKMANIFEST)
145
146 clobber:
147
148 $(PROG) : $(OBJS)
149 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
150 $(POST_PROCESS)
151
152 $(NDMP_DIR)/%.o : $(NDMP_DIR)/%.c
153 $(COMPILE.c) -o $@ $<
154
155 $(TLM_DIR)/%.o : $(TLM_DIR)/%.c
156 $(COMPILE.c) -o $@ $<
157
158 lint: lint_SRCS
159
160 clean: rpcclean
161 rm -f $(NDMP_DIR)/*.o $(TLM_DIR)/*.o
162
|