1 #
   2 # This file and its contents are supplied under the terms of the
   3 # Common Development and Distribution License ("CDDL"), version 1.0.
   4 # You may only use this file in accordance with the terms of version
   5 # 1.0 of the CDDL.
   6 #
   7 # A full copy of the text of the CDDL should have accompanied this
   8 # source.  A copy of the CDDL is also available via the Internet at
   9 # http://www.illumos.org/license/CDDL.
  10 #
  11 
  12 #
  13 # Copyright (c) 2012 by Delphix. All rights reserved.
  14 # Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  15 #
  16 include $(SRC)/cmd/Makefile.cmd
  17 
  18 SRCS = $(TPS:%=%.c)
  19 OBJS = $(TPS:%=%.o)
  20 
  21 TESTS = $(TPS:%=$(TESTDIR)/%)
  22 $(TESTS) := FILEMODE = 0555
  23 
  24 COMSTAR_INC = ../../../include
  25 CFLAGS = -I$(COMSTAR_INC)
  26 LDLIBS += -lstmf -lnvpair
  27 LDFLAGS += -zignore
  28 
  29 $(TPS): $(OBJS)
  30         $(LINK.c) $@.o -o $@ $(LDLIBS)
  31         $(POST_PROCESS)
  32 
  33 %.o: %.c
  34         $(COMPILE.c) $(CFLAGS) $<
  35 
  36 all install: $(TESTS)
  37 
  38 lint:
  39         for src in $(SRCS); \
  40         do \
  41         $(LINT.c) $(CFLAGS) $${src} $(LDLIBS); \
  42         done
  43         
  44 clobber clean:
  45         -$(RM) $(OBJS) $(TPS)
  46 
  47 $(TESTDIR)/%: %
  48         $(INS.file)