Makefile revision 3afe87ebb25691cb6d158edaa34a6fb9b703a691
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# Use is subject to license terms.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# BSD 3 Clause License
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# Copyright (c) 2007, The Storage Networking Industry Association.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# Redistribution and use in source and binary forms, with or without
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# modification, are permitted provided that the following conditions
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# are met:
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# - Redistributions of source code must retain the above copyright
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# notice, this list of conditions and the following disclaimer.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# - Redistributions in binary form must reproduce the above copyright
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# notice, this list of conditions and the following disclaimer in
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# the documentation and/or other materials provided with the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# distribution.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# - Neither the name of The Storage Networking Industry Association (SNIA)
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# nor the names of its contributors may be used to endorse or promote
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# products derived from this software without specific prior written
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# permission.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# POSSIBILITY OF SUCH DAMAGE.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncPROG = ndmpd
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncinclude $(SRC)/cmd/Makefile.cmd
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncNDMP_DIR = ndmp
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncTLM_DIR = tlm
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncinclude $(NDMP_DIR)/Makefile.rpcgen
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncCFLAGS += $(CCVERBOSE)
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncCPPFLAGS += $(LFLAGS64)
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncCPPFLAGS += -D_FILE_OFFSET_BITS=64 -DDEBUG
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncCPPFLAGS += -I. -Iinclude
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncC99MODE = $(C99_ENABLE)
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# lint does not like unused _umem_*_init
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncLINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# function argument declared inconsistently
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncLINTFLAGS += -xerroff=E_INCONS_ARG_DECL2
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# value type used inconsistently
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncLINTFLAGS += -xerroff=E_INCONS_VAL_TYPE_USED2
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# value type declared inconsistently
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncLINTFLAGS += -xerroff=E_INCONS_VAL_TYPE_DECL2
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# argument used inconsistently
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncLINTFLAGS += -xerroff=E_INCONS_ARG_USED2
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncLDLIBS += -lsocket -lnsl -lzfs -lsec -lndmp -lmd5 -lnvpair -lumem -lbsm -lgen -lcmdutils
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncOBJS= \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync $(NDMP_DIR)/ndmp_xdr.o \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync $(NDMP_OBJ:%.o=$(NDMP_DIR)/%.o) $(TLM_OBJ:%.o=$(TLM_DIR)/%.o)
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncNDMP_OBJ = \
ndmpd_callbacks.o \
ndmpd_chkpnt.o \
ndmpd_comm.o \
ndmpd_config.o \
ndmpd_connect.o \
ndmpd_data.o \
ndmpd_door.o \
ndmpd_dtime.o \
ndmpd_prop.o \
ndmpd_fhistory.o \
ndmpd_handler.o \
ndmpd_log.o \
ndmpd_main.o \
ndmpd_mark.o \
ndmpd_mover.o \
ndmpd_scsi.o \
ndmpd_tape.o \
ndmpd_tar.o \
ndmpd_tar3.o \
ndmpd_util.o
TLM_OBJ = \
tlm_backup_reader.o \
tlm_bitmap.o \
tlm_buffers.o \
tlm_info.o \
tlm_init.o \
tlm_lib.o \
tlm_restore_writer.o \
tlm_traverse.o \
tlm_util.o \
tlm_hardlink.o
SRCS= $(NDMP_OBJ:%.o=$(NDMP_DIR)/%.c) $(TLM_OBJ:%.o=$(TLM_DIR)/%.c)
SVCMETHOD = svc-ndmp
$(ROOTSVCMETHOD) := FILEMODE = 0555
MANIFEST = ndmp.xml
ROOTMANIFESTDIR= $(ROOTSVCSYSTEM)
$(ROOTMANIFEST) := FILEMODE = 444
ROOTNDMPDDIR= $(ROOTLIB)/ndmp
ROOTNDMPDFILE = $(PROG:%=$(ROOTNDMPDDIR)/%)
FILEMODE = 0444
$(ROOTNDMPDFILE):= FILEMODE = 0555
$(ROOTNDMPDDIR):
$(INS.dir)
$(ROOTNDMPDDIR)/%: %
$(INS.file)
.KEEP_STATE:
all: $(PROG)
install: all $(ROOTNDMPDDIR) $(ROOTNDMPDFILE) $(ROOTSVCMETHOD) $(ROOTMANIFEST)
check: $(CHKMANIFEST)
clobber:
$(PROG) : $(OBJS)
$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
$(POST_PROCESS)
$(NDMP_DIR)/%.o : $(NDMP_DIR)/%.c
$(COMPILE.c) -o $@ $<
$(TLM_DIR)/%.o : $(TLM_DIR)/%.c
$(COMPILE.c) -o $@ $<
lint: lint_SRCS
clean: rpcclean
rm -f $(NDMP_DIR)/*.o $(TLM_DIR)/*.o
include $(SRC)/cmd/Makefile.targ