1 ## 2 ## Copyright (c) 1999 Network Appliance, Inc. All Rights Reserved. 3 ## 4 5 # 6 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 7 # Use is subject to license terms. 8 # 9 10 # 11 ## Permission is hereby granted, free of charge, to any person obtaining 12 ## a copy of this software and associated documentation files (the 13 ## "Software"), to deal in the Software without restriction, including 14 ## without limitation the rights to use, copy, modify, merge, publish, 15 ## distribute, sublicense, and/or sell copies of the Software, and to 16 ## permit persons to whom the Software is furnished to do so, subject to 17 ## the following conditions: 18 ## 19 ## The above copyright notice and this permission notice shall be included 20 ## in all copies or substantial portions of the Software. 21 ## 22 ## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 23 ## OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 ## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 25 ## THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 ## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 ## FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 28 ## DEALINGS IN THE SOFTWARE. 29 ## 30 31 include $(CTI_ROOT)/Makefiles/Makefile.defs 32 include $(CTI_SUITE)/Targetdirs 33 34 SUBDIRS= lib src 35 TARGETS = all clean 36 LIBDIR= lib 37 SRCDIR= src 38 BINDIR= bin 39 CHMOD = chmod 40 SRCS_LIB= $(LIBDIR)/log.c $(LIBDIR)/comm.c $(LIBDIR)/ndmp_xdr.c 41 SRCS_SRC= $(SRCDIR)/dump.c $(SRCDIR)/queue.c $(SRCDIR)/file_history.c $(SRCDIR)/handler_tbl.c $(SRCDIR)/log.c $(SRCDIR)/notify.c 42 SRCS= $(SRCS_LIB) $(SRCS_SRC) 43 OBJS_LIB = $(SRCS_LIB:.c=.o) 44 OBJS_SRC = $(SRCS_SRC:.c=.o) 45 46 AR = ar 47 all: $(BINDIR) $(SUBDIRS) libndmp.a libndmputils.a 48 49 install: $(BINDIR) $(SUBDIRS) libndmp.a libndmputils.a install_suite 50 51 $(BINDIR): 52 if [ ! -d "$(BINDIR)" ]; then\ 53 mkdir $(BINDIR);\ 54 fi 55 56 $(SUBDIRS): FRC 57 cd $@; pwd; $(MAKE) $(TARGET) 58 59 libndmp.a: $(OBJS_LIB) 60 $(AR) rv $(BINDIR)/$@ $? 61 $(CHMOD) 666 $(BINDIR)/libndmp.a 62 libndmputils.a: $(OBJS_SRC) 63 $(AR) rv $(BINDIR)/$@ $? 64 $(CHMOD) 666 $(BINDIR)/libndmputils.a 65 66 clobber: clean 67 clean: 68 rm -rf include/*.h lib/*.o src/*.o $(BINDIR)*.a 69 rm -rf include bin 70 FRC: 71 72 include $(CTI_ROOT)/Makefiles/Makefile.suite 73